> Your more recent exception log didn't include the "caused by" exception
--
> which is the actual failure details. Double-check that and make sure
it's
> the same issue.
>
> Also, use netstat to confirm you aren't using the ports already.
Changing
> it may just find another conflict (although less likely). The first
error
> was quite clear about the port being unavailable.
>
> How are you starting Tomcat? Are you somehow starting it twice?
I start tomcat click on batch file. I have changed port 80 to 81 please
find both log below. Unable to find any port (80, 81, 443) in netstat.
Please suggest where I am doing wrong
Old log with port 80 and 443
16-Mar-2021 16:45:44.410 INFO [main]
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
successfully initialized [OpenSSL 1.1.1i 8 Dec 2020]
16-Mar-2021 16:45:44.704 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-80"]
16-Mar-2021 16:45:44.716 SEVERE [main]
org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
initialize component [Connector[null-80]]
org.apache.catalina.LifecycleException: Protocol handler
initialization failed
at
org.apache.catalina.connector.Connector.initInternal(Connector.java:1055)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at
org.apache.catalina.core.StandardService.initInternal(StandardService.java:558)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
New log with change port 81 and 443
16-Mar-2021 20:16:06.094 INFO [main]
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
successfully initialized [OpenSSL 1.1.1i 8 Dec 2020]
16-Mar-2021 20:16:06.380 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-81"]
16-Mar-2021 20:16:06.411 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["https-openssl-nio-443"]
16-Mar-2021 20:16:06.413 SEVERE [main]
org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
initialize component
[Connector[org.apache.coyote.http11.Http11NioProtocol-443]]
org.apache.catalina.LifecycleException: Protocol handler
initialization failed
at
org.apache.catalina.connector.Connector.initInternal(Connector.java:1055)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at
org.apache.catalina.core.StandardService.initInternal(StandardService.java:558)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
On Tue, Mar 16, 2021 at 9:38 AM <[email protected]> wrote:
> > Deepak,
> > You already have some service listening on port 80 (IIS maybe?)
> >
> >
> > from mobile (sorry for typos ;)
> >
> > We have changed the port still getting same error
>
> > Maybe you have the same port configured twice in your conf/server.xml?
>
> > Please post *all* <Connector> elements from your conf/server.xml file,
> > being careful to remove any secrets from your configuration.
>
> -chris
> please find conf/server.xml file
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Server port="8005" shutdown="SHUTDOWN">
> <Listener
className="org.apache.catalina.startup.VersionLoggerListener"
> />
> <Listener className="org.apache.catalina.core.AprLifecycleListener"
> SSLEngine="on" />
> <Listener
> className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
> <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
/>
> <Listener
> className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"
/>
> <GlobalNamingResources>
> <Resource name="UserDatabase" auth="Container"
> type="org.apache.catalina.UserDatabase"
> description="User database that can be updated and saved"
> factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
> pathname="conf/tomcat-users.xml" />
> </GlobalNamingResources>
> <Service name="Catalina">
> <Connector port="81" maxHttpHeaderSize="8192"
> maxThreads="150" minSpareThreads="25"
> enableLookups="false" redirectPort="445" acceptCount="100"
> connectionTimeout="302000"
disableUploadTimeout="true"
> compression="on" compressionMinSize="2048"
> noCompressionUserAgents="gozilla, traviata"
>
compressableMimeType="text/html,text/xml,text/javascript,application/x-javascript,application/javascript"
>
> server=" " />
> <Connector protocol
="org.apache.coyote.http11.Http11NioProtocol"
> port="445" maxHttpHeaderSize="8192" maxThreads="150"
> minSpareThreads="25"
enableLookups="false"
> disableUploadTimeout="true" acceptCount="100" scheme="https"
secure="true"
> clientAuth="false" sslProtocol="TLS"
> sslEnabledProtocols="TLSv1.2,TLSv1.1" SSLEnabled="true"
> allowUnsafeLegacyRenegotiation="false"
> ciphers="TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA"
> keystoreFile="/conf/abc.key"
> keystorePass="changeit" server=" " />
> <Engine name="Catalina" defaultHost="localhost">
> <Realm className="org.apache.catalina.realm.LockOutRealm">
> <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
> resourceName="UserDatabase"/>
> </Realm>
> <Host name="localhost" appBase="webapps"
> unpackWARs="true" autoDeploy="true">
> <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs"
> prefix="localhost_access_log" suffix=".txt"
> pattern="%h %l %u %t "%r" %s %b" />
> </Host>
> </Engine>
> </Service>
> </Server>
>
> > 16-Mar-2021 18:09:38.299 INFO [main]
> > org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
> > ["http-nio-81"]
> > 16-Mar-2021 18:09:38.363 INFO [main]
> > org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
> > ["https-openssl-nio-445"]
> > 16-Mar-2021 18:09:38.364 SEVERE [main]
> > org.apache.catalina.util.LifecycleBase.handleSubClassException Failed
to
> > initialize component
> > [Connector[org.apache.coyote.http11.Http11NioProtocol-445]]
> > org.apache.catalina.LifecycleException: Protocol handler
> > initialization failed
> > at
> >
>
org.apache.catalina.connector.Connector.initInternal(Connector.java:1055)
> >
> > On Tue, Mar 16, 2021, 18:36 <[email protected]> wrote:
> >
> >> Dear All,
> >>
> >> Unable to start tomcat 10.0.4 and getting error Failed to initialize
> >> component.
> >> /conf/server.xml configuration as below.
> >>
> >> <Connector port="80" maxHttpHeaderSize="8192"
maxThreads="150"
> >> minSpareThreads="25" enableLookups="false" redirectPort="443"
> >> acceptCount="100"
> >> connectionTimeout="302000"
> > disableUploadTimeout="true"
> >> compression="on" compressionMinSize="2048"
> >> noCompressionUserAgents="gozilla, traviata"
> >>
> >>
> >
>
>
compressableMimeType="text/html,text/xml,text/javascript,application/x-javascript,application/javascript"
> >>
> >> server=" " />
> >>
> >> <Connector protocol
> > ="org.apache.coyote.http11.Http11NioProtocol"
> >> port="443" maxHttpHeaderSize="8192" maxThreads="150"
> >> minSpareThreads="25"
> > enableLookups="false"
> >> disableUploadTimeout="true" acceptCount="100" scheme="https"
> > secure="true"
> >> clientAuth="false" sslProtocol="TLS"
> >> sslEnabledProtocols="TLSv1.2,TLSv1.1" SSLEnabled="true"
> >> allowUnsafeLegacyRenegotiation="false"
> >>
ciphers="TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA"
> >> keystoreFile="/conf/abc.key"
> >> keystorePass="changeit" server=" " />
> >>
> >>
> >> Getting below error in catalina log
> >>
> >> Server version name: Apache Tomcat/10.0.4
> >> Server built: Mar 5 2021 11:07:15 UTC
> >> Server version number: 10.0.4.0
> >> OS Name: Windows 10
> >> OS Version: 10.0
> >> Architecture: x86
> >> Java Home: C:\Program Files (x86)\Java\jdk1.8.0_271\jre
> >> JVM Version: 1.8.0_271-b09
> >> JVM Vendor: Oracle Corporation
> >> CATALINA_BASE: D:\apache-tomcat-10.0.4
> >> CATALINA_HOME: D:\apache-tomcat-10.0.4
> >> Command line argument:
> >>
> >>
> >
>
>
-Djava.util.logging.config.file=D:\apache-tomcat-10.0.4\conf\logging.properties
> >> Command line argument:
> >> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> >> Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
> >> Command line argument:
> >> -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
> >> Command line argument: -Dignore.endorsed.dirs=
> >> Command line argument: -Dcatalina.base=D:\apache-tomcat-10.0.4
> >> Command line argument: -Dcatalina.home=D:\apache-tomcat-10.0.4
> >> Command line argument: -Djava.io.tmpdir=D:\apache-tomcat-10.0.4\temp
> >> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded
> > Apache
> >> Tomcat Native library [1.2.26] using APR version [1.7.0].
> >> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR
> >> capabilities: IPv6 [true], sendfile [true], accept filters [false],
> > random
> >> [true], UDS [true].
> >> org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
> >> successfully initialized [OpenSSL 1.1.1i 8 Dec 2020]
> >> org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
> >> ["http-nio-80"]
> >> org.apache.catalina.util.LifecycleBase.handleSubClassException Failed
> to
> >> initialize component [Connector[null-80]]
> >> org.apache.catalina.LifecycleException: Protocol handler
> >> initialization failed
> >> at
> >>
> >
>
org.apache.catalina.connector.Connector.initInternal(Connector.java:1055)
> >> at
> >> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> >> at
> >>
> >>
> >
>
>
org.apache.catalina.core.StandardService.initInternal(StandardService.java:558)
> >> at
> >> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> >> at
> >>
> >>
> >
>
>
org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1045)
> >> at
> >> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> >> at
> >> org.apache.catalina.startup.Catalina.load(Catalina.java:747)
> >> at
> >> org.apache.catalina.startup.Catalina.load(Catalina.java:769)
> >> 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.load(Bootstrap.java:302)
> >> at
> >> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:472)
> >> Caused by: java.net.BindException: Address already in use:
> bind
> >> at sun.nio.ch.Net.bind0(Native Method)
> >> at sun.nio.ch.Net.bind(Net.java:444)
> >> at sun.nio.ch.Net.bind(Net.java:436)
> >> at
> >>
> >
>
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:225)
> >> at
> >> org.apache.tomcat.util.net
> >> .NioEndpoint.initServerSocket(NioEndpoint.java:243)
> >> at
> >> org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:198)
> >> at
> >> org.apache.tomcat.util.net
> >> .AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1175)
> >> at
> >> org.apache.tomcat.util.net
> >> .AbstractEndpoint.init(AbstractEndpoint.java:1188)
> >> at
> >> org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:580)
> >> at
> >>
> >>
> >
>
>
org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:82)
> >> at
> >>
> >
>
org.apache.catalina.connector.Connector.initInternal(Connector.java:1052)
> >> ... 13 more
> >> 16-Mar-2021 16:45:44.717 INFO [main]
> >> org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
> >> ["https-openssl-nio-443"]
> >> 16-Mar-2021 16:45:44.723 SEVERE [main]
> >> org.apache.catalina.util.LifecycleBase.handleSubClassException Failed
> to
> >> initialize component
> >> [Connector[org.apache.coyote.http11.Http11NioProtocol-443]]
> >> org.apache.catalina.LifecycleException: Protocol handler
> >> initialization failed
> >> at
> >>
> >
>
org.apache.catalina.connector.Connector.initInternal(Connector.java:1055)
> >> at
> >> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> >> at
> >>
> >>
> >
>
>
org.apache.catalina.core.StandardService.initInternal(StandardService.java:558)
> >>
> >> Thanks & Regards
> >> Deepak Kumar
>
>
>
> "Disclaimer and confidentiality clause -
> This message and any attachments relating to official business of CCIL
OR
> ANY OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the
> original addressee only.
> The message may contain information that is confidential and subject to
> legal privilege.
> Any views expressed in this message are those of the individual sender.
> If you have received this message in error, please notify the original
> sender immediately and destroy the message and copies thereof and any
> attachments contained in it .
> If you are not the intended recipient of this message, you are hereby
> notified that you must not disseminate, copy, use, distribute, or take
any
> action in connection therewith.
> CCIL cannot ensure that the integrity of this communication has been
> maintained nor that it is free of errors, viruses, interception and/or
> interference.
> CCIL is not liable whatsoever for loss or damage resulting from the
> opening of this message and/or attachments and/or the use of the
> information contained in this message and/or attachments."
>
"Disclaimer and confidentiality clause -
This message and any attachments relating to official business of CCIL OR ANY
OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the original
addressee only.
The message may contain information that is confidential and subject to legal
privilege.
Any views expressed in this message are those of the individual sender.
If you have received this message in error, please notify the original sender
immediately and destroy the message and copies thereof and any attachments
contained in it .
If you are not the intended recipient of this message, you are hereby notified
that you must not disseminate, copy, use, distribute, or take any action in
connection therewith.
CCIL cannot ensure that the integrity of this communication has been
maintained nor that it is free of errors, viruses, interception and/or
interference.
CCIL is not liable whatsoever for loss or damage resulting from the opening of
this message and/or attachments and/or the use of the information contained in
this message and/or attachments."