Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsReloading context hangs with tomcat
https://www.eclipse.org/forums/index.php/mv/msg/74486/232735/#msg_232735
Originally posted by: elwood.agouros.de
Hi,
I am writing a servlet and have a tomcat 5.5 integrated as 'server' into
eclipse. For a while it was working quite fine, that when i saved the
servlet's source the context in tomcat would be reloaded. Now all that
happens is, that I get a message 'reloading started' on the console and
the server hangs in status restart but this never finishes. So i have to
manually stop and start.
Anybody got an idea, how to deal with this?
Konstantin]]>2009-06-19T15:32:10-00:00Re: Reloading context hangs with tomcat
https://www.eclipse.org/forums/index.php/mv/msg/74486/232743/#msg_232743
> Hi,
>
> I am writing a servlet and have a tomcat 5.5 integrated as 'server' into
> eclipse. For a while it was working quite fine, that when i saved the
> servlet's source the context in tomcat would be reloaded. Now all that
> happens is, that I get a message 'reloading started' on the console and
> the server hangs in status restart but this never finishes. So i have to
> manually stop and start.
>
> Anybody got an idea, how to deal with this?
>
> Konstantin
When you change the servlet, the server's status changes to "Restart"
indicating that the server thinks you need to restart the server to pick
up the change. It doesn't imply that the Tomcat server is in the
process of automatically restarting. You have to do that manually by
executing "Start" while Tomcat is running, or executing "Stop" followed
by "Start".
The Tomcat support in WTP currently isn't able to track the context
reloading that happens internally in the running Tomcat. If the reload
happens successfully, you can ignore the "Restart" state on the server
for the time being. The reload should make your servlet changes
available. You should be aware that it's not unusual for the reloaded
webapp to leak memory. Thus, it's not unheard of that after a few
reloads, the server runs out of memory. A restart us needed when you
need to recover leaked memory.
I will also mention that you may want to avoid executing "Start" while
Tomcat is running as a means of restarting Tomcat. Executing "Stop"
followed by a "Start" is a safer approach. Tomcat will wait forever for
webapps to fully clean up. If a webapp doesn't cleanup completely,
especially with respect to stopping non-daemon threads it starts, Tomcat
will fail to shutdown. Clicking "Stop" has the advantage of providing a
timeout. If Tomcat fails to stop within the timeout, a dialog will
appear giving you the option to terminate the server or continue
waiting. Clicking "Start" while Tomcat is running doesn't support that
timeout. If Tomcat fails to stop, the server will be stuck in the
"Stopping..." state. You will have to terminate the server outside of
Eclipse, or exit Eclipse, which will terminate the server as a child
process of the Eclipse process.
Cheers,
Larry]]>Larry Isaacs2009-06-19T16:41:31-00:00Re: Reloading context hangs with tomcat
https://www.eclipse.org/forums/index.php/mv/msg/74486/232751/#msg_232751
Originally posted by: elwood.agouros.de
Larry Isaacs wrote:
> Konstantin Agouros wrote:
>> Hi,
>>
>> I am writing a servlet and have a tomcat 5.5 integrated as 'server'
>> into eclipse. For a while it was working quite fine, that when i saved
>> the servlet's source the context in tomcat would be reloaded. Now all
>> that happens is, that I get a message 'reloading started' on the
>> console and the server hangs in status restart but this never
>> finishes. So i have to manually stop and start.
>>
>> Anybody got an idea, how to deal with this?
>>
>> Konstantin
>
> When you change the servlet, the server's status changes to "Restart"
> indicating that the server thinks you need to restart the server to pick
> up the change. It doesn't imply that the Tomcat server is in the
> process of automatically restarting. You have to do that manually by
> executing "Start" while Tomcat is running, or executing "Stop" followed
> by "Start".
>
> The Tomcat support in WTP currently isn't able to track the context
> reloading that happens internally in the running Tomcat. If the reload
> happens successfully, you can ignore the "Restart" state on the server
> for the time being. The reload should make your servlet changes
> available. You should be aware that it's not unusual for the reloaded
> webapp to leak memory. Thus, it's not unheard of that after a few
> reloads, the server runs out of memory. A restart us needed when you
> need to recover leaked memory.
>
> I will also mention that you may want to avoid executing "Start" while
> Tomcat is running as a means of restarting Tomcat. Executing "Stop"
> followed by a "Start" is a safer approach. Tomcat will wait forever for
> webapps to fully clean up. If a webapp doesn't cleanup completely,
> especially with respect to stopping non-daemon threads it starts, Tomcat
> will fail to shutdown. Clicking "Stop" has the advantage of providing a
> timeout. If Tomcat fails to stop within the timeout, a dialog will
> appear giving you the option to terminate the server or continue
> waiting. Clicking "Start" while Tomcat is running doesn't support that
> timeout. If Tomcat fails to stop, the server will be stuck in the
> "Stopping..." state. You will have to terminate the server outside of
> Eclipse, or exit Eclipse, which will terminate the server as a child
> process of the Eclipse process.
>
> Cheers,
> Larry
I think the cleanup part is the problem. I actually never tried pressing
'start' while it is running i always executed stop/start. Is there a way
to trace what it is doing after the 'reloading this context has started'
message appears? I wouldn't have asked if this hasn't been working earlier.
If You say that 'stop/start' is the way to go I'll leave it at that
though it would be a pity :)
Regards,
Konstantin]]>2009-06-19T17:19:28-00:00Re: Reloading context hangs with tomcat
https://www.eclipse.org/forums/index.php/mv/msg/74486/232756/#msg_232756
> Larry Isaacs wrote:
>> Konstantin Agouros wrote:
>>> Hi,
>>>
>>> I am writing a servlet and have a tomcat 5.5 integrated as 'server'
>>> into eclipse. For a while it was working quite fine, that when i
>>> saved the servlet's source the context in tomcat would be reloaded.
>>> Now all that happens is, that I get a message 'reloading started' on
>>> the console and the server hangs in status restart but this never
>>> finishes. So i have to manually stop and start.
>>>
>>> Anybody got an idea, how to deal with this?
>>>
>>> Konstantin
>>
>> When you change the servlet, the server's status changes to "Restart"
>> indicating that the server thinks you need to restart the server to
>> pick up the change. It doesn't imply that the Tomcat server is in the
>> process of automatically restarting. You have to do that manually by
>> executing "Start" while Tomcat is running, or executing "Stop"
>> followed by "Start".
>>
>> The Tomcat support in WTP currently isn't able to track the context
>> reloading that happens internally in the running Tomcat. If the reload
>> happens successfully, you can ignore the "Restart" state on the server
>> for the time being. The reload should make your servlet changes
>> available. You should be aware that it's not unusual for the reloaded
>> webapp to leak memory. Thus, it's not unheard of that after a few
>> reloads, the server runs out of memory. A restart us needed when you
>> need to recover leaked memory.
>>
>> I will also mention that you may want to avoid executing "Start" while
>> Tomcat is running as a means of restarting Tomcat. Executing "Stop"
>> followed by a "Start" is a safer approach. Tomcat will wait forever
>> for webapps to fully clean up. If a webapp doesn't cleanup
>> completely, especially with respect to stopping non-daemon threads it
>> starts, Tomcat will fail to shutdown. Clicking "Stop" has the
>> advantage of providing a timeout. If Tomcat fails to stop within the
>> timeout, a dialog will appear giving you the option to terminate the
>> server or continue waiting. Clicking "Start" while Tomcat is running
>> doesn't support that timeout. If Tomcat fails to stop, the server
>> will be stuck in the "Stopping..." state. You will have to terminate
>> the server outside of Eclipse, or exit Eclipse, which will terminate
>> the server as a child process of the Eclipse process.
>>
>> Cheers,
>> Larry
> I think the cleanup part is the problem. I actually never tried pressing
> 'start' while it is running i always executed stop/start. Is there a way
> to trace what it is doing after the 'reloading this context has started'
> message appears? I wouldn't have asked if this hasn't been working earlier.
>
> If You say that 'stop/start' is the way to go I'll leave it at that
> though it would be a pity :)
>
> Regards,
>
> Konstantin
I guess I'm not clear on what you mean by "server hangs in status
restart". Seeing "Restart" in the Severs view doesn't indicate a hang.
What is happening now that seems to imply a hang that wasn't
happening before. Normally "reloading started" is all you are
guaranteed to see when an context reloads. Are you seeing something
more or some symptom that indicates a problem. Note, you can always run
the server in debug mode and see what threads are doing when you thing
the server is hung.
Cheers,
Larry]]>Larry Isaacs2009-06-19T17:51:24-00:00Re: Reloading context hangs with tomcat
https://www.eclipse.org/forums/index.php/mv/msg/74486/232773/#msg_232773
Originally posted by: elwood.agouros.de
Larry Isaacs wrote:
> Konstantin Agouros wrote:
>> Larry Isaacs wrote:
>>> Konstantin Agouros wrote:
>>>> Hi,
>>>>
>>>> I am writing a servlet and have a tomcat 5.5 integrated as 'server'
>>>> into eclipse. For a while it was working quite fine, that when i
>>>> saved the servlet's source the context in tomcat would be reloaded.
>>>> Now all that happens is, that I get a message 'reloading started' on
>>>> the console and the server hangs in status restart but this never
>>>> finishes. So i have to manually stop and start.
>>>>
>>>> Anybody got an idea, how to deal with this?
>>>>
>>>> Konstantin
>>>
>>> When you change the servlet, the server's status changes to "Restart"
>>> indicating that the server thinks you need to restart the server to
>>> pick up the change. It doesn't imply that the Tomcat server is in
>>> the process of automatically restarting. You have to do that
>>> manually by executing "Start" while Tomcat is running, or executing
>>> "Stop" followed by "Start".
>>>
>>> The Tomcat support in WTP currently isn't able to track the context
>>> reloading that happens internally in the running Tomcat. If the
>>> reload happens successfully, you can ignore the "Restart" state on
>>> the server for the time being. The reload should make your servlet
>>> changes available. You should be aware that it's not unusual for the
>>> reloaded webapp to leak memory. Thus, it's not unheard of that after
>>> a few reloads, the server runs out of memory. A restart us needed
>>> when you need to recover leaked memory.
>>>
>>> I will also mention that you may want to avoid executing "Start"
>>> while Tomcat is running as a means of restarting Tomcat. Executing
>>> "Stop" followed by a "Start" is a safer approach. Tomcat will wait
>>> forever for webapps to fully clean up. If a webapp doesn't cleanup
>>> completely, especially with respect to stopping non-daemon threads it
>>> starts, Tomcat will fail to shutdown. Clicking "Stop" has the
>>> advantage of providing a timeout. If Tomcat fails to stop within the
>>> timeout, a dialog will appear giving you the option to terminate the
>>> server or continue waiting. Clicking "Start" while Tomcat is running
>>> doesn't support that timeout. If Tomcat fails to stop, the server
>>> will be stuck in the "Stopping..." state. You will have to terminate
>>> the server outside of Eclipse, or exit Eclipse, which will terminate
>>> the server as a child process of the Eclipse process.
>>>
>>> Cheers,
>>> Larry
>> I think the cleanup part is the problem. I actually never tried
>> pressing 'start' while it is running i always executed stop/start. Is
>> there a way to trace what it is doing after the 'reloading this
>> context has started' message appears? I wouldn't have asked if this
>> hasn't been working earlier.
>>
>> If You say that 'stop/start' is the way to go I'll leave it at that
>> though it would be a pity :)
>>
>> Regards,
>>
>> Konstantin
>
> I guess I'm not clear on what you mean by "server hangs in status
> restart". Seeing "Restart" in the Severs view doesn't indicate a hang.
> What is happening now that seems to imply a hang that wasn't
> happening before. Normally "reloading started" is all you are
> guaranteed to see when an context reloads. Are you seeing something
> more or some symptom that indicates a problem. Note, you can always run
> the server in debug mode and see what threads are doing when you thing
> the server is hung.
>
> Cheers,
> Larry
Ok I wasn't clear on the before situation:
I would see 'reloading of context succeeded' or a similar text with the
same meaning on the console and the status would be started/synchronized.
Now it just prints a message that it started reloading the context but
never finishes this. Is it possible that tomcat tries to save existing
sessions and this is not working?
Konstantin]]>2009-06-20T15:19:07-00:00Re: Reloading context hangs with tomcat
https://www.eclipse.org/forums/index.php/mv/msg/74486/232790/#msg_232790
> Larry Isaacs wrote:
>> Konstantin Agouros wrote:
>>> Larry Isaacs wrote:
>>>> Konstantin Agouros wrote:
>>>>> Hi,
>>>>>
>>>>> I am writing a servlet and have a tomcat 5.5 integrated as 'server'
>>>>> into eclipse. For a while it was working quite fine, that when i
>>>>> saved the servlet's source the context in tomcat would be reloaded.
>>>>> Now all that happens is, that I get a message 'reloading started'
>>>>> on the console and the server hangs in status restart but this
>>>>> never finishes. So i have to manually stop and start.
>>>>>
>>>>> Anybody got an idea, how to deal with this?
>>>>>
>>>>> Konstantin
>>>>
>>>> When you change the servlet, the server's status changes to
>>>> "Restart" indicating that the server thinks you need to restart the
>>>> server to pick up the change. It doesn't imply that the Tomcat
>>>> server is in the process of automatically restarting. You have to
>>>> do that manually by executing "Start" while Tomcat is running, or
>>>> executing "Stop" followed by "Start".
>>>>
>>>> The Tomcat support in WTP currently isn't able to track the context
>>>> reloading that happens internally in the running Tomcat. If the
>>>> reload happens successfully, you can ignore the "Restart" state on
>>>> the server for the time being. The reload should make your servlet
>>>> changes available. You should be aware that it's not unusual for
>>>> the reloaded webapp to leak memory. Thus, it's not unheard of that
>>>> after a few reloads, the server runs out of memory. A restart us
>>>> needed when you need to recover leaked memory.
>>>>
>>>> I will also mention that you may want to avoid executing "Start"
>>>> while Tomcat is running as a means of restarting Tomcat. Executing
>>>> "Stop" followed by a "Start" is a safer approach. Tomcat will wait
>>>> forever for webapps to fully clean up. If a webapp doesn't cleanup
>>>> completely, especially with respect to stopping non-daemon threads
>>>> it starts, Tomcat will fail to shutdown. Clicking "Stop" has the
>>>> advantage of providing a timeout. If Tomcat fails to stop within
>>>> the timeout, a dialog will appear giving you the option to terminate
>>>> the server or continue waiting. Clicking "Start" while Tomcat is
>>>> running doesn't support that timeout. If Tomcat fails to stop, the
>>>> server will be stuck in the "Stopping..." state. You will have to
>>>> terminate the server outside of Eclipse, or exit Eclipse, which will
>>>> terminate the server as a child process of the Eclipse process.
>>>>
>>>> Cheers,
>>>> Larry
>>> I think the cleanup part is the problem. I actually never tried
>>> pressing 'start' while it is running i always executed stop/start. Is
>>> there a way to trace what it is doing after the 'reloading this
>>> context has started' message appears? I wouldn't have asked if this
>>> hasn't been working earlier.
>>>
>>> If You say that 'stop/start' is the way to go I'll leave it at that
>>> though it would be a pity :)
>>>
>>> Regards,
>>>
>>> Konstantin
>>
>> I guess I'm not clear on what you mean by "server hangs in status
>> restart". Seeing "Restart" in the Severs view doesn't indicate a
>> hang. What is happening now that seems to imply a hang that wasn't
>> happening before. Normally "reloading started" is all you are
>> guaranteed to see when an context reloads. Are you seeing something
>> more or some symptom that indicates a problem. Note, you can always
>> run the server in debug mode and see what threads are doing when you
>> thing the server is hung.
>>
>> Cheers,
>> Larry
> Ok I wasn't clear on the before situation:
>
> I would see 'reloading of context succeeded' or a similar text with the
> same meaning on the console and the status would be started/synchronized.
>
> Now it just prints a message that it started reloading the context but
> never finishes this. Is it possible that tomcat tries to save existing
> sessions and this is not working?
>
> Konstantin
Searching Tomcat source, I can find the LocalStrings.properties where
"reloadingStarted" and "reloadingCompleted" are defined. I can also
search the source and find where "reloadingStarted" is used. However,
when I search the source for "reloadingCompleted", I don't find it used
anywhere. This applies to the 5.5.20, 5.5.26, 5.5.27, and 6.1.18 Tomcat
sources I searched. It would appear normal for recent Tomcat 5.5.x and
Tomcat 6.1.x not to display "Reloading this Context is completed". I
don't know which version of Tomcat last displayed that string. Are
there other symptoms that suggests the reloading is not successful?