Paolo Santarsiero wrote:
I use 8080 port because it's sure open on server (I used it for tomcat
direct access).

I believe the monitor port has to be a different one from the http request port, so if 8080 is the one your app is listening on, it won't work for monitoring.



2009/12/14 Pid <p...@pidster.com>

On 14/12/2009 10:04, Paolo Santarsiero wrote:

Thanks for answer, but don't solve. I executed jconsole in debug mode and
the eception stack is this:

Firewall settings interfering?
Is the server actually listening on the port you set?


p



 java.rmi.ConnectException: Connection refused to host: xxx.xxx.xxx.xxx;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at sun.tools.jconsole.ProxyClient.checkSslConfig(ProxyClient.java:217)
at sun.tools.jconsole.ProxyClient.<init>(ProxyClient.java:110)
at sun.tools.jconsole.ProxyClient.getProxyClient(ProxyClient.java:463)
at sun.tools.jconsole.JConsole$3.run(JConsole.java:510)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.<init>(Socket.java:372)
at java.net.Socket.<init>(Socket.java:186)
at

sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at

sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
... 8 more


2009/12/14 trucbinh<trucb...@gmail.com>

 Hi,
   I think you should add this line
-Djava.rmi.server.hostname=192.168.1.12
like this


     -Dcom.sun.management.jmxremote.port=8080 \
     -Dcom.sun.management.jmxremote.ssl=false \
     -Dcom.sun.management.jmxremote.authenticate=true \
     -Djava.rmi.server.hostname=192.168.1.12

     192.168.1.12 is your tomcat server address.
Regards,
Binh.



On 12/14/2009 4:11 PM, Paolo Santarsiero wrote:

 Hello, I'm tryng to monitor my JVM and so Tomcat HeapMemory usage by
remote
access using VisualVM. I configured all, but my client always display an
error message (" Cannoct connect using
service:jmx:rmi:///jndi/rmi://xxx.xxx.xxx.xxx.:8080:jmxrmi").
I added in catalina.sh this Java options:
elif [ "$1" = "start" ] ; then

  shift
  touch "$CATALINA_BASE"/logs/catalina.out
  if [ "$1" = "-security" ] ; then
    echo "Using Security Manager"
    shift
     "$_RUNJAVA" "$LOGGING_CONFIG" $JAVA_OPTS \
     #START JMXREMOTE OPTIONS
      -Dcom.sun.management.jmxremote.port=8080 \
      -Dcom.sun.management.jmxremote.ssl=false \
      -Dcom.sun.management.jmxremote.authenticate=true \
     #END JMXREMOTE OPTIONS
      $CATALINA_OPTS \
      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH"
\
      -Djava.security.manager \
      -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
      -Dcatalina.base="$CATALINA_BASE" \
      -Dcatalina.home="$CATALINA_HOME" \
      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
      org.apache.catalina.startup.Bootstrap "$@" start \
      >>   "$CATALINA_BASE"/logs/catalina.out 2>&1&

      if [ ! -z "$CATALINA_PID" ]; then
        echo $!>   $CATALINA_PID
      fi
  else
      "$_RUNJAVA" "$LOGGING_CONFIG" $JAVA_OPTS \
     #START JMXREMOTE OPTIONS
      -Dcom.sun.management.jmxremote.port=8080 \
      -Dcom.sun.management.jmxremote.ssl=false \
      -Dcom.sun.management.jmxremote.authenticate=true \
      #END JMXREMOTE OPTIONS
      $CATALINA_OPTS \
      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH"
\
      -Dcatalina.base="$CATALINA_BASE" \
      -Dcatalina.home="$CATALINA_HOME" \
      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
      org.apache.catalina.startup.Bootstrap "$@" start \
      >>   "$CATALINA_BASE"/logs/catalina.out 2>&1&

      if [ ! -z "$CATALINA_PID" ]; then
        echo $!>   $CATALINA_PID
      fi
  fi


-----------------------------------------------------------------------------------------------------------------------------------------------
In JRE_Home/management i modified jmxremote.password and added rights
passwords for access roles.
My Tomcat version is 6 and Java1.5. In server.xml  I disabled HTTP
connector
in order to free use 8080 port for jmx.
I hope you can help me, thanks.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to