[Bug 63041] New: shutdown.sh exits non 0 requires KILLSIG from OS

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 63041] New: shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

            Bug ID: 63041
           Summary: shutdown.sh exits non 0 requires KILLSIG from OS
           Product: Tomcat 9
           Version: 9.0.14
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: -----

Tomcat 9.0.14 shutdown.sh produces stack trace, non 0 exit code.  startup.sh
not releasing port 8005?  Tomcat 9.0.13 and all previous versions start and
stop normally.

Dec 28, 2018 9:57:32 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Error stopping Catalina
java.net.ConnectException: Connection refused (Connection refused)
        at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
        at
java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
        at
java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
        at
java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
        at java.base/java.net.Socket.connect(Socket.java:591)
        at java.base/java.net.Socket.connect(Socket.java:540)
        at java.base/java.net.Socket.<init>(Socket.java:436)
        at java.base/java.net.Socket.<init>(Socket.java:213)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:513)
        at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:403)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:497)

Environment:
Server version name:   Apache Tomcat/9.0.14
OS Name:               Linux
OS Version:            4.15.0-43-generic
Architecture:          amd64
JVM Version:           11.0.1+13
Tomcat Native library [1.2.19] using APR version [1.6.5]

How to reproduce:  Download and install Tomcat 9.0.14.  Start it using
startup.sh.  Stop it using shutdown.sh.  Stack trace observed on Linux and
MacOS.  There are no user webapps involved.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

Christopher Schultz <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Christopher Schultz <[hidden email]> ---
The shutdown process is unable to connect to a running Tomcat server over the
expected port. This is likely to be a configuration issue.

Bugzilla is not a support forum. Please post to the Tomcat users' mailing list,
instead.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

Steve Demy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |---
             Status|RESOLVED                    |REOPENED

--- Comment #2 from Steve Demy <[hidden email]> ---
Tomcat 9.0.14 runs as expected using a transplanted 9.0.13 catalina.sh.  It
starts, stops and restarts using systemd (systemctl start|stop|restart tomcat).
 When the server is running netstat shows:

tcp6       0      0 :::8080                 :::*                    LISTEN    
1038/java          
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN    
1038/java          
tcp6       0      0 :::8009                 :::*                    LISTEN    
1038/java          
unix  2      [ ]         STREAM     CONNECTED     21567    1038/java

OTOH, using the 9.0.14 version of catalina.sh, and after a fresh system reboot,
Tomcat starts normally (similar netstat results) until the first stop.  Any
subsequent start results in a start/stop loop where the server is running only
momentarily during each 10s restart loop.

Configuration is default.  There are no user webapps nor changes to the default
conf/server.xml file.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

--- Comment #3 from Igal Sapir <[hidden email]> ---
(In reply to Steve Demy from comment #2)
> Tomcat 9.0.14 runs as expected using a transplanted 9.0.13 catalina.sh.  It
> starts, stops and restarts using systemd (systemctl start|stop|restart
> tomcat).  

So if you take catalina.sh from 9.0.13 it works fine but with catalina.sh
9.0.14 you experience this issue?  All other factors are the same?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

--- Comment #4 from Igal Sapir <[hidden email]> ---
I will look into this issue if no one else has already started

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

--- Comment #5 from Christopher Schultz <[hidden email]> ---
On the users' mailing list, I asked Steve to try the catalina.sh from 9.0.13 on
his 9.0.14 install, but there has been no reply for a few days.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

--- Comment #6 from Igal Sapir <[hidden email]> ---
(In reply to Christopher Schultz from comment #5)
> On the users' mailing list, I asked Steve to try the catalina.sh from 9.0.13
> on his 9.0.14 install, but there has been no reply for a few days.

He wrote this in comment #2, possibly replying in the "wrong" thread:
> Tomcat 9.0.14 runs as expected using a transplanted 9.0.13 catalina.sh

At first glance it looks like a regression from BZ-53930, which made quite a
few changes to catalina.sh, but I will dig deeper and update with my findings.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

--- Comment #7 from Igal Sapir <[hidden email]> ---
Possibly related to BZ-63063

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

--- Comment #8 from Patrik S. <[hidden email]> ---
Yes, BZ-63063 is exactly the same issue opened for tomcat 8.5 branch.
In tomcat 9.0 the catalina.sh contains at the same line 479 and 489 that faulty
code:

 2\>\&1 \& echo \$! \>\"$catalina_pid_file\" \; \} $catalina_out_command "&"

it needs to be

delimitered:
 2\>\&1 \; echo \$! \>\"$catalina_pid_file\" \; \} $catalina_out_command "&"
or logical AND:
 2\>\&1 \&\& echo \$! \>\"$catalina_pid_file\" \; \} $catalina_out_command "&"

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

--- Comment #9 from Igal Sapir <[hidden email]> ---
I can not reproduce the issue on Ubuntu 18.04 with Java 1.8.0_192

Tomcat shuts down immediately when calling shutdown.sh

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

--- Comment #10 from Mark Thomas <[hidden email]> ---
The issue isn't obvious but is observable on Ubuntu.

I agree that "\&" -> to "\&\&" is the correct fix. I'll get that implemented
and back-ported.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

Mark Thomas <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #11 from Mark Thomas <[hidden email]> ---
*** Bug 63063 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63041] shutdown.sh exits non 0 requires KILLSIG from OS

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63041

Mark Thomas <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #12 from Mark Thomas <[hidden email]> ---
Thanks for the report and to Patrik S. for the analysis.

This has been fixed in:
- trunk for 9.0.15 onwards
- 8.5.x for 8.5.38 onwards
- 7.0.x for 7.0.93 onwards

(note the bug was never present in a released version of 7.0.x)

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]