Forum Stats

  • 3,837,912 Users
  • 2,262,306 Discussions
  • 7,900,431 Comments

Discussions

JConsole - able to monitor one service but not another

3351427
3351427 Member Posts: 2

Hi,

I'm trying to monitor JVM for VMWare services using Jconsole.

I'm able to connect to one of the VMWare Java services by adding these parameters in wrapper.conf and server.xml. The other files in this folder are tomcat.version, tomcat-users.xml etc. This is the only VMWare service that has these tomcat files.

wrapper.java.additional.10="-Dcom.sun.management.jmxremote"

wrapper.java.additional.11="-Dcom.sun.management.jmxremote.port=1104"

wrapper.java.additional.12="-Dcom.sun.management.jmxremote.ssl=false"

wrapper.java.additional.13="-Dcom.sun.management.jmxremote.authenticate=false"

wrapper.java.additional.14="-Djava.rmi.server.hostname=11.168.x.x"

wrapper.java.additional.15="-Dcom.sun.management.jmxremote.rmi.port=1104"

I try to add the same above parameters in another VMWAre Java service which only has the wrapper.conf in its C:\Program Files\VMware\vCenter Server\vapi\wrapper\conf  folder. The bin folder has wrapper.exe, heapsize_wrapper.bat, InstallApp-NT.bat and UnInstallApp-NT.bat

The same parameters doesn't work when trying to connect with Jconsole.

This is the log messages in jconsole for successful connection .

FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef2 [liveRef: [endpoint:[11.168.x.x:1104](remote),objID:[-21620763:1588deb491f:-7ffd, -1102704865881202253]]]]] getting connection...

Nov 22, 2016 4:43:38 PM RMIConnector connect

FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef2 [liveRef: [endpoint:[11.168.x.x:1104](remote),objID:[-21620763:1588deb491f:-7ffd, -1102704865881202253]]]]] getting class loader...

Nov 22, 2016 4:43:38 PM RMIConnector connect

FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef2 [liveRef: [endpoint:[11.168.x.x:1104](remote),objID:[-21620763:1588deb491f:-7ffd, -1102704865881202253]]]]] done...

Nov 22, 2016 4:43:38 PM ClientNotifForwarder addNotificationListener

FINER: Add the listener sun.tools.jconsole.MBeansTab[,2,25,879x659,hidden,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777217,maximumSize=,minimumSize=,preferredSize=] at JMImplementation:type=MBeanServerDelegate

Nov 22, 2016 4:43:38 PM ClientNotifForwarder init

FINER: Initializing...

For the failure case.

FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[11.168.x.x:1101](remote),objID:[-3a8e99ae:1588de5e1ef:-7fff, -759730255104932034]]]]] getting class loader...

Nov 22, 2016 4:50:09 PM RMIConnector connect

FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[11.168.x.x:1101](remote),objID:[-3a8e99ae:1588de5e1ef:-7fff, -759730255104932034]]]]] failed to connect: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:

  java.net.ConnectException: Connection refused: connect

Nov 22, 2016 4:50:09 PM RMIConnector close

FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[11.168.x.x:1101](remote),objID:[-3a8e99ae:1588de5e1ef:-7fff, -759730255104932034]]]]] closing.

Nov 22, 2016 4:50:09 PM ClientNotifForwarder terminate

FINER: Terminating...

Nov 22, 2016 4:50:09 PM RMIConnector close

FINER: [javax.management.remote.rmi.RMIConnector: rmiServer=RMIServerImpl_Stub[UnicastRef [liveRef: [endpoint:[11.168.x.x:1101](remote),objID:[-3a8e99ae:1588de5e1ef:-7fff, -759730255104932034]]]]] RMI Notification client terminated.

Also for the failure case,. this is displayed showing connection is successful.

PS U:\> netstat -an | Findstr 1102

  TCP    0.0.0.0:1102           0.0.0.0:0              LISTENING

  TCP    11.168.x.x:1102      11.248.x.x:61754    ESTABLISHED

  TCP    11.168.x.x:1102      11.248.x.x:61755    ESTABLISHED

  TCP    [::]:1102              [::]:0                 LISTENING

I have opened a case ticket with VMWare also for this issue, but they are unable to solve. I would like to dig deeper as to what might be the cause of this issue. I have doubt that somethings are not getting bound properly like hostname or port when the service starts,. I would like to know how I can find that out? Please let me know of any commands and your thoughts,.

Thanks,

Best Answer

  • 3351427
    3351427 Member Posts: 2
    edited Dec 12, 2016 2:09PM Answer ✓

    The issue was because this was missing the parameter.

    <span class="pun" style="color: #303336;">-</span><span class="typ" style="color: #2b91af;">Dcom</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">sun</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">management</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">jmxremote</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">local</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">only</span><span class="pun" style="color: #303336;">=</span><span class="kwd" style="color: #101094;">true</span>

    This is not there in the documentation anywhere. I think Oracle needs to document things properly. This cost me 1 month of time.

Answers

  • 3351427
    3351427 Member Posts: 2
    edited Dec 12, 2016 2:09PM Answer ✓

    The issue was because this was missing the parameter.

    <span class="pun" style="color: #303336;">-</span><span class="typ" style="color: #2b91af;">Dcom</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">sun</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">management</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">jmxremote</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">local</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">only</span><span class="pun" style="color: #303336;">=</span><span class="kwd" style="color: #101094;">true</span>

    This is not there in the documentation anywhere. I think Oracle needs to document things properly. This cost me 1 month of time.

This discussion has been closed.