Results 1 to 6 of 6

Thread: Newbie Help: AMS agent does not discover JBOSS server instance

  1. #1

    Default Newbie Help: AMS agent does not discover JBOSS server instance

    Hi,
    I am new to JMX and AMS. I am trying to get AMS agent discover the JBoss server instance in AMS dashboard. I started the agent and it did not discover JBoss server. I have not yet configured my JBoss or AMS agent other than starting the two.

    Can you please point me to some documentation or steps highlighting how a JBoss server is auto discovered. I do not see the instance popping up in the inventory.

    What am I missing

    Thanks
    Pramod

  2. #2

    Default

    Hi,
    Can you check your agent log - located in AMS_HOME/agent-VERSION/log/agent.log for any Exceptions? Which version of JBoss server are you running? Which operating system are you running on?

    There is some documentation located in AMS_HOME/server-VERSION/doc/DOC/JBoss.html that might be helpful.

    Thanks,
    Jennifer Hickey
    SpringSource AMS Project Lead

  3. #3

    Default

    I am using JBoss 4.0.5. Running this on windows xp. I am not sure if this helped.
    Now, when I start JBoss with these additional arguments, I am able to see spring.application MBean in JConsole.


    VM arguments:*
    -Dcom.sun.management.jmxremote
    -Djboss.platform.mbeanserver
    -Djavax.management.builder.initial = org.jboss.system.server.jmx.MBeanServerBuilderImpl
    -Dspring.managed.application.name=itg

    When I check amsagent.log, I see the following exception:

    Are there additional arguments I need to pass when I start JBoss server. Please help.

    Thanks
    Pramod

    2008-10-21 15:06:25,895 ERROR [Thread-1] [RuntimeAutodiscoverer] Unexpected error running autodiscoverer for plugin: Spring Application: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection refused: connect]
    org.hyperic.hq.product.PluginException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection refused: connect]
    at org.hyperic.hq.product.jmx.MxServerDetector.discov erServiceTypes(MxServerDetector.java:443)
    at org.hyperic.hq.product.ServerDetector.discoverReso urces(ServerDetector.java:200)
    at org.hyperic.hq.autoinventory.agent.server.RuntimeA utodiscoverer.doRuntimeScan_internal(RuntimeAutodi scoverer.java:272)
    at org.hyperic.hq.autoinventory.agent.server.RuntimeA utodiscoverer.doRuntimeScan(RuntimeAutodiscoverer. java:205)
    at org.hyperic.hq.autoinventory.ScanManager.mainRunLo op(ScanManager.java:165)
    at org.hyperic.hq.autoinventory.ScanManager.access$00 0(ScanManager.java:41)
    at org.hyperic.hq.autoinventory.ScanManager$1.run(Sca nManager.java:107)
    Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection refused: connect]
    at javax.management.remote.rmi.RMIConnector.connect(U nknown Source)
    at javax.management.remote.JMXConnectorFactory.connec t(Unknown Source)
    at org.hyperic.hq.product.jmx.MxUtil.getMBeanConnecto r(MxUtil.java:445)
    at org.hyperic.hq.product.jmx.MxServerDetector.discov erServiceTypes(MxServerDetector.java:440)
    ... 6 more
    Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection refused: connect]
    at com.sun.jndi.rmi.registry.RegistryContext.lookup(U nknown Source)
    at com.sun.jndi.toolkit.url.GenericURLContext.lookup( Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at javax.management.remote.rmi.RMIConnector.findRMISe rverJNDI(Unknown Source)
    at javax.management.remote.rmi.RMIConnector.findRMISe rver(Unknown Source)
    ... 10 more
    Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection refused: connect
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknow n Source)
    at sun.rmi.transport.tcp.TCPChannel.createConnection( Unknown Source)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(Unk nown Source)
    at sun.rmi.server.UnicastRef.newCall(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    ... 15 more

  4. #4

    Default

    You shouldn't need to add the "spring.managed.application.name" or "jmxremote" system properties (you really shouldn't need to add any system properties). This will make AMS discover your server as a standalone application, and you'll miss out on all the JBoss-specific metrics. The error you sent me is due to the fact that the plugin for standalone applications needs to find the rest of the jmxremote URL (since you have the one jmxremote system property specified, but not the one with the remote port number).

    Did you have any errors in your agent.log prior to adding these system properties? Did you try the workaround for installpath documented in the JBoss.html I referenced?

    How exactly are you starting the JBoss server?

    Thanks,
    Jennifer

  5. #5

    Default

    Hi Jennifer,
    Thanks for a prompt response. I am still having trouble with agent recognizing jboss server instance. I am attaching log file (renamed it as agent.txt) and the properties file (agent-props.txt)- perhaps you can let me know what else could I be missing.

    Based on your suggestion, I am no longer setting -Dcom.sun.management.jmxremote and -Dspring.managed.application.name.

    I verfied that JConsole is able to display spring.application MBeans.

    Coming back to ams-agent -

    Environment:
    Windows

    How do I start JBoss
    We run org.jboss.Main -c kintana to start the jboss server

    Here are some of the VM Arguments
    VM arguments:*
    -Xmx250m -Xms250m -XX:PermSize=128m -XX:MaxPermSize=128m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,ad dress=1234
    -Djboss.platform.mbeanserver
    -Djavax.management.builder.initial =org.jboss.system.server.jmx.MBeanServerBuilderImp l
    -Djboss.lib.url = file:N:\Kintana\KntaDev\SourceCode\java\/target/jboss/lib/jboss/server
    -Djboss.home.dir =N:\Kintana\KntaDev\SourceCode\java\/target/jboss

    agent.properties
    # required to find jboss jars
    jboss.installpath=n:/kintana/kntadev/sourcecode/java/target/jboss





    Please let me know what else I am missing.

    Thanks
    Pramod
    Attached Files Attached Files

  6. #6

    Default

    The JBoss server discovery algorithm is a bit involved, I really need to see the exact Java command line you use to start the JBoss server (i.e. the full classpath and all system properties) in order to reproduce the issue. I have some ideas of what might be missing.

    Thanks,
    Jennifer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •