2016-12-19 1 views
0

큐 모니터링을 위해 Jboss 퓨즈 컨테이너에 JMX rmi url을 연결하려고했습니다. jconsole에 연결하지 의 URL, 내 번들에 구현하려는 JBoss 퓨즈 JMX가 작동하지 않습니다.

service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel 

이 어떻게 JBoss의 퓨즈에서의 MBean 서버를 연결하는?

사전 감사.

답변

0

마지막으로 karaf 사용자 이름과 암호 문제를 해결했습니다. users.properties 파일에서 사용자 이름과 암호를 확인하십시오.

service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root 

그래야합니다.

JMXServiceURL url = new JMXServiceURL(serviceURL); 
    HashMap<String, String[]> environment = new HashMap<String, String[]>(); 
     String username = "admin"; 
     String password = "admin"; 
     String[] credentials = new String[] { username, password }; 
     environment.put("jmx.remote.credentials", credentials); 

     connectorServer = JMXConnectorFactory.connect(url,environment); 
0

IMHO URL이 잘못되었습니다.

org.apache.karaf.management.cfg에서 서버의 현재 설정을 볼 수 있습니다. 예를 들어

:

# 
# Port number for RMI registry connection 
# 
rmiRegistryPort = 1099 

# 
# Host for RMI registry 
# 
rmiRegistryHost = 0.0.0.0 

# 
# Port number for RMI server connection 
# 
rmiServerPort = 44444 

# 
# Host for RMI server 
# 
rmiServerHost = 0.0.0.0 

# 
# Name of the JAAS realm used for authentication 
# 
jmxRealm = karaf 

# 
# The service URL for the JMXConnectorServer 
# 
serviceUrl = service:jmx:rmi://${rmiServerHost}:${rmiServerPort}/jndi/rmi://${rmiRegistryHost}:${rmiRegistryPort}/karaf-${karaf.name} 

# 
# Whether any threads started for the JMXConnectorServer should be started as daemon threads 
# 
daemon = true 

# 
# Whether the JMXConnectorServer should be started in a separate thread 
# 
threaded = true 

# 
# The ObjectName used to register the JMXConnectorServer 
# 
objectName = connector:name=rmi 

내 경우 URL에이 service:jmx:rmi://0.0.0.0:44444/jndi/rmi://0.0.0.0:1099/karaf-root

P.S.처럼 보인다 그리고 사용자 이름과 암호를 지정하는 것을 잊지 마십시오.

관련 문제