tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: InvocationTargetException on startup after upgrade to 8.5.13
Date Mon, 03 Apr 2017 09:39:24 GMT
2017-04-03 11:51 GMT+03:00 Frank Taffelt <Frank.Taffelt@interface-projects.de>:
> after upgrading from 8.5.12 to 8.5.13 the following exception is thrown on startup.
>
> WARNING: IntrospectionUtils: InvocationTargetException for class org.apache.coyote.http11.Http11NioProtocol
ciphers)
> java.lang.reflect.InvocationTargetException
>         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.tomcat.util.IntrospectionUtils.getProperty(IntrospectionUtils.java:196)
>         at org.apache.catalina.connector.Connector.getProperty(Connector.java:272)
>         at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at org.apache.tomcat.util.IntrospectionUtils.getProperty(IntrospectionUtils.java:211)
>         at org.apache.catalina.mbeans.ConnectorMBean.getAttribute(ConnectorMBean.java:88)
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
>         at io.prometheus.jmx.JmxScraper.scrapeBean(JmxScraper.java:138)
>         at io.prometheus.jmx.JmxScraper.doScrape(JmxScraper.java:107)
>         at io.prometheus.jmx.JmxCollector.collect(JmxCollector.java:320)
>         at io.prometheus.client.CollectorRegistry.collectorNames(CollectorRegistry.java:99)
>         at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:50)
>         at io.prometheus.client.Collector.register(Collector.java:128)
>         at io.prometheus.client.Collector.register(Collector.java:121)
>         at de.ifbus.intergator.metrics.JMXMetrics.register(JMXMetrics.java:33)
>         at de.ifbus.intergator.servlet.MetricsModule.configureServlets(MetricsModule.java:34)
>         at com.google.inject.servlet.ServletModule.configure(ServletModule.java:55)
>         at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
>         at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
>         at com.google.inject.spi.Elements.getElements(Elements.java:110)
>         at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
>         at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
>         at com.google.inject.Guice.createInjector(Guice.java:99)
>         at com.google.inject.Guice.createInjector(Guice.java:73)
>         at com.google.inject.Guice.createInjector(Guice.java:62)
>         at de.ifbus.intergator.servlet.AppServletContextListener.getInjector(AppServletContextListener.java:18)
>         at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
>         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: java.lang.NullPointerException
>         at org.apache.tomcat.util.net.AbstractEndpoint.addSslHostConfig(AbstractEndpoint.java:215)
>         at org.apache.coyote.http11.AbstractHttp11Protocol.registerDefaultSSLHostConfig(AbstractHttp11Protocol.java:439)
>         at org.apache.coyote.http11.AbstractHttp11Protocol.getCiphers(AbstractHttp11Protocol.java:566)
>         ... 42 more
> Caused by: java.lang.IllegalArgumentException: java.lang.NullPointerException
>         at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:114)
>         at org.apache.tomcat.util.net.AbstractEndpoint.addSslHostConfig(AbstractEndpoint.java:213)
>         ... 44 more
> Caused by: java.lang.NullPointerException
>         at java.io.FileInputStream.<init>(FileInputStream.java:130)
>         at java.io.FileInputStream.<init>(FileInputStream.java:93)
>         at java.io.FileReader.<init>(FileReader.java:58)
>         at org.apache.tomcat.util.net.jsse.PEMFile.<init>(PEMFile.java:74)
>         at org.apache.tomcat.util.net.jsse.JSSEUtil.getKeyManagers(JSSEUtil.java:193)
>         at org.apache.tomcat.util.net.openssl.OpenSSLUtil.getKeyManagers(OpenSSLUtil.java:79)
>         at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:112)
>         ... 45 more
>
> as my app is running normally this seems more like a minor issue ?

It looks that
1. Some tool enumerates JMX properties
// at io.prometheus.jmx.JmxScraper.scrapeBean(JmxScraper.java:138)

2. It calls AbstractHttp11Protocol.getCiphers()
// at org.apache.coyote.http11.AbstractHttp11Protocol.getCiphers(AbstractHttp11Protocol.java:566)

3. This getter has a side-effect.
It callsAbstractHttp11Protocol.registerDefaultSSLHostConfig()

Note that this happens when Tomcat is already running. The call is
from a web application.

This results in NPE trying to read a key file. I guess that this
connector is configured to use plain HTTP, not HTTPS.

A getter method should not have such side-effect.

Best regards,
Konstantin Kolinko

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


Mime
View raw message