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

In Tomcat Version 10.1.19 Spring Boot 3.2.4 Tomcat Bean Name Is Tomca… #1269

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

sethAmazon
Copy link
Contributor

@sethAmazon sethAmazon commented Apr 12, 2024

…t And Not Catalina

Description:
Not getting metrics for Tomcat Version 10.1.19 Spring Boot 3.2.4.

2024-04-12T13:33:00Z D! {"caller":"subprocess/subprocess.go:280","msg":"Apr 12, 2024 1:33:00 PM org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite doInvoke","kind":"receiver","name":"jmx/0","data_type":"metrics"}
2024-04-12T13:33:00Z D! {"caller":"subprocess/subprocess.go:280","msg":"WARNING: Failed to fetch MBean Catalina:type=Manager,host=localhost,context=*.","kind":"receiver","name":"jmx/0","data_type":"metrics"}
2024-04-12T13:33:00Z D! {"caller":"subprocess/subprocess.go:280","msg":"Apr 12, 2024 1:33:00 PM java_util_logging_Logger$warning$0 call","kind":"receiver","name":"jmx/0","data_type":"metrics"}
2024-04-12T13:33:00Z D! {"caller":"subprocess/subprocess.go:280","msg":"WARNING: No active MBeans.  Be sure to fetch() before updating any applicable instruments.","kind":"receiver","name":"jmx/0","data_type":"metrics"}
2024-04-12T13:33:00Z D! {"caller":"subprocess/subprocess.go:280","msg":"Apr 12, 2024 1:33:00 PM org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite doInvoke","kind":"receiver","name":"jmx/0","data_type":"metrics"}
2024-04-12T13:33:00Z D! {"caller":"subprocess/subprocess.go:280","msg":"WARNING: Failed to fetch MBean Catalina:type=GlobalRequestProcessor,name=*.","kind":"receiver","name":"jmx/0","data_type":"metrics"}
2024-04-12T13:33:00Z D! {"caller":"subprocess/subprocess.go:280","msg":"Apr 12, 2024 1:33:00 PM java_util_logging_Logger$warning$0 call","kind":"receiver","name":"jmx/0","data_type":"metrics"}
2024-04-12T13:33:00Z D! {"caller":"subprocess/subprocess.go:280","msg":"WARNING: No active MBeans.  Be sure to fetch() before updating any applicable instruments.","kind":"receiver","name":"jmx/0","data_type":"metrics"}
2024-04-12T13:33:00Z D! {"caller":"subprocess/subprocess.go:280","msg":"WARNING: Failed to fetch MBean Catalina:type=ThreadPool,name=*.","kind":"receiver","name":"jmx/0","data_type":"metrics"}
[ec2-user@ip-172-31-57-2 ~]$ sudo java --add-exports jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED -jar jmxterm-1.0.2-uber.jar -v verbose
Delete /root/.jmxterm_history if you encounter error right after launching me.
Welcome to JMX terminal. Type "help" for available commands.
$>open 495425
#Connection to 495425 is opened
$>beans
#domain = JMImplementation:
JMImplementation:type=MBeanServerDelegate
#domain = Tomcat:
Tomcat:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Filter,name=Tomcat WebSocket (JSR356) Filter
Tomcat:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Filter,name=characterEncodingFilter
Tomcat:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Filter,name=formContentFilter
Tomcat:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Filter,name=requestContextFilter
Tomcat:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Filter,name=webMvcObservationFilter
Tomcat:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Servlet,name=dispatcherServlet
Tomcat:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/
Tomcat:context=/,host=localhost,name=Cache,type=WebResourceRoot
Tomcat:context=/,host=localhost,name=NonLoginAuthenticator,type=Valve
Tomcat:context=/,host=localhost,name=StandardContextValve,type=Valve
Tomcat:context=/,host=localhost,type=Loader
Tomcat:context=/,host=localhost,type=Manager
Tomcat:context=/,host=localhost,type=NamingResources
Tomcat:context=/,host=localhost,type=TomcatEmbeddedWebappClassLoader
Tomcat:context=/,host=localhost,type=WebResourceRoot
Tomcat:host=localhost,name=ErrorReportValve,type=Valve
Tomcat:host=localhost,name=StandardHostValve,type=Valve
Tomcat:host=localhost,type=Host
Tomcat:name="http-nio-8090",type=GlobalRequestProcessor
Tomcat:name="http-nio-8090",type=SocketProperties
Tomcat:name="http-nio-8090",type=ThreadPool
Tomcat:name=StandardEngineValve,type=Valve
Tomcat:port=8090,type=Connector
Tomcat:port=8090,type=ProtocolHandler
Tomcat:realmPath=/realm0,type=Realm
Tomcat:type=Engine
Tomcat:type=MBeanFactory
Tomcat:type=Mapper
Tomcat:type=NamingResources
Tomcat:type=Server
Tomcat:type=Service
Tomcat:type=StringCache
Tomcat:type=UtilityExecutor

Existing Issue(s):
#1270

Testing:
Build jar. Create hacked collector version that does not check hash and version number of jar. Start Collector and see metrics in CW.
Screenshot 2024-04-12 at 9 45 59 AM

Documentation:
N/A

Outstanding items:

@sethAmazon
Copy link
Contributor Author

@breedx-splk can you please review. I see you own this file.

@breedx-splk
Copy link
Contributor

resolves #1270

@breedx-splk
Copy link
Contributor

Hey @sethAmazon thanks for the PR. I don't see anything immediately concerning/problematic with it, however I would like to confirm that this really is the case. Can you help to explain maybe how spring boot enters into this? I'm unclear about that.

I downloaded and ran tomcat 10.1.19 and the management bean was still named Catalina. Is the app you were testing with available as a repro somewhere?

@laurit
Copy link
Contributor

laurit commented Apr 16, 2024

@breedx-splk Also see open-telemetry/opentelemetry-java-instrumentation#10115

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, given the similar changes in instrumentation, this seems like a good improvement. Thanks again.

@breedx-splk breedx-splk merged commit 07f0cbe into open-telemetry:main Apr 16, 2024
14 checks passed
@sethAmazon sethAmazon deleted the new-tomcat-bean-name branch April 17, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants