Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JMX: Tomcat only collecting metrics from one listener at a time #1236

Open
tbm48813 opened this issue Mar 25, 2024 · 3 comments
Open

JMX: Tomcat only collecting metrics from one listener at a time #1236

tbm48813 opened this issue Mar 25, 2024 · 3 comments

Comments

@tbm48813
Copy link

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

@breedx-splk
Copy link
Contributor

I would love to see the "Steps to Reproduce" expanded here, because "Configure Tomcat with a HTTP and HTTPS listener" sounds less than trivial. 😅

@per-lind
Copy link

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"> <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> <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.

@jefchien
Copy link
Contributor

jefchien commented Jul 8, 2024

I think this is the same issue as #1360. It's only keeping the first MBean it gets and dropping the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants