RE: Protocol handler initialization failed, Address already in use
Dear Sergey, does this actually happen on a restart situation (with less than about 5min pausing time)? Then maybe you have a dangling connection (close/time waiting) on the TCP stack from the shutdown of a client connection (or the reverse proxy). Please check if any is still open after closing down Tomcat ... ... or after stopping the Container. If it is bridged, did it use a veth device? This also don't closed down before the last connection have closed and may prevent to creade a new on (with the same name or the same IP). Greetings Guido >-Original Message- >From: Sergey Esin [mailto:sergey.e...@jetbrains.com] >Sent: Monday, July 09, 2018 5:12 PM >To: users@tomcat.apache.org >Subject: Protocol handler initialization failed, Address already in use > >Hi, > >I have not-100% reproducable issue with the latest Tomcat 8.5.32 (Java >8u172). It happens only time to time. > >It's running in docker container under AWS ECS on a separate machine in ECS >cluster. >Brigde networking - so the Tomcat container gets it's own IP address. > >I have a number of Nio HTTP/1.1 connectors configured in Tomcat and upon >container startup I can get such issue for _any_ of configured ports: > >09 Jul 2018 16:46:03,570 INFO [Http11NioProtocol ] >Initializing ProtocolHandler ["http-nio-8080"] >09 Jul 2018 16:46:03,598 INFO [NioSelectorPool ] Using a >shared selector for servlet write/read >09 Jul 2018 16:46:03,609 INFO [Http11NioProtocol ] >Initializing ProtocolHandler ["http-nio-49080"] >09 Jul 2018 16:46:03,610 INFO [NioSelectorPool ] Using a >shared selector for servlet write/read >09 Jul 2018 16:46:03,611 INFO [Http11NioProtocol ] >Initializing ProtocolHandler ["http-nio-50080"] >09 Jul 2018 16:46:03,612 ERROR [StandardService ] Failed to >initialize connector [Connector[HTTP/1.1-50080]] >org.apache.catalina.LifecycleException: Failed to initialize component >[Connector[HTTP/1.1-50080]] >at >org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112) >~[catalina.jar:8.5.32] >at >org.apache.catalina.core.StandardService.initInternal(StandardService.java:549) >[catalina.jar:8.5.32] >at >org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) >[catalina.jar:8.5.32] >at >org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875) >[catalina.jar:8.5.32] >at >org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) >[catalina.jar:8.5.32] >at org.apache.catalina.startup.Catalina.load(Catalina.java:632) >[catalina.jar:8.5.32] >at org.apache.catalina.startup.Catalina.load(Catalina.java:655) >[catalina.jar:8.5.32] >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >~[?:1.8.0_172] >at >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >~[?:1.8.0_172] >at >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >~[?:1.8.0_172] >at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172] >at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309) >[bootstrap.jar:8.5.32] >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) >[bootstrap.jar:8.5.32] >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >~[?:1.8.0_172] >at >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >~[?:1.8.0_172] >at >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >~[?:1.8.0_172] >at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172] >at >org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:400) >[wrapper.jar:3.5.32] >at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172] >Caused by: org.apache.catalina.LifecycleException: Protocol handler >initialization failed >at >org.apache.catalina.connector.Connector.initInternal(Connector.java:995) >~[catalina.jar:8.5.32] >at >org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) >~[catalina.jar:8.5.32] >... 18 more >Caused by: java.net.BindException: Address already in use >at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_172] >at sun.nio.ch.Net.bind(Net.java:433) ~[?:1.8.0_172] >at sun.nio.ch.Net.bind(Net.java:425) ~[?:1.8.0_172] >at >sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) >~[?:1.8.0_172] >at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) >~[?:1.8.0_172] >at >org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) >~[tomcat-coyote.jar:8.5.32] >at >org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1086) >~[tomcat-coyote.jar:8.5.32] >at >org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:268) >~[tomcat-coyote.j
Re: Tomcat Stop Daily log Rotation for all logs
Thanks Mark, that worked !!! On Mon, Jul 9, 2018 at 3:27 PM Mark Thomas wrote: > On 09/07/18 21:06, sri devops wrote: > > Hello All, > > > > I have apache-tomcat-8.5.23 installed and running on RHEL 7.x86_64 and > > OpenJDK version "1.8.0_151". > > > > I wanted to manage log rotation using log rotate, however tomcat performs > > its own log rotation which interacts badly with log rotate. How can i > turn > > OFF all tomcat log rotation ? so tomcat will just logs but not perform > > daily rotation to any of the log files. > > Set rotatable=false > > i.e. > 1catalina.org.apache.juli.AsyncFileHandler.rotatable = false > > And so on for the other log files. > > Mark > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat Stop Daily log Rotation for all logs
On 09/07/18 21:06, sri devops wrote: > Hello All, > > I have apache-tomcat-8.5.23 installed and running on RHEL 7.x86_64 and > OpenJDK version "1.8.0_151". > > I wanted to manage log rotation using log rotate, however tomcat performs > its own log rotation which interacts badly with log rotate. How can i turn > OFF all tomcat log rotation ? so tomcat will just logs but not perform > daily rotation to any of the log files. Set rotatable=false i.e. 1catalina.org.apache.juli.AsyncFileHandler.rotatable = false And so on for the other log files. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Stop Daily log Rotation for all logs
Hello All, I have apache-tomcat-8.5.23 installed and running on RHEL 7.x86_64 and OpenJDK version "1.8.0_151". I wanted to manage log rotation using log rotate, however tomcat performs its own log rotation which interacts badly with log rotate. How can i turn OFF all tomcat log rotation ? so tomcat will just logs but not perform daily rotation to any of the log files. Here's what i have in *logging.properties* file handler = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler .handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler Here are my logs at */opt/apache-tomcat-8.5.23/log*s directory. catalina.2018-07-08.log catalina.2018-07-09.log catalina.out host-manager. 2018-07-09.log localhost. 2018-07-09.log localhost_access_log. 2018-07-08.txt localhost_access_log. 2018-07-09.txt manager. 2018-07-09.log Thanks, Srinath
Protocol handler initialization failed, Address already in use
Hi, I have not-100% reproducable issue with the latest Tomcat 8.5.32 (Java 8u172). It happens only time to time. It's running in docker container under AWS ECS on a separate machine in ECS cluster. Brigde networking - so the Tomcat container gets it's own IP address. I have a number of Nio HTTP/1.1 connectors configured in Tomcat and upon container startup I can get such issue for _any_ of configured ports: 09 Jul 2018 16:46:03,570 INFO [Http11NioProtocol ] Initializing ProtocolHandler ["http-nio-8080"] 09 Jul 2018 16:46:03,598 INFO [NioSelectorPool ] Using a shared selector for servlet write/read 09 Jul 2018 16:46:03,609 INFO [Http11NioProtocol ] Initializing ProtocolHandler ["http-nio-49080"] 09 Jul 2018 16:46:03,610 INFO [NioSelectorPool ] Using a shared selector for servlet write/read 09 Jul 2018 16:46:03,611 INFO [Http11NioProtocol ] Initializing ProtocolHandler ["http-nio-50080"] 09 Jul 2018 16:46:03,612 ERROR [StandardService ] Failed to initialize connector [Connector[HTTP/1.1-50080]] org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-50080]] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112) ~[catalina.jar:8.5.32] at org.apache.catalina.core.StandardService.initInternal(StandardService.java:549) [catalina.jar:8.5.32] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) [catalina.jar:8.5.32] at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875) [catalina.jar:8.5.32] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) [catalina.jar:8.5.32] at org.apache.catalina.startup.Catalina.load(Catalina.java:632) [catalina.jar:8.5.32] at org.apache.catalina.startup.Catalina.load(Catalina.java:655) [catalina.jar:8.5.32] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172] at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309) [bootstrap.jar:8.5.32] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) [bootstrap.jar:8.5.32] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172] at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:400) [wrapper.jar:3.5.32] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172] Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed at org.apache.catalina.connector.Connector.initInternal(Connector.java:995) ~[catalina.jar:8.5.32] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) ~[catalina.jar:8.5.32] ... 18 more Caused by: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_172] at sun.nio.ch.Net.bind(Net.java:433) ~[?:1.8.0_172] at sun.nio.ch.Net.bind(Net.java:425) ~[?:1.8.0_172] at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[?:1.8.0_172] at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[?:1.8.0_172] at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) ~[tomcat-coyote.jar:8.5.32] at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1086) ~[tomcat-coyote.jar:8.5.32] at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:268) ~[tomcat-coyote.jar:8.5.32] at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:581) ~[tomcat-coyote.jar:8.5.32] at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:68) ~[tomcat-coyote.jar:8.5.32] at org.apache.catalina.connector.Connector.initInternal(Connector.java:993) ~[catalina.jar:8.5.32] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) ~[catalina.jar:8.5.32] ... 18 more 09 Jul 2018 16:46:03,618 INFO [Http11NioProtocol ] Initializing ProtocolHandler ["http-nio-61080"] 09 Jul 2018 16:46:03,620 INFO [NioSelectorPool ] Using a shared selector for servlet write/read 09 Jul 2018 16:46:03,620 INFO [Http11NioProtocol ] Initializing ProtocolHandler ["http-nio-63080"] 09 Jul 2018 16:46:03,621 INFO [NioSelectorPool ] Using a shar
Register now for ApacheCon and save $250
Greetings, Apache software enthusiasts! (You’re getting this because you’re on one or more dev@ or users@ lists for some Apache Software Foundation project.) ApacheCon North America, in Montreal, is now just 80 days away, and early bird prices end in just two weeks - on July 21. Prices will be going up from $550 to $800 so register NOW to save $250, at http://apachecon.com/acna18 And don’t forget to reserve your hotel room. We have negotiated a special rate and the room block closes August 24. http://www.apachecon.com/acna18/venue.html Our schedule includes over 100 talks and we’ll be featuring talks from dozens of ASF projects., We have inspiring keynotes from some of the brilliant members of our community and the wider tech space, including: * Myrle Krantz, PMC chair for Apache Fineract, and leader in the open source financing space * Cliff Schmidt, founder of Literacy Bridge (now Amplio) and creator of the Talking Book project * Bridget Kromhout, principal cloud developer advocate at Microsoft * Euan McLeod, Comcast engineer, and pioneer in streaming video We’ll also be featuring tracks for Geospatial science, Tomcat, Cloudstack, and Big Data, as well as numerous other fields where Apache software is leading the way. See the full schedule at http://apachecon.com/acna18/schedule.html As usual we’ll be running our Apache BarCamp, the traditional ApacheCon Hackathon, and the Wednesday evening Lighting Talks, too, so you’ll want to be there. Register today at http://apachecon.com/acna18 and we’ll see you in Montreal! -- Rich Bowen VP, Conferences, The Apache Software Foundation h...@apachecon.com @ApacheCon - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem in starting tomcat
Hi all, I am using following configuration: Java- jdk-11(EA) Tomcat- 8.5.31 OS: Red Hat Herby attaching log portion which indicating error: 09-Jul-2018 07:58:10.248 SEVERE [main] org.apache.tomcat.util.net.SSLUtilBase.getStore Failed to load keystore type [PKCS11] with path [/home/iseadminportal/.keystore] due to [PKCS11 not found] java.security.KeyStoreException: PKCS11 not found at java.base/java.security.KeyStore.getInstance(KeyStore.java:878) at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:125) at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:204) at org.apache.tomcat.util.net.jsse.IseJSSEUtil.getKeyManagers(IseJSSEUtil.java:174) at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:114) at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:87) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:225) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1086) at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:268) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:581) at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:68) at org.apache.catalina.connector.Connector.initInternal(Connector.java:993) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:549) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) at org.apache.catalina.startup.Catalina.load(Catalina.java:632) at org.apache.catalina.startup.Catalina.load(Catalina.java:655) 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.load(Bootstrap.java:309) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:339) 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.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:210) Caused by: java.security.NoSuchAlgorithmException: PKCS11 KeyStore not available at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:159) at java.base/java.security.Security.getImpl(Security.java:697) at java.base/java.security.KeyStore.getInstance(KeyStore.java:875) ... 29 more Due to this tomcat is stucking at initialization state. Can anyone help me Thanks Prateek