Why fuse log shows cannot bind to URL [rmi://localhost:1099/jmxrmi] message?
Issue
- In our logs we are seeing this error message:
2015-04-08 10:29:46,287 WARN (JMX connector) [org.apache.activemq.broker.jmx.ManagementContext] : Failed to start JMX connector Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException: jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]. Will restart management to re-create JMX connector, trying to remedy this issue.
-
We have configured all the appropriate settings in
"etc/org.apache.karaf.management.cfg"rmiRegistryHost = 10.10.10.10 rmiRegistryPort = 2099 rmiServerHost = 10.10.10.10 rmiServerPort = 44445- These above settings seem to be honored according to netstat:
sudo netstat -pltun | grep <pid> tcp 0 0 10.10.10.10:2099 0.0.0.0:* LISTEN 17119/java tcp 0 0 0.0.0.0:1099 0.0.0.0:* LISTEN 17119/java -
What i dont understand is why i still see "1099" port in the above line in
netstatoutput: -
I want to know why the above error is occuring and why my container is still listening on that port for all IPs on the system. This is an issue for our qa environments because we have mulitple QAs (1 per release) on a single host (each qa env binds to its own IP address)
2015-04-08 14:22:21,211 DEBUG (FelixStartLevel) [org.apache.activemq.broker.jmx.ManagementContext] : Creating RMIRegistry on port 1099
2015-04-08 14:22:21,220 DEBUG (FelixStartLevel) [org.apache.activemq.broker.jmx.ManagementContext] : Probably not using JRE 1.4: mx4j.tools.naming.NamingService not found by org.apache.activemq.activemq-osgi [131]
2015-04-08 14:22:21,221 DEBUG (FelixStartLevel) [org.apache.activemq.broker.jmx.ManagementContext] : Created JMXConnectorServer javax.management.remote.rmi.RMIConnectorServer@399c4948
2015-04-08 14:22:21,227 DEBUG (JMX connector) [org.apache.activemq.broker.jmx.ManagementContext] : Starting JMXConnectorServer...
2015-04-08 14:22:21,268 INFO (JMX connector) [org.apache.activemq.broker.jmx.ManagementContext] : JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
- This appears even if i define my embedded broker with
"useJmx=false"i have tried configuring the RMI server at the JVM level using properties such as the following:
-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=10.10.10.10 -Dcom.sun.management.jmxremote.port=2099 -Djava.rmi.activation.port=15098
but above causes port conflict issues:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 2099; nested exception is:
java.net.BindException: Address already in use
- Is this issure related to [https://issues.jboss.org/browse/ENTMQ-349] and [https://issues.apache.org/jira/browse/AMQ-4609] however i am ordering my activemq.xml file as suggested. also, it seems that i am using the patched version of activemq, namely 5.9.0 (provided in fuse 6.1). additionally, looking at the code fix for that jira, it would only register the network connector if jmx is enabled:
if (isUseJmx()) {
registerNetworkConnectorMBean(connector);
}
- I am still seeing this port open when i haev
useJmx=false. I even tried removingactivemq.xmlentirely from the etc dir and i still saw"Creating RMIRegistry on port 1099"in the logs.
Environment
- Red Hat JBoss Fuse
- 6.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.