Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread dkumar
> I suggest you have a read here:
> https://tomcat.apache.org/tomcat-10.0-doc/config/http.html#SSL_Support
> The documentation covers the details you need to correctly configure 
Tomcat
> and SSL and links to a related page about SSL configuration.

> Notice the line:
> Each secure connector must define at least one *SSLHostConfig*. The 
names
> of the *SSLHostConfig* elements must be unique and one of them must 
match
> the defaultSSLHostConfigName attribute of the *Connector*.
Thank you all
Issue has been resolved after configuring SSLHostConfig


On Tue, Mar 16, 2021 at 12:42 PM  wrote:

> > If you look at the stack trace, it tells you what the problem is:
>
> >  Caused by: java.lang.IllegalArgumentException: No SSLHostConfig
> > element was found with the hostName [_default_] to match the
> > defaultSSLHostConfigName for the connector [https-openssl-nio-8443]
>
> > So it no longer looks like you are hitting a port in use issue.
> Please suggest what configuration need to do. To remove this error. It
> will be very helpful for us.
>
>
> On Tue, Mar 16, 2021 at 12:01 PM  wrote:
>
> > > Please provide full stacktrace
> > Please find full catlina log and I have already shared server.xml in
> trail
> > mail
> >
> > 16-Mar-2021 21:26:54.263 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property 
[compressableMimeType]
> > to
> >
> >
>
> 
[text/html,text/xml,text/javascript,application/x-javascript,application/javascript]
> > 16-Mar-2021 21:26:54.269 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [clientAuth] to
> [false]
> > 16-Mar-2021 21:26:54.270 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [sslProtocol] to 
[TLS]
> > 16-Mar-2021 21:26:54.270 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property 
[sslEnabledProtocols]
> to
> > [TLSv1.2,TLSv1.1]
> > 16-Mar-2021 21:26:54.270 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property
> > [allowUnsafeLegacyRenegotiation] to [false]
> > 16-Mar-2021 21:26:54.270 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [ciphers] to
> > [TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA]
> > 16-Mar-2021 21:26:54.271 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [keystoreFile] to
> > [/conf/eNotice.key]
> > 16-Mar-2021 21:26:54.272 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [keystorePass] to
> > [eNotice@1]
> > 16-Mar-2021 21:26:54.306 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Server version
> name:
> >   Apache Tomcat/10.0.4
> > 16-Mar-2021 21:26:54.307 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Server built: 
Mar
> > 5 2021 11:07:15 UTC
> > 16-Mar-2021 21:26:54.307 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Server version
> > number: 10.0.4.0
> > 16-Mar-2021 21:26:54.307 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows
> > 10
> > 16-Mar-2021 21:26:54.307 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
> > 16-Mar-2021 21:26:54.308 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Architecture: 
x86
> > 16-Mar-2021 21:26:54.308 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Java Home:
> > C:\Program Files (x86)\Java\jdk1.8.0_271\jre
> > 16-Mar-2021 21:26:54.308 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log JVM Version:
> > 1.8.0_271-b09
> > 16-Mar-2021 21:26:54.308 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: 
Oracle
> > Corporation
> > 16-Mar-2021 21:26:54.309 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:
> > D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> > 16-Mar-2021 21:26:54.309 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:
> > D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> > 16-Mar-2021 21:26:54.310 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Command line
> > argument:
> >
> >
>
> 
-Djava.util.logging.config.file=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4\conf\logging.properties
> > 16-Mar-2021 21:26:54.310 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Command line
> > argument:
> > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> > 16-Mar-2021 21:26:54.311 INFO [main]
> > 

Re: [OT] Working with SAML

2021-03-16 Thread tomcat/perl

Alternatively, see this : 
https://wiki.shibboleth.net/confluence/display/SP3/JavaHowTo

On 16.03.2021 21:18, Christopher Schultz wrote:

Robert,

On 3/16/21 14:33, Robert Turner wrote:

Chris,

I'm not sure if it will do what you want, but when sourcing Java-based SAML
libraries for our use as an SP, I too found that most of the libraries were
much larger and more complicated that I thought necessary. We went with the
(limited but simple to use) OneLogin libraries for our use case. It doesn't
do everything by any means, but was considerably smaller and simpler than
most packages out there.


I did see the OneLogin library. You mean this one, right?
https://github.com/onelogin/java-saml

Is there anything tied to any particular service for that? Or do they simply give-away 
their library for use anywhere?


Thanks,
-chris


On Tue, Mar 16, 2021 at 1:55 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:


All,

I've got a system which is accepting one-legged, signed SAML responses
from trusted third parties and going all the right things. It's working
great.

It's time to look at doing the opposite: assembling our own SAML
responses, signing them, and sending them to another party.

I'm sure I could manually create a DOM document with all the right
namespaces, add the various values that I need, and then use XML DSIG
using the bits and pieces that are provided by Java directly, but
there's got to be a nice compact library that doesn't require me to
download the entire internet in order to use in my product.

Any recommendations?

Thanks,
-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Working with SAML

2021-03-16 Thread Robert Turner
Yes, that's the one. It's not tied to the OneLogin service or any other. We
are successfully using it against Google Workspace SAML authentication, and
against test servers running KeyCloak, and hoping to use it against
Microsoft Azure as well (but I haven't confirmed that it definitely works
yet). As far as I can tell it's free to use as it's an MIT-style License.
And at least, one can get at the code and "fix" things if needed.

On Tue, Mar 16, 2021 at 4:19 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Robert,
>
> On 3/16/21 14:33, Robert Turner wrote:
> > Chris,
> >
> > I'm not sure if it will do what you want, but when sourcing Java-based
> SAML
> > libraries for our use as an SP, I too found that most of the libraries
> were
> > much larger and more complicated that I thought necessary. We went with
> the
> > (limited but simple to use) OneLogin libraries for our use case. It
> doesn't
> > do everything by any means, but was considerably smaller and simpler than
> > most packages out there.
>
> I did see the OneLogin library. You mean this one, right?
> https://github.com/onelogin/java-saml
>
> Is there anything tied to any particular service for that? Or do they
> simply give-away their library for use anywhere?
>
> Thanks,
> -chris
>
> > On Tue, Mar 16, 2021 at 1:55 PM Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> >> All,
> >>
> >> I've got a system which is accepting one-legged, signed SAML responses
> >> from trusted third parties and going all the right things. It's working
> >> great.
> >>
> >> It's time to look at doing the opposite: assembling our own SAML
> >> responses, signing them, and sending them to another party.
> >>
> >> I'm sure I could manually create a DOM document with all the right
> >> namespaces, add the various values that I need, and then use XML DSIG
> >> using the bits and pieces that are provided by Java directly, but
> >> there's got to be a nice compact library that doesn't require me to
> >> download the entire internet in order to use in my product.
> >>
> >> Any recommendations?
> >>
> >> Thanks,
> >> -chris
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: [OT] Working with SAML

2021-03-16 Thread Christopher Schultz

Robert,

On 3/16/21 14:33, Robert Turner wrote:

Chris,

I'm not sure if it will do what you want, but when sourcing Java-based SAML
libraries for our use as an SP, I too found that most of the libraries were
much larger and more complicated that I thought necessary. We went with the
(limited but simple to use) OneLogin libraries for our use case. It doesn't
do everything by any means, but was considerably smaller and simpler than
most packages out there.


I did see the OneLogin library. You mean this one, right?
https://github.com/onelogin/java-saml

Is there anything tied to any particular service for that? Or do they 
simply give-away their library for use anywhere?


Thanks,
-chris


On Tue, Mar 16, 2021 at 1:55 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:


All,

I've got a system which is accepting one-legged, signed SAML responses
from trusted third parties and going all the right things. It's working
great.

It's time to look at doing the opposite: assembling our own SAML
responses, signing them, and sending them to another party.

I'm sure I could manually create a DOM document with all the right
namespaces, add the various values that I need, and then use XML DSIG
using the bits and pieces that are provided by Java directly, but
there's got to be a nice compact library that doesn't require me to
download the entire internet in order to use in my product.

Any recommendations?

Thanks,
-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread calder
On Tue, Mar 16, 2021, 11:46 Robert Turner  wrote:

> I suggest you have a read here:
> https://tomcat.apache.org/tomcat-10.0-doc/config/http.html#SSL_Support
> The documentation covers the details you need to correctly configure Tomcat
> and SSL and links to a related page about SSL configuration.
>
> Notice the line:
> Each secure connector must define at least one *SSLHostConfig*. The names
> of the *SSLHostConfig* elements must be unique and one of them must match
> the defaultSSLHostConfigName attribute of the *Connector*.
>
>
>
>
> On Tue, Mar 16, 2021 at 12:42 PM  wrote:
>
> > > If you look at the stack trace, it tells you what the problem is:
> >
> > >  Caused by: java.lang.IllegalArgumentException: No SSLHostConfig
> > > element was found with the hostName [_default_] to match the
> > > defaultSSLHostConfigName for the connector [https-openssl-nio-8443]
> >
> > > So it no longer looks like you are hitting a port in use issue.
> > Please suggest what configuration need to do. To remove this error. It
> >
>


Wild guess... malformed XML file


Re: [OT] Working with SAML

2021-03-16 Thread Robert Turner
Chris,

I'm not sure if it will do what you want, but when sourcing Java-based SAML
libraries for our use as an SP, I too found that most of the libraries were
much larger and more complicated that I thought necessary. We went with the
(limited but simple to use) OneLogin libraries for our use case. It doesn't
do everything by any means, but was considerably smaller and simpler than
most packages out there.

Robert



On Tue, Mar 16, 2021 at 1:55 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> All,
>
> I've got a system which is accepting one-legged, signed SAML responses
> from trusted third parties and going all the right things. It's working
> great.
>
> It's time to look at doing the opposite: assembling our own SAML
> responses, signing them, and sending them to another party.
>
> I'm sure I could manually create a DOM document with all the right
> namespaces, add the various values that I need, and then use XML DSIG
> using the bits and pieces that are provided by Java directly, but
> there's got to be a nice compact library that doesn't require me to
> download the entire internet in order to use in my product.
>
> Any recommendations?
>
> Thanks,
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


[OT] Working with SAML

2021-03-16 Thread Christopher Schultz

All,

I've got a system which is accepting one-legged, signed SAML responses 
from trusted third parties and going all the right things. It's working 
great.


It's time to look at doing the opposite: assembling our own SAML 
responses, signing them, and sending them to another party.


I'm sure I could manually create a DOM document with all the right 
namespaces, add the various values that I need, and then use XML DSIG 
using the bits and pieces that are provided by Java directly, but 
there's got to be a nice compact library that doesn't require me to 
download the entire internet in order to use in my product.


Any recommendations?

Thanks,
-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread Robert Turner
I suggest you have a read here:
https://tomcat.apache.org/tomcat-10.0-doc/config/http.html#SSL_Support
The documentation covers the details you need to correctly configure Tomcat
and SSL and links to a related page about SSL configuration.

Notice the line:
Each secure connector must define at least one *SSLHostConfig*. The names
of the *SSLHostConfig* elements must be unique and one of them must match
the defaultSSLHostConfigName attribute of the *Connector*.




On Tue, Mar 16, 2021 at 12:42 PM  wrote:

> > If you look at the stack trace, it tells you what the problem is:
>
> >  Caused by: java.lang.IllegalArgumentException: No SSLHostConfig
> > element was found with the hostName [_default_] to match the
> > defaultSSLHostConfigName for the connector [https-openssl-nio-8443]
>
> > So it no longer looks like you are hitting a port in use issue.
> Please suggest what configuration need to do. To remove this error. It
> will be very helpful for us.
>
>
> On Tue, Mar 16, 2021 at 12:01 PM  wrote:
>
> > > Please provide full stacktrace
> > Please find full catlina log and I have already shared server.xml in
> trail
> > mail
> >
> > 16-Mar-2021 21:26:54.263 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [compressableMimeType]
> > to
> >
> >
>
> [text/html,text/xml,text/javascript,application/x-javascript,application/javascript]
> > 16-Mar-2021 21:26:54.269 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [clientAuth] to
> [false]
> > 16-Mar-2021 21:26:54.270 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [sslProtocol] to [TLS]
> > 16-Mar-2021 21:26:54.270 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [sslEnabledProtocols]
> to
> > [TLSv1.2,TLSv1.1]
> > 16-Mar-2021 21:26:54.270 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property
> > [allowUnsafeLegacyRenegotiation] to [false]
> > 16-Mar-2021 21:26:54.270 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [ciphers] to
> > [TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA]
> > 16-Mar-2021 21:26:54.271 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [keystoreFile] to
> > [/conf/eNotice.key]
> > 16-Mar-2021 21:26:54.272 WARNING [main]
> > org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> > [Server/Service/Connector] failed to set property [keystorePass] to
> > [eNotice@1]
> > 16-Mar-2021 21:26:54.306 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Server version
> name:
> >   Apache Tomcat/10.0.4
> > 16-Mar-2021 21:26:54.307 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Server built: Mar
> > 5 2021 11:07:15 UTC
> > 16-Mar-2021 21:26:54.307 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Server version
> > number: 10.0.4.0
> > 16-Mar-2021 21:26:54.307 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log OS Name:   Windows
> > 10
> > 16-Mar-2021 21:26:54.307 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log OS Version:   10.0
> > 16-Mar-2021 21:26:54.308 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86
> > 16-Mar-2021 21:26:54.308 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Java Home:
> > C:\Program Files (x86)\Java\jdk1.8.0_271\jre
> > 16-Mar-2021 21:26:54.308 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log JVM Version:
> > 1.8.0_271-b09
> > 16-Mar-2021 21:26:54.308 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle
> > Corporation
> > 16-Mar-2021 21:26:54.309 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:
> > D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> > 16-Mar-2021 21:26:54.309 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:
> > D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> > 16-Mar-2021 21:26:54.310 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Command line
> > argument:
> >
> >
>
> -Djava.util.logging.config.file=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4\conf\logging.properties
> > 16-Mar-2021 21:26:54.310 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Command line
> > argument:
> > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> > 16-Mar-2021 21:26:54.311 INFO [main]
> > org.apache.catalina.startup.VersionLoggerListener.log Command line
> > argument: 

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread dkumar
> If you look at the stack trace, it tells you what the problem is:

>  Caused by: java.lang.IllegalArgumentException: No SSLHostConfig
> element was found with the hostName [_default_] to match the
> defaultSSLHostConfigName for the connector [https-openssl-nio-8443]

> So it no longer looks like you are hitting a port in use issue.
Please suggest what configuration need to do. To remove this error. It 
will be very helpful for us. 


On Tue, Mar 16, 2021 at 12:01 PM  wrote:

> > Please provide full stacktrace
> Please find full catlina log and I have already shared server.xml in 
trail
> mail
>
> 16-Mar-2021 21:26:54.263 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [compressableMimeType]
> to
>
> 
[text/html,text/xml,text/javascript,application/x-javascript,application/javascript]
> 16-Mar-2021 21:26:54.269 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [clientAuth] to 
[false]
> 16-Mar-2021 21:26:54.270 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [sslProtocol] to [TLS]
> 16-Mar-2021 21:26:54.270 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [sslEnabledProtocols] 
to
> [TLSv1.2,TLSv1.1]
> 16-Mar-2021 21:26:54.270 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property
> [allowUnsafeLegacyRenegotiation] to [false]
> 16-Mar-2021 21:26:54.270 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [ciphers] to
> [TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA]
> 16-Mar-2021 21:26:54.271 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [keystoreFile] to
> [/conf/eNotice.key]
> 16-Mar-2021 21:26:54.272 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [keystorePass] to
> [eNotice@1]
> 16-Mar-2021 21:26:54.306 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server version 
name:
>   Apache Tomcat/10.0.4
> 16-Mar-2021 21:26:54.307 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server built: Mar
> 5 2021 11:07:15 UTC
> 16-Mar-2021 21:26:54.307 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server version
> number: 10.0.4.0
> 16-Mar-2021 21:26:54.307 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Name:   Windows
> 10
> 16-Mar-2021 21:26:54.307 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Version:   10.0
> 16-Mar-2021 21:26:54.308 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86
> 16-Mar-2021 21:26:54.308 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Java Home:
> C:\Program Files (x86)\Java\jdk1.8.0_271\jre
> 16-Mar-2021 21:26:54.308 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log JVM Version:
> 1.8.0_271-b09
> 16-Mar-2021 21:26:54.308 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle
> Corporation
> 16-Mar-2021 21:26:54.309 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:
> D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> 16-Mar-2021 21:26:54.309 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:
> D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> 16-Mar-2021 21:26:54.310 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument:
>
> 
-Djava.util.logging.config.file=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4\conf\logging.properties
> 16-Mar-2021 21:26:54.310 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument:
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> 16-Mar-2021 21:26:54.311 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djdk.tls.ephemeralDHKeySize=2048
> 16-Mar-2021 21:26:54.311 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
> 16-Mar-2021 21:26:54.311 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dignore.endorsed.dirs=
> 16-Mar-2021 21:26:54.312 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: 
-Dcatalina.base=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> 16-Mar-2021 21:26:54.312 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: 

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread Robert Turner
If you look at the stack trace, it tells you what the problem is:

 Caused by: java.lang.IllegalArgumentException: No SSLHostConfig
element was found with the hostName [_default_] to match the
defaultSSLHostConfigName for the connector [https-openssl-nio-8443]

So it no longer looks like you are hitting a port in use issue.



On Tue, Mar 16, 2021 at 12:01 PM  wrote:

> > Please provide full stacktrace
> Please find full catlina log and I have already shared server.xml in trail
> mail
>
> 16-Mar-2021 21:26:54.263 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [compressableMimeType]
> to
>
> [text/html,text/xml,text/javascript,application/x-javascript,application/javascript]
> 16-Mar-2021 21:26:54.269 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [clientAuth] to [false]
> 16-Mar-2021 21:26:54.270 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [sslProtocol] to [TLS]
> 16-Mar-2021 21:26:54.270 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [sslEnabledProtocols] to
> [TLSv1.2,TLSv1.1]
> 16-Mar-2021 21:26:54.270 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property
> [allowUnsafeLegacyRenegotiation] to [false]
> 16-Mar-2021 21:26:54.270 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [ciphers] to
> [TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA]
> 16-Mar-2021 21:26:54.271 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [keystoreFile] to
> [/conf/eNotice.key]
> 16-Mar-2021 21:26:54.272 WARNING [main]
> org.apache.tomcat.util.digester.SetPropertiesRule.begin Match
> [Server/Service/Connector] failed to set property [keystorePass] to
> [eNotice@1]
> 16-Mar-2021 21:26:54.306 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server version name:
>   Apache Tomcat/10.0.4
> 16-Mar-2021 21:26:54.307 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server built:   Mar
> 5 2021 11:07:15 UTC
> 16-Mar-2021 21:26:54.307 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Server version
> number: 10.0.4.0
> 16-Mar-2021 21:26:54.307 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Name:   Windows
> 10
> 16-Mar-2021 21:26:54.307 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log OS Version:   10.0
> 16-Mar-2021 21:26:54.308 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Architecture:   x86
> 16-Mar-2021 21:26:54.308 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Java Home:
> C:\Program Files (x86)\Java\jdk1.8.0_271\jre
> 16-Mar-2021 21:26:54.308 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log JVM Version:
> 1.8.0_271-b09
> 16-Mar-2021 21:26:54.308 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:   Oracle
> Corporation
> 16-Mar-2021 21:26:54.309 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:
> D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> 16-Mar-2021 21:26:54.309 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:
> D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> 16-Mar-2021 21:26:54.310 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument:
>
> -Djava.util.logging.config.file=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4\conf\logging.properties
> 16-Mar-2021 21:26:54.310 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument:
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> 16-Mar-2021 21:26:54.311 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djdk.tls.ephemeralDHKeySize=2048
> 16-Mar-2021 21:26:54.311 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
> 16-Mar-2021 21:26:54.311 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dignore.endorsed.dirs=
> 16-Mar-2021 21:26:54.312 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcatalina.base=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> 16-Mar-2021 21:26:54.312 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcatalina.home=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
> 16-Mar-2021 21:26:54.312 INFO [main]
> 

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread dkumar
> Please provide full stacktrace
Please find full catlina log and I have already shared server.xml in trail 
mail 

16-Mar-2021 21:26:54.263 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector] failed to set property [compressableMimeType] 
to 
[text/html,text/xml,text/javascript,application/x-javascript,application/javascript]
16-Mar-2021 21:26:54.269 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector] failed to set property [clientAuth] to [false]
16-Mar-2021 21:26:54.270 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector] failed to set property [sslProtocol] to [TLS]
16-Mar-2021 21:26:54.270 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector] failed to set property [sslEnabledProtocols] to 
[TLSv1.2,TLSv1.1]
16-Mar-2021 21:26:54.270 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector] failed to set property 
[allowUnsafeLegacyRenegotiation] to [false]
16-Mar-2021 21:26:54.270 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector] failed to set property [ciphers] to 
[TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA]
16-Mar-2021 21:26:54.271 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector] failed to set property [keystoreFile] to 
[/conf/eNotice.key]
16-Mar-2021 21:26:54.272 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector] failed to set property [keystorePass] to 
[eNotice@1]
16-Mar-2021 21:26:54.306 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server version name: 
  Apache Tomcat/10.0.4
16-Mar-2021 21:26:54.307 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server built:   Mar 
5 2021 11:07:15 UTC
16-Mar-2021 21:26:54.307 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server version 
number: 10.0.4.0
16-Mar-2021 21:26:54.307 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log OS Name:   Windows 
10
16-Mar-2021 21:26:54.307 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log OS Version:   10.0
16-Mar-2021 21:26:54.308 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Architecture:   x86
16-Mar-2021 21:26:54.308 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Java Home:  
C:\Program Files (x86)\Java\jdk1.8.0_271\jre
16-Mar-2021 21:26:54.308 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log JVM Version:  
1.8.0_271-b09
16-Mar-2021 21:26:54.308 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:   Oracle 
Corporation
16-Mar-2021 21:26:54.309 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:  
D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
16-Mar-2021 21:26:54.309 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:  
D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
16-Mar-2021 21:26:54.310 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: 
-Djava.util.logging.config.file=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4\conf\logging.properties
16-Mar-2021 21:26:54.310 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
16-Mar-2021 21:26:54.311 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: -Djdk.tls.ephemeralDHKeySize=2048
16-Mar-2021 21:26:54.311 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
16-Mar-2021 21:26:54.311 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: -Dignore.endorsed.dirs=
16-Mar-2021 21:26:54.312 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: -Dcatalina.base=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
16-Mar-2021 21:26:54.312 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: -Dcatalina.home=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4
16-Mar-2021 21:26:54.312 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: 
-Djava.io.tmpdir=D:\apache-tomcat-10.0.4_bk\apache-tomcat-10.0.4\temp
16-Mar-2021 21:26:54.348 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache 
Tomcat Native library [1.2.26] using APR version [1.7.0].
16-Mar-2021 21:26:54.348 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR 
capabilities: IPv6 [true], sendfile [true], accept filters [false], random 
[true], UDS [true].
16-Mar-2021 

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread Maxim Solodovnik
Please provide full stacktrace

On Tue, 16 Mar 2021 at 22:49,  wrote:
>
> >> 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  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*  elements from your conf/server.xml file,
> >>> being careful to remove any secrets from your configuration.
> >> -chris
> >> please find conf/server.xml file
> >>
> >> 
> >> 
> >> > className="org.apache.catalina.startup.VersionLoggerListener"
> >> />
> >> >> SSLEngine="on" />
> >> >> className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
> >> >> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> > />
> >> >> className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"
> > />
> >>
> >>   >>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" />
> >>
> >>
> >>   >> 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=" " />
> >>   > ="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"
> >> 

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread dkumar
>> 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  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*  elements from your conf/server.xml file,
>>> being careful to remove any secrets from your configuration.
>> -chris
>> please find conf/server.xml file
>>
>> 
>> 
>> className="org.apache.catalina.startup.VersionLoggerListener"
>> />
>>> SSLEngine="on" />
>>> className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
>>> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> />
>>> className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"
> />
>>
>>  >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" />
>>
>>
>>  > 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=" " />
>>   ="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=" " />
>>  
>>
>>  >   

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread Zero

On 3/16/21 3:57 PM, dku...@ccilindia.co.in wrote:

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  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*  elements from your conf/server.xml file,
being careful to remove any secrets from your configuration.

-chris
please find conf/server.xml file



   
className="org.apache.catalina.startup.VersionLoggerListener"

/>
   
   
   
/>

   
/>

   
 
   
   
 
disableUploadTimeout="true"

compression="on" compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"


compressableMimeType="text/html,text/xml,text/javascript,application/x-javascript,application/javascript"

  server=" " />
 
="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=" " />
 
   
 
   
   
 
   
 
   



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



On Linux you cannot bind ports below 1024 without admin privileges.

Maybe that is also the case in Windows ?

Then you could change port 80 into 8080 and 443 into 8443 and see if 
that works.


~Z




Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread dkumar
> 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  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*  elements from your conf/server.xml file,
> > being careful to remove any secrets from your configuration.
>
> -chris
> please find conf/server.xml file
>
> 
> 
>/>
>SSLEngine="on" />
>className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
>className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" 
/>
>className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" 
/>
>   
>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" />
>   
>   
> 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=" " />
>  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=" " />
> 
>   
> resourceName="UserDatabase"/>
>   
>unpackWARs="true" autoDeploy="true">
>  directory="logs"
>prefix="localhost_access_log" suffix=".txt"
>pattern="%h %l %u %t %r %s %b" />
>   
> 
>   
> 
>
> > 

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread Robert Turner
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?



On Tue, Mar 16, 2021 at 9:38 AM  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*  elements from your conf/server.xml file,
> > being careful to remove any secrets from your configuration.
>
> -chris
> please find conf/server.xml file
>
> 
> 
>/>
>SSLEngine="on" />
>className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
>className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
>className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
>   
>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" />
>   
>   
> 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=" " />
>  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=" " />
> 
>   
> resourceName="UserDatabase"/>
>   
>unpackWARs="true" autoDeploy="true">
>  directory="logs"
>prefix="localhost_access_log" suffix=".txt"
>pattern="%h %l %u %t %r %s %b" />
>   
> 
>   
> 
>
> > 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  wrote:
> >
> >> Dear All,
> >>
> >> Unable to start tomcat 10.0.4 and getting error Failed to initialize
> >> component.
> >> /conf/server.xml configuration as below.
> >>
> >>   >> 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=" " />
> >>
> >>   > ="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:

Re: certificateFile exception when certificateKeystoreFile is configured

2021-03-16 Thread Trudeau, Rick (Nokia - CA/Ottawa)
Thanks Chris, for sure we've got an upgrade on the roadmap for the next quarter 
so we'll give the latest 8.5 a try.
Cheers.
/rt.

On 2021-03-16, 9:39 AM, "Christopher Schultz"  
wrote:

Rick,

Any chance you can try-out 8.5.latest? Your version is super old. It's 
possible it's a bug that was fixed in the (distant?) past.

-chris

On 3/16/21 09:33, Trudeau, Rick (Nokia - CA/Ottawa) wrote:
> 
> 
> On 2021-03-04, 2:45 PM, "Trudeau, Rick (Nokia - CA/Ottawa)" 
 wrote:
> 
>  Chris,
> 
>  On 2021-03-04, 12:07 PM, "Christopher Schultz" 
 wrote:
> 
>  Rick,
> 
>  On 3/3/21 09:23, Trudeau, Rick (Nokia - CA/Ottawa) wrote:
>  >
>  > Tomcat version: 8.5.34
>  >
>  > Hello,
>  > I’m wondering if anyone has any theories about an SSL config 
related exception that we hit periodically on Tomcat startup that prevents the 
system from initializing properly.
>  > I’ll emphasize “periodically” here, because we only trigger 
this rarely and have no reliable way of triggering the problem.
>  > The exception seems to indicate that the certificateFile is 
missing, which is strange given that the certificateKeystoreFile is provided 
and available on the filesystem.
>  > My understanding is that a certificateFile would is not 
required when using a certificateKeystoreFile.
>  > Any idea why there could be a certifificateFile related 
exception when the certificateKeystoreFile is configured?
>  >
>  > The stack trace is:
>  >
>  > 2021.02.28 21:19:48 890 + SEVERE 
org.apache.catalina.core.StandardService Failed to initialize connector 
[Connector[HTTP/1.1-8544]]
>  > org.apache.catalina.LifecycleException: Failed to initialize 
component [Connector[HTTP/1.1-8544]]
>  >  at 
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
>  >  at 
org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)
>  >  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 
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:309)
>  >  at 
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
>  > Caused by: org.apache.catalina.LifecycleException: Protocol 
handler initialization failed
>  >  at 
org.apache.catalina.connector.Connector.initInternal(Connector.java:995)
>  >  at 
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
>  >  ... 12 more
>  > Caused by: java.lang.IllegalArgumentException: SSLHostConfig 
attribute certificateFile must be defined when using an SSL connector
>  >  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:115)
>  >  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:86)
>  >  at 
org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:244)
>  >  at 
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1087)
>  >  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:265)
>  >  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)
>  >  ... 13 more
>  > Caused by: java.io.IOException: SSLHostConfig attribute 
certificateFile must be defined when using an SSL connector
>  >  at 
org.apache.tomcat.util.net.jsse.JSSEUtil.getKeyManagers(JSSEUtil.java:203)
>  >  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:113)
>  >

Re: certificateFile exception when certificateKeystoreFile is configured

2021-03-16 Thread Christopher Schultz

Rick,

Any chance you can try-out 8.5.latest? Your version is super old. It's 
possible it's a bug that was fixed in the (distant?) past.


-chris

On 3/16/21 09:33, Trudeau, Rick (Nokia - CA/Ottawa) wrote:



On 2021-03-04, 2:45 PM, "Trudeau, Rick (Nokia - CA/Ottawa)" 
 wrote:

 Chris,

 On 2021-03-04, 12:07 PM, "Christopher Schultz" 
 wrote:

 Rick,

 On 3/3/21 09:23, Trudeau, Rick (Nokia - CA/Ottawa) wrote:
 >
 > Tomcat version: 8.5.34
 >
 > Hello,
 > I’m wondering if anyone has any theories about an SSL config related 
exception that we hit periodically on Tomcat startup that prevents the system from 
initializing properly.
 > I’ll emphasize “periodically” here, because we only trigger this 
rarely and have no reliable way of triggering the problem.
 > The exception seems to indicate that the certificateFile is missing, 
which is strange given that the certificateKeystoreFile is provided and available 
on the filesystem.
 > My understanding is that a certificateFile would is not required 
when using a certificateKeystoreFile.
 > Any idea why there could be a certifificateFile related exception 
when the certificateKeystoreFile is configured?
 >
 > The stack trace is:
 >
 > 2021.02.28 21:19:48 890 + SEVERE 
org.apache.catalina.core.StandardService Failed to initialize connector 
[Connector[HTTP/1.1-8544]]
 > org.apache.catalina.LifecycleException: Failed to initialize 
component [Connector[HTTP/1.1-8544]]
 >  at 
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
 >  at 
org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)
 >  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 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:309)
 >  at 
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
 > Caused by: org.apache.catalina.LifecycleException: Protocol handler 
initialization failed
 >  at 
org.apache.catalina.connector.Connector.initInternal(Connector.java:995)
 >  at 
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
 >  ... 12 more
 > Caused by: java.lang.IllegalArgumentException: SSLHostConfig 
attribute certificateFile must be defined when using an SSL connector
 >  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:115)
 >  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:86)
 >  at 
org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:244)
 >  at 
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1087)
 >  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:265)
 >  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)
 >  ... 13 more
 > Caused by: java.io.IOException: SSLHostConfig attribute 
certificateFile must be defined when using an SSL connector
 >  at 
org.apache.tomcat.util.net.jsse.JSSEUtil.getKeyManagers(JSSEUtil.java:203)
 >  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:113)
 >  ... 20 more
 >
 > Our connector is defined as follows:
 >
 >   protocol="HTTP/1.1"
 > compression="on"
 > 
compressibleMimeType="text/html,text/xml,text/plain,text/css,application/javascript,application/json"
 > compressionMinSize="2048"
 > connectionTimeout="6"
 > maxHttpHeaderSize="65536"
 > scheme="https"
 >  

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread dkumar
> 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*  elements from your conf/server.xml file, 
> being careful to remove any secrets from your configuration.

-chris
please find conf/server.xml file



  
  
  
  
  
  

  
  



  

  
  

  

  


> 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  wrote:
> 
>> Dear All,
>>
>> Unable to start tomcat 10.0.4 and getting error Failed to initialize
>> component.
>> /conf/server.xml configuration as below.
>>
>>  > 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=" " />
>>
>>   ="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
>> 

Re: certificateFile exception when certificateKeystoreFile is configured

2021-03-16 Thread Trudeau, Rick (Nokia - CA/Ottawa)


On 2021-03-04, 2:45 PM, "Trudeau, Rick (Nokia - CA/Ottawa)" 
 wrote:

Chris,

On 2021-03-04, 12:07 PM, "Christopher Schultz" 
 wrote:

Rick,

On 3/3/21 09:23, Trudeau, Rick (Nokia - CA/Ottawa) wrote:
> 
> Tomcat version: 8.5.34
> 
> Hello,
> I’m wondering if anyone has any theories about an SSL config related 
exception that we hit periodically on Tomcat startup that prevents the system 
from initializing properly.
> I’ll emphasize “periodically” here, because we only trigger this 
rarely and have no reliable way of triggering the problem.
> The exception seems to indicate that the certificateFile is missing, 
which is strange given that the certificateKeystoreFile is provided and 
available on the filesystem.
> My understanding is that a certificateFile would is not required when 
using a certificateKeystoreFile.
> Any idea why there could be a certifificateFile related exception 
when the certificateKeystoreFile is configured?
> 
> The stack trace is:
> 
> 2021.02.28 21:19:48 890 + SEVERE 
org.apache.catalina.core.StandardService Failed to initialize connector 
[Connector[HTTP/1.1-8544]]
> org.apache.catalina.LifecycleException: Failed to initialize 
component [Connector[HTTP/1.1-8544]]
>  at 
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
>  at 
org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)
>  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 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:309)
>  at 
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
> Caused by: org.apache.catalina.LifecycleException: Protocol handler 
initialization failed
>  at 
org.apache.catalina.connector.Connector.initInternal(Connector.java:995)
>  at 
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
>  ... 12 more
> Caused by: java.lang.IllegalArgumentException: SSLHostConfig 
attribute certificateFile must be defined when using an SSL connector
>  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:115)
>  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:86)
>  at 
org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:244)
>  at 
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1087)
>  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:265)
>  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)
>  ... 13 more
> Caused by: java.io.IOException: SSLHostConfig attribute 
certificateFile must be defined when using an SSL connector
>  at 
org.apache.tomcat.util.net.jsse.JSSEUtil.getKeyManagers(JSSEUtil.java:203)
>  at 
org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:113)
>  ... 20 more
> 
> Our connector is defined as follows:
> 
>   protocol="HTTP/1.1"
> compression="on"
> 
compressibleMimeType="text/html,text/xml,text/plain,text/css,application/javascript,application/json"
> compressionMinSize="2048"
> connectionTimeout="6"
> maxHttpHeaderSize="65536"
> scheme="https"
> secure="true"
> relaxedQueryChars="[]"
> SSLEnabled="true">
> protocols=" TLSv1.2"
> certificateVerification="optional"
>   

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread Christopher Schultz

Deepak,

On 3/16/21 09:03, dku...@ccilindia.co.in wrote:

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*  elements from your conf/server.xml file, 
being careful to remove any secrets from your configuration.


-chris


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  wrote:


Dear All,

Unable to start tomcat 10.0.4 and getting error Failed to initialize
component.
/conf/server.xml configuration as below.

 
disableUploadTimeout="true"

compression="on" compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"



compressableMimeType="text/html,text/xml,text/javascript,application/x-javascript,application/javascript"


  server=" " />

 
="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

Re: Does Tomcat JDBC Connection Pool reset autocommit on closed connections?

2021-03-16 Thread Christopher Schultz

Alex,

On 3/15/21 23:48, My Subs wrote:

 On Mon, 15 Mar 2021 11:25:17 -0500 Christopher Schultz 
 wrote 

  > Alex,
  >
  > On 3/13/21 10:20, My Subs wrote:
  > >  On Fri, 12 Mar 2021 20:24:48 -0500 Christopher Schultz 
 wrote 
  > >
  > >   >
  > >   > Alex,
  > >   >
  > >   > On 3/12/21 16:32, My Subs wrote:
  > >   > >  On Fri, 12 Mar 2021 02:35:27 -0500 Mark Thomas 
 wrote 
  > >   > >
  > >   > >   > On 12/03/2021 03:57, My Subs wrote:
  > >   > >   > > Hello,
  > >   > >   > >
  > >   > >   > > I'm using Tomcat 10.0.0.  Suppose I call setAutoCommit(false) 
on a connection obtained from a Tomcat JDBC Connection Pool.  Then I do some stuff with the 
connection, call commit() or rollback() and finally call close() on it without ever calling 
setAutocommit(true).
  > >   > >   > >
  > >   > >   > > What will the autocommit state of that connection be, the 
next time the pool gives it to my code?  Will it be in the same state I left it, that is, with 
autocommit set to false, or will it be reverted back to the default state (autocommit set to 
true)?
  > >   > >   >
  > >   > >   > The simplest way to be sure is to run a test with a pool size 
of 1.
  > >   > >   >
  > >   > >   > A quick look at the code (I might have missed something) 
suggests that
  > >   > >   > if defaultAutoCommit is configured then it will be reset to 
that default
  > >   > >   > value. Otherwise it will be unchanged from when the connection 
was
  > >   > >   > returned to the pool.
  > >   > >   >
  > >   > >   > Mark
  > >   > >   >
  > >   > >   > 
-
  > >   > >   > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  > >   > >   > For additional commands, e-mail: users-h...@tomcat.apache.org
  > >   > >
  > >   > > Hi Mark,
  > >   > >
  > >   > > Thanks for your comment.  I found this on 
https://tomcat.apache.org/tomcat-10.0-doc/jdbc-pool.html:
  > >   > >
  > >   > > "The only state the pool itself inserts are defaultAutoCommit, 
defaultReadOnly, defaultTransactionIsolation, defaultCatalog if these are set. These 4 properties are 
only set upon connection creation. Should these properties be modified during the usage of the 
connection, the pool itself will not reset them."
  > >   > >
  > >   > > It seems to say that connections will not be reverted back to the 
default auto-commit state even if defaultAutoCommit is set.  Given your reading of the 
source code, might it be that the docs are wrong?
  > >   >
  > >   > I think the docs can easily be misunderstood.
  > >   >
  > >   > I don't use the tomcat-pool but I do use the *other* pool provided by
  > >   > Tomcat and they are generally expected to be (mostly) interchangeable.
  > >   >
  > >   > A connection pool which doesn't reset the auto-commit state on
  > >   > connection-return operation would IMO be considered very badly broken.
  > >   >
  > >   > tomcat-pool allows you to NOT specify a default in which case
  > >   > Connection.setAutoCommit() will never be called *at all* by the pool.
  > >   > That seems like reasonable behavior (don't mess with my stuff!), but 
it
  > >   > means that the application will *always* have to reset the auto-commit
  > >   > state to a known value *every single time* a connection is borrowed.
  > >   >
  > >   > Since the whole point of the pool is to manage this kind of thing, I
  > >   > would argue that having defaultAutoCommit NOT set to anything would be
  > >   > considered very bad practice.
  > >   >
  > >   > If you set defaultAutoCommit="true", you should expect that, when your
  > >   > connections are returned to the pool, that setAutoCommit(true) will be
  > >   > called every single time the connection is returned to the pool --
  > >   > usually by the application calling Connection.close().
  > >   >
  > >   > Are you worried about a particular use-case or are you just being
  > >   > extra-vigilant? Or are you observing some unexpected behavior?
  > >   >
  > >   > -chris
  > >   >
  > >   > -
  > >   > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  > >   > For additional commands, e-mail: users-h...@tomcat.apache.org
  > >   >
  > >   >
  > >
  > > Hi Chris,
  > >
  > > I’m trying to wrap my head around on whether I can end transaction blocks 
in a try clause with a simple call to commit().  That would be the case if the pool 
resets the auto-commit state to the value of defaultAutoCommit.  Try blocks would end 
with commit(), catch blocks with rollback(), and the pool takes care of setting 
auto-commit back to true.
  > >
  > > On the other hand, if as the docs say, “the pool itself will not reset” 
the state of connection attributes like auto-commit, then I’d need to tack to every 
try/catch a finally clause having setAutoCommit(true).   But this would be 
unnecessary boilerplate if, as Mark says —and you believe should 

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread dkumar
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

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  wrote:

> Dear All,
>
> Unable to start tomcat 10.0.4 and getting error Failed to initialize
> component.
> /conf/server.xml configuration as below.
>
>  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=" " />
>
>  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)
>   

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread Maxim Solodovnik
You already have some service listening on port 80 (IIS maybe?)


from mobile (sorry for typos ;)


On Tue, Mar 16, 2021, 18:36  wrote:

> Dear All,
>
> Unable to start tomcat 10.0.4 and getting error Failed to initialize
> component.
> /conf/server.xml configuration as below.
>
>  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=" " />
>
>  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/eNotice.key"
> keystorePass="eNotice@1" 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
> 

Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread Robert Turner
It's saying port 80 is already in use. Make sure another process (like IIS)
isn't using the port already, or change your configuration to a different
port.

You can use 'netstat' (with options) to determine which process is using
the port already.

On Tue., Mar. 16, 2021, 07:36 ,  wrote:

> Dear All,
>
> Unable to start tomcat 10.0.4 and getting error Failed to initialize
> component.
> /conf/server.xml configuration as below.
>
>  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=" " />
>
>  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/eNotice.key"
> keystorePass="eNotice@1" 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
> 

Unable to start Tomcat 10.0.4

2021-03-16 Thread dkumar
Dear All,

Unable to start tomcat 10.0.4 and getting error Failed to initialize 
component.
/conf/server.xml configuration as below. 






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 

Re: small error in log documentation

2021-03-16 Thread Mark Thomas

On 16/03/2021 02:48, Rob Sargent wrote:
Last sentence of Introduction on 
https://tomcat.apache.org/tomcat-9.0-doc/logging.html


    If it used directly or indirectly by your logging library then
    elements of it will be shared across web applications because it is
    loaded by the system class loader.

I think in needs to be "If it is used"


Agreed. Fixed for all versions and will be included in the next set of 
releases.


Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: module muddle

2021-03-16 Thread Mark Thomas

Rob,

Thanks for that info. It looks correct to me. You have defined the 
correct factory for Tomcat's own JDBC pool are you are correctly casting 
to an instance of a DataSource from that pool.


That caused me to go back and take a closer look at your original report.

It appears from the class loaders that you have placed the JAR for 
Tomcat's JDBC pool (tomcat-jdbc.jar) in WEB-INF/lib. That won't work - 
hence why you actually get the default Commons DBCP2 based pool. You 
need to place tomcat-jdbc.jar in $CATALINA_BASE/lib.


Mark


On 16/03/2021 02:34, Rob Sargent wrote:
A little late in responding to Mark's questions.  Been on a  short 
walk-about.


On 3/11/21 12:17 PM, Mark Thomas wrote:

On 11/03/2021 19:08, Rob Sargent wrote:
I've started getting this error, though I've been running fine since 
days of "localhost" issue help.


    class org.apache.tomcat.dbcp.dbcp2.BasicDataSource cannot be cast to
    class org.apache.tomcat.jdbc.pool.DataSource
    (org.apache.tomcat.dbcp.dbcp2.BasicDataSource is in unnamed module
    of loader 'app'; org.apache.tomcat.jdbc.pool.DataSource is in
    unnamed module of loader
    org.apache.catalina.loader.ParallelWebappClassLoader @33c9efd6)

I'm most confused by the "'app'" loader.   Who's is that?  I doesn't 
look like a TC thing.  I have a package called "app" which includes 
the main() of my embedded server.


Apologies as I'm not fully up on the modules notion and was 
blissfully getting by without dealing with that.  Until now. You can 
find me over in the Java Organization section of hell.


Which database connection pool do you want to use?

Tomcat's package renamed copy of Apache Commons DBCP
or
Tomcat's own JDBC Pool?

(there isn't much to choose between them these days).

How is the DataSource defined?


My context.xml is as follows

    
       
       
       
    


Do you know what code is triggering the failing cast?


   public DataSource getDataSource(String dbname) {
  DataSource lookupDS = null;
  try {
    InitialContext ic = new InitialContext();
    Context sgsContext  = (Context) ic.lookup("java:/comp/env");
//*** this next line is the cast which blows up.
    lookupDS = (org.apache.tomcat.jdbc.pool.DataSource) 
sgsContext.lookup("jdbc/sgsdb/"+dbname);

  }
  catch (javax.naming.NamingException ne) {
    lookupDS = null;
    log(ne.getMessage()); //TODO
  }
     return lookupDS;
   }



The app loader is one of the class loaders in the standard Java class 
loader hierarchy. I forget the exact details. Google should be able to 
tell you that.

Got it.


Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org