gpt4 book ai didi

java - 无法在 Tomcat 中连接 jmxmp

转载 作者:行者123 更新时间:2023-11-28 23:47:36 33 4
gpt4 key购买 nike

在我的 spring + tomcat 解决方案中,我遇到了 jmxmp 连接问题。

我在 tomcat 中启用了 jmx + 添加了 jmxremote_optional.jar

这是manager.log

INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=Code Cache CollectionUsageThreshold

javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: CollectionUsage threshold is not supported

05.09.2012 16:33:13 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=Code Cache CollectionUsageThresholdCount javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: CollectionUsage threshold is not supported

05.09.2012 16:33:13 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=Code Cache CollectionUsageThresholdExceeded javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: CollectionUsage threshold is not supported

05.09.2012 16:33:13 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute Catalina:type=Resource,resourcetype=Global,class=org.apache.catalina.UserDatabase,name="UserDatabase" modelerType javax.management.AttributeNotFoundException: Cannot find attribute modelerType

05.09.2012 16:33:13 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=PS Eden Space UsageThreshold javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: Usage threshold is not supported

05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=PS Eden Space UsageThresholdCount javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: Usage threshold is not supported

05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=PS Eden Space UsageThresholdExceeded javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: Usage threshold is not supported

05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=PS Survivor Space UsageThreshold javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: Usage threshold is not supported

05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=PS Survivor Space UsageThresholdCount javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: Usage threshold is not supported

05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=PS Survivor Space UsageThresholdExceeded javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: Usage threshold is not supported

05.09.2012 16:33:50 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=Code Cache CollectionUsageThreshold javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: CollectionUsage threshold is not supported 05.09.2012 16:33:50 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=Code Cache CollectionUsageThresholdCount javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: CollectionUsage threshold is not supported 05.09.2012 16:33:50 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=Code Cache Collecti

这是spring con.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd"
default-lazy-init="true">
<bean id="test" class="test.Test" />
<!-- <bean class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" />
</bean> -->
<bean id="serverConnector" class="org.springframework.jmx.support.ConnectorServerFactoryBean"/>
<bean class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="assembler">
<bean class="org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler" >
<property name="managedMethods">
<list>
<value>getVal</value>
<value>setVal</value>
</list>
</property>
</bean>
</property>
<property name="beans">
<map>
<entry key="bean:name=Test" value-ref="test"/>
</map>
</property>
</bean>
</beans>

这是java bean

public class Test {
private String val = "";
public String getVal() {
return val;
}
public void setVal(String v) {
val = v;
}
}

最佳答案

我会回答我自己的问题:)。

问题是,端口 9875(jmxmp 的默认端口)被另一个服务使用。希望它能帮助其他人并节省他的时间

关于java - 无法在 Tomcat 中连接 jmxmp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12283207/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com