Xilai Dai created KARAF-3359:
--------------------------------

             Summary: Exception when try to update JMX ports with config:update 
command
                 Key: KARAF-3359
                 URL: https://issues.apache.org/jira/browse/KARAF-3359
             Project: Karaf
          Issue Type: Bug
          Components: karaf-config
    Affects Versions: 3.0.2
            Reporter: Xilai Dai


Got the exception below when try to update JMX ports with config:update command 
from console.

{code}
karaf@root()> config:edit --force org.apache.karaf.management
karaf@root()> config:property-set rmiRegistryPort 1101
karaf@root()> config:property-set rmiServerPort 44445
karaf@root()> config:update
karaf@root()> Exception in thread "JMX Connector Thread 
[service:jmx:rmi://0.0.0.0:44444/jndi/rmi://0.0.0.0:1099/karaf-r
oot]" java.lang.RuntimeException: Could not start JMX connector server
        at 
org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:258)
Caused by: java.io.IOException: Cannot bind to URL 
[rmi://0.0.0.0:1099/karaf-root]: javax.naming.CommunicationException
[Root exception is java.rmi.NoSuchObjectException: no such object in table]
        at 
javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:826)
        at 
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
        at 
org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:245)
Caused by: javax.naming.CommunicationException [Root exception is 
java.rmi.NoSuchObjectException: no such object in tabl
e]
        at 
com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:143)
        at 
com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:226)
        at javax.naming.InitialContext.bind(InitialContext.java:419)
        at 
javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:643)
        at 
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:426)
        ... 1 more
Caused by: java.rmi.NoSuchObjectException: no such object in table
        at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
        at 
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:378)
        at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
        at 
com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:137)
        ... 5 more
{code}

more bad thing is the serviceUrl property in the 
etc/org.apache.karaf.management.cfg has been updated to: 
{code}
serviceUrl = service:jmx:rmi://0.0.0.0:44444/jndi/rmi://0.0.0.0:1099/karaf-root
{code}

so even after restart karaf, it will still try to use the old JMX ports.

These commands work fine in karaf 2.3.x.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to