You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by risky57 <ri...@hotmail.com> on 2007/04/18 22:49:01 UTC

HTTP Status 503 - occurs once - only when i stop and start server

I am working with tomcat embeded.


i got the thing to run.


a gui pops up where you can start the server.
a button to launch a browser to the localhost. this works fine. displays as
running.

when i press the stop button. it destroys and stops the server.

now when i press the start button, it starts the server.

if i press the launch a browser button, i get the HTTP Status 503 error.
this only occurs once. if i refresh the page its fine. or if press the
launch a browser button again its fine.

if stop and start again, same problem.


does anyone have any ideas?


can i automatically refresh the browser page when the page is launched with
Java?



thank you for your help.
-- 
View this message in context: http://www.nabble.com/HTTP-Status-503---occurs-once---only-when-i-stop-and-start-server-tf3603240.html#a10066453
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP Status 503 - occurs once - only when i stop and start server

Posted by risky57 <ri...@hotmail.com>.
Does anyone know how to get  more feedback from tomcat embedded?
at the moment it tells me in started. but i know usually in regular tomcat
there is a lot more info. 




Rashmi Rubdi-2 wrote:
> 
> Hi there,
> 
> Have you set-up your projects in a way that it overloads Tomcat? Or is
> there something in the code that needs optimization?
> 
> It helps to check Tomcat's logs for any exceptions/ error messages
> that give additional clues.
> 
> According the the RFC 2616 and the Servlet 2.4 spec:
> 
> Status code (503) indicates that the HTTP server is temporarily
> overloaded,
> and unable to handle the request.
> 
> -Rashmi
> 
> 

-- 
View this message in context: http://www.nabble.com/HTTP-Status-503---occurs-once---only-when-i-stop-and-start-server-tf3603240.html#a10078350
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP Status 503 - occurs once - only when i stop and start server

Posted by Rashmi Rubdi <ra...@gmail.com>.
Hi there,

Have you set-up your projects in a way that it overloads Tomcat? Or is
there something in the code that needs optimization?

It helps to check Tomcat's logs for any exceptions/ error messages
that give additional clues.

According the the RFC 2616 and the Servlet 2.4 spec:

Status code (503) indicates that the HTTP server is temporarily overloaded,
and unable to handle the request.

-Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP Status 503 - occurs once - only when i stop and start server

Posted by risky57 <ri...@hotmail.com>.
ok, ive restarted it, waited for a minute or more then tried opening the
browser and didn't get that problem.
ive put a sleep for a minute for the first instance everytime i restart and
this worked.

sleep for 58 seconds worked too. 48 seconds did not.

i don't understand why id have to wait that long. 
and also why if i restart and launch a browser and refresh a second later
there is no problem. 
it seems to be every other launched browser instance is a fail.

e.g.
start - launch browser - ok
stop/start - launch browser - fail
stop/start - launch browser - ok
stop/start- launch browser - fail
stop/start - launch browser - ok
etc.

it just happens every other time i restart it on the first attempt to open
the browser.
thought it might  have been firefox. had the same problem with safari.



Does anyone know how to get  more feedback from tomcat embedded?
at the moment it tells me in started. but i know usually in regular tomcat
there is a lot more info.




Is it just that Tomcat is taking time to start up? I wouldn't be
surprised to get a 503 error if Tomcat isn't ready to handle requests
yet. What happens if you start the server, wait for a minute, then
launch the browser?
-- 
Len

-- 
View this message in context: http://www.nabble.com/HTTP-Status-503---occurs-once---only-when-i-stop-and-start-server-tf3603240.html#a10078344
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP Status 503 - occurs once - only when i stop and start server

Posted by risky57 <ri...@hotmail.com>.
ok, ive restarted it, waited for a minute or more then tried opening the
browser and didn't get that problem.
but ive put a sleep for a minute for the first instance everytime i restart
and this worked.

i don't understand why id have to wait that long. 
and also why if i restart and launch a browser and refresh a second later
there is no problem. 
it seems to be every other launched browser instance is a fail.

e.g.
start - launch browser - ok
stop/start - launch browser - fail
stop/start - launch browser - ok
stop/start- launch browser - fail
stop/start - launch browser - ok
etc.

it just happens every other time i restart it on the first attempt to open
the browser.
thought it might  have been firefox. had the same problem with safari.




Is it just that Tomcat is taking time to start up? I wouldn't be
surprised to get a 503 error if Tomcat isn't ready to handle requests
yet. What happens if you start the server, wait for a minute, then
launch the browser?
-- 
Len

-- 
View this message in context: http://www.nabble.com/HTTP-Status-503---occurs-once---only-when-i-stop-and-start-server-tf3603240.html#a10078344
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTP Status 503 - occurs once - only when i stop and start server

Posted by Len Popp <le...@gmail.com>.
Is it just that Tomcat is taking time to start up? I wouldn't be
surprised to get a 503 error if Tomcat isn't ready to handle requests
yet. What happens if you start the server, wait for a minute, then
launch the browser?
-- 
Len

On 4/18/07, risky57 <ri...@hotmail.com> wrote:
>
> I am working with tomcat embeded.
>
>
> i got the thing to run.
>
>
> a gui pops up where you can start the server.
> a button to launch a browser to the localhost. this works fine. displays as
> running.
>
> when i press the stop button. it destroys and stops the server.
>
> now when i press the start button, it starts the server.
>
> if i press the launch a browser button, i get the HTTP Status 503 error.
> this only occurs once. if i refresh the page its fine. or if press the
> launch a browser button again its fine.
>
> if stop and start again, same problem.
>
>
> does anyone have any ideas?
>
>
> can i automatically refresh the browser page when the page is launched with
> Java?
>
>
>
> thank you for your help.
> --
> View this message in context: http://www.nabble.com/HTTP-Status-503---occurs-once---only-when-i-stop-and-start-server-tf3603240.html#a10066453
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org