1 Reply Latest reply: Jun 10, 2011 4:55 AM by 866872 RSS

    : cannot start jstatd

    866872
      Hello,

      i'm also having problems to start the jstatd.

      i already tried all examples listed in jstatd man, but i always get exception when i try to start this daemon.

      the command i'm using is:

      $ jstatd -p 1234 -J-Djava.security.policy=jstatd.all.policy -J-Djava.rmi.server.logCalls=true

      i also tried a diferent range of ports. and the execption I get is:


      Connection refused to host: 127.0.1.1; nested exception is:
           java.net.ConnectException: Connection timed out
      java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:
           java.net.ConnectException: Connection timed out
           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.rebind(Unknown Source)
           at java.rmi.Naming.rebind(Naming.java:160)
           at sun.tools.jstatd.Jstatd.bind(Jstatd.java:40)
           at sun.tools.jstatd.Jstatd.bind(Jstatd.java:49)
           at sun.tools.jstatd.Jstatd.main(Jstatd.java:126)
      Caused by: java.net.ConnectException: Connection timed out
           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:529)
           at java.net.Socket.connect(Socket.java:478)
           at java.net.Socket.<init>(Socket.java:375)
           at java.net.Socket.<init>(Socket.java:189)
           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

      the policy file is : jstatd.all.policy


      grant codebase "file:${java.home}/../lib/tools.jar" {

      permission java.security.AllPermission;

      };


      and, finnaly, I'm running this on a Ubuntu 10.04 LTS

      does anyone know how to solve this problem?

      thanks