https://bz.apache.org/bugzilla/show_bug.cgi?id=62657

            Bug ID: 62657
           Summary: Protocol handler destroy failed
           Product: Tomcat 9
           Version: 9.0.11
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: -----

I'm trying upgrade tomcat from 8.0.44 to 9.0.11 to resolve #62515, tomcat9 will
throws exception while shutting down with oracle jdk_1.8.0_181 on macbook pro
(macOS 10.13.6), upgrading to jdk_10.0.2 can fix first exception. Both
exception cannot be reproduced on ubuntu. 
step to produce:
1. unzip official distribution package
2. bin/startup.sh
3. bin/shutdown.sh

It will produce:
27-Aug-2018 16:26:07.632 INFO [main]
org.apache.catalina.core.StandardServer.await A valid shutdown command was
received via the shutdown port. Stopping the Server instance.
27-Aug-2018 16:26:07.633 INFO [main] org.apache.coyote.AbstractProtocol.pause
Pausing ProtocolHandler ["http-nio-8080"]
27-Aug-2018 16:26:07.638 INFO [main] org.apache.coyote.AbstractProtocol.pause
Pausing ProtocolHandler ["ajp-nio-8009"]
27-Aug-2018 16:26:07.639 INFO [main]
org.apache.catalina.core.StandardService.stopInternal Stopping service
[Catalina]
27-Aug-2018 16:26:07.652 INFO [main] org.apache.coyote.AbstractProtocol.stop
Stopping ProtocolHandler ["http-nio-8080"]
27-Aug-2018 16:26:07.655 INFO [main] org.apache.coyote.AbstractProtocol.stop
Stopping ProtocolHandler ["ajp-nio-8009"]
27-Aug-2018 16:26:07.656 INFO [main] org.apache.coyote.AbstractProtocol.destroy
Destroying ProtocolHandler ["http-nio-8080"]
27-Aug-2018 16:26:07.657 SEVERE [main]
org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
destroy component [Connector[HTTP/1.1-8080]]
 org.apache.catalina.LifecycleException: Protocol handler destroy failed
        at
org.apache.catalina.connector.Connector.destroyInternal(Connector.java:994)
        at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:322)
        at
org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:546)
        at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:322)
        at
org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:860)
        at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:322)
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:756)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:717)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: java.io.IOException: Thread signal failed
        at sun.nio.ch.NativeThread.signal(Native Method)
        at
sun.nio.ch.ServerSocketChannelImpl.implCloseSelectableChannel(ServerSocketChannelImpl.java:292)
        at
java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:234)
        at
java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
        at sun.nio.ch.ServerSocketAdaptor.close(ServerSocketAdaptor.java:137)
        at
org.apache.tomcat.util.net.NioEndpoint.doCloseServerSocket(NioEndpoint.java:348)
        at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:331)
        at
org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:1165)
        at
org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:611)
        at
org.apache.catalina.connector.Connector.destroyInternal(Connector.java:990)
        ... 13 more

27-Aug-2018 16:26:07.658 INFO [main] org.apache.coyote.AbstractProtocol.destroy
Destroying ProtocolHandler ["ajp-nio-8009"]

If I set bindOnInit="false" on Connector, It will produce:
27-Aug-2018 16:33:21.753 INFO [main]
org.apache.catalina.core.StandardServer.await A valid shutdown command was
received via the shutdown port. Stopping the Server instance.
27-Aug-2018 16:33:21.753 INFO [main] org.apache.coyote.AbstractProtocol.pause
Pausing ProtocolHandler ["http-nio-8080"]
27-Aug-2018 16:33:21.760 SEVERE [http-nio-8080-Acceptor-0]
org.apache.tomcat.util.net.Acceptor.run Socket accept failed
 java.nio.channels.AsynchronousCloseException
        at
java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:205)
        at
sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:257)
        at
org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:446)
        at
org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:70)
        at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:95)
        at java.lang.Thread.run(Thread.java:748)

27-Aug-2018 16:33:21.760 INFO [main] org.apache.coyote.AbstractProtocol.pause
Pausing ProtocolHandler ["ajp-nio-8009"]
27-Aug-2018 16:33:21.761 INFO [main]
org.apache.catalina.core.StandardService.stopInternal Stopping service
[Catalina]
27-Aug-2018 16:33:21.774 INFO [main] org.apache.coyote.AbstractProtocol.stop
Stopping ProtocolHandler ["http-nio-8080"]
27-Aug-2018 16:33:21.777 INFO [main] org.apache.coyote.AbstractProtocol.stop
Stopping ProtocolHandler ["ajp-nio-8009"]
27-Aug-2018 16:33:21.777 INFO [main] org.apache.coyote.AbstractProtocol.destroy
Destroying ProtocolHandler ["http-nio-8080"]
27-Aug-2018 16:33:21.777 INFO [main] org.apache.coyote.AbstractProtocol.destroy
Destroying ProtocolHandler ["ajp-nio-8009"]

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

Reply via email to