Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351533 - [Gogo] shutdown command displays event log messages in shell
Summary: [Gogo] shutdown command displays event log messages in shell
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: 3.0.0.M06   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.5.0.RELEASE   Edit
Assignee: Lazar Kirchev CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 350825
Blocks:
  Show dependency tree
 
Reported: 2011-07-08 05:56 EDT by Glyn Normington CLA
Modified: 2012-09-17 07:20 EDT (History)
1 user (show)

See Also:
glyn.normington: documentation+


Attachments
Patch updating the documentation for the output of the shell shutdown command (1.19 KB, patch)
2012-01-29 12:14 EST, Lazar Kirchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Glyn Normington CLA 2011-07-08 05:56:48 EDT
When the shutdown command is issued from the (user region, telnet) shell, the event log messages that normally appear in the terminal running Virgo get displayed in the shell terminal, thus:

osgi> shutdown
osgi> [2011-07-08 10:46:25.506] System Bundle Shutdown       <KE0010I> Shutdown initiated. 
[2011-07-08 10:46:25.609] System Bundle Shutdown       <TC0002I> Stopping Tomcat. 
Jul 8, 2011 10:46:25 AM org.apache.coyote.AbstractProtocolHandler pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Jul 8, 2011 10:46:26 AM org.apache.coyote.AbstractProtocolHandler pause
INFO: Pausing ProtocolHandler ["http-bio-8443"]
Jul 8, 2011 10:46:27 AM org.apache.coyote.AbstractProtocolHandler pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jul 8, 2011 10:46:28 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jul 8, 2011 10:46:28 AM org.apache.catalina.core.ApplicationContext log
INFO: Destroying Spring FrameworkServlet 'hostedrepo'
Jul 8, 2011 10:46:28 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Jul 8, 2011 10:46:28 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Jul 8, 2011 10:46:28 AM org.apache.coyote.AbstractProtocolHandler stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Jul 8, 2011 10:46:28 AM org.apache.coyote.AbstractProtocolHandler stop
INFO: Stopping ProtocolHandler ["http-bio-8443"]
Jul 8, 2011 10:46:28 AM org.apache.coyote.AbstractProtocolHandler stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
[2011-07-08 10:46:28.740] System Bundle Shutdown       <TC0003I> Stopped Tomcat. 
Jul 8, 2011 10:46:28 AM org.apache.coyote.AbstractProtocolHandler destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Jul 8, 2011 10:46:28 AM org.apache.coyote.AbstractProtocolHandler destroy
INFO: Destroying ProtocolHandler ["http-bio-8443"]
Jul 8, 2011 10:46:28 AM org.apache.coyote.AbstractProtocolHandler destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
Connection closed by foreign host.

Over on the Virgo terminal, Virgo silently terminates without any termination messages being issued.

The good news is that the usual termination messages appear in eventlog.log:

[2011-07-08 10:46:25.506] System Bundle Shutdown       <KE0010I> Shutdown initiated. 
[2011-07-08 10:46:25.609] System Bundle Shutdown       <TC0002I> Stopping Tomcat. 
[2011-07-08 10:46:28.740] System Bundle Shutdown       <TC0003I> Stopped Tomcat.

It seems that the shell is messing up the output streams somehow.
Comment 1 Glyn Normington CLA 2011-07-08 06:00:33 EDT
In order to reproduce this bug without too much pain, you need to run with the fix to bug 350825.
Comment 2 Glyn Normington CLA 2011-07-08 06:54:31 EDT
Please note this comment in case it is relevant: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350825#c2
Comment 3 Glyn Normington CLA 2011-07-19 07:18:10 EDT
Not critical to 3.0, but may be helped by the fix to bug 352212.
Comment 4 Glyn Normington CLA 2011-07-19 12:00:23 EDT
I checked the behaviour of Virgo 2.1.0.RELEASE and this also includes corresponding log entries such as:

[2011-07-19 16:11:17.745] system-artifacts             System.err                                                        INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

So closing this bug as working as designed. I will however check with a Tomcat expert to make sure Tomcat really is intending to write to System.err.
Comment 5 Glyn Normington CLA 2011-07-19 12:01:15 EDT
Wrong bug. Re-opening.
Comment 6 Glyn Normington CLA 2011-11-10 06:18:42 EST
It seems that Gogo is designed to take over standard input/output, so we should document this behaviour as "working as designed" and close the bug appropriatley.
Comment 7 Lazar Kirchev CLA 2012-01-29 12:14:35 EST
Created attachment 210246 [details]
Patch updating the documentation for the output of the shell shutdown command

This effect is due to the way that Gogo internally uses to redirect standard output. That is why it should be considered for working as designed. The patch updates the documentation with this.

I had certain doubts as to which section of the documentation I should add this update. It is related with logging, stopping VTS and with the shell. Finally I decided to add it to the shell section, since this is actually due to a specific feature of the Gogo shell. Glyn, what do you think? Is this section the right place for this update?
Comment 8 Glyn Normington CLA 2012-01-30 03:57:06 EST
Seem right. You could add a "known issue" to the section at the back with a pointer to this bug and a link to the section you added. If gogo provided some support to get round this problem, we'd certainly want to take advantage of it, so from that perspective, this is still an issue. Also, the "known issues" section is somewhere the users are more likely to look if they think they have an issue.
Comment 10 Lazar Kirchev CLA 2012-09-17 07:20:04 EDT
Bug is fixed.