Open tbm48813 opened 6 months ago
I would love to see the "Steps to Reproduce" expanded here, because "Configure Tomcat with a HTTP and HTTPS listener" sounds less than trivial. 😅
Steps to reproduce:
Install tomcat with its default configuration file.
Create a certificate for use with the https listener openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365
Add or uncomment the example https listener in server.xml and change the certificate settings
` <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateFile="conf/cert.pem"
certificateKeyFile="conf/key.pem" />
</SSLHostConfig>
</Connector>`
Have not tried but I would expect we would run into the same problem if we added 2 http listeners on different ports aswell.
I think this is the same issue as https://github.com/open-telemetry/opentelemetry-java-contrib/issues/1360. It's only keeping the first MBean it gets and dropping the rest.
Component(s)
jmx-metrics
What happened?
Description
If Tomcat has two listeners configured, one HTTP and one HTTPS, it will only gather metrics from the HTTP listener.
Steps to Reproduce
Configure Tomcat with a HTTP and HTTPS listener. It will only pull metrics from HTTP unless you disable the HTTP listener, then it will then pull metrics from the HTTPS listener.
Expected Result
It should get metrics from all the listeners, which I verified is visible through JConsole.
Actual Result
It only gets metrics from the http listener.
Component version
JMX v0.96.0, Java Contrib v1.28.0
Log output
No response
Additional context
No response