You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Merve Temizer <me...@gmail.com> on 2012/07/09 14:31:27 UTC

Trying to add domain

I only try to add domain but get connection refused exception: The command
line i tried, and below the exceptions:

sudo ./james-cli.sh -h localhost -p 9999 adddomain mydomain.tld

Output:

 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]
        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:357)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
        at org.apache.james.cli.probe.impl.JmxServerProbe.connect(JmxServerProbe.java:93)
        at org.apache.james.cli.probe.impl.JmxServerProbe.<init>(JmxServerProbe.java:68)
        at org.apache.james.cli.ServerCmd.main(ServerCmd.java:104)
    Caused by: javax.naming.ServiceUnavailableException [Root
exception is java.rmi.ConnectException: Connection refused to host:
localhost; nested exception is:
        java.net.ConnectException: Connection refused]
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118)
        at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203)
        at javax.naming.InitialContext.lookup(InitialContext.java:411)
        at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1924)
        at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1891)
        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:274)
        ... 4 more
    Caused by: java.rmi.ConnectException: Connection refused to host:
localhost; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
        at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:340)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:114)
        ... 9 more
    Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at java.net.Socket.<init>(Socket.java:425)
        at java.net.Socket.<init>(Socket.java:208)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
        ... 14 more

Re: Trying to add domain

Posted by Eric Charles <er...@apache.org>.
Start first the James server (james start), and then issue the 
james-cli.sh command.

Thx, Eric


On 07/09/2012 02:31 PM, Merve Temizer wrote:
> I only try to add domain but get connection refused exception: The command
> line i tried, and below the exceptions:
>
> sudo ./james-cli.sh -h localhost -p 9999 adddomain mydomain.tld
>
> Output:
>
>   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]
>          at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:357)
>          at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
>          at org.apache.james.cli.probe.impl.JmxServerProbe.connect(JmxServerProbe.java:93)
>          at org.apache.james.cli.probe.impl.JmxServerProbe.<init>(JmxServerProbe.java:68)
>          at org.apache.james.cli.ServerCmd.main(ServerCmd.java:104)
>      Caused by: javax.naming.ServiceUnavailableException [Root
> exception is java.rmi.ConnectException: Connection refused to host:
> localhost; nested exception is:
>          java.net.ConnectException: Connection refused]
>          at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118)
>          at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203)
>          at javax.naming.InitialContext.lookup(InitialContext.java:411)
>          at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1924)
>          at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1891)
>          at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:274)
>          ... 4 more
>      Caused by: java.rmi.ConnectException: Connection refused to host:
> localhost; nested exception is:
>          java.net.ConnectException: Connection refused
>          at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
>          at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
>          at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
>          at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:340)
>          at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
>          at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:114)
>          ... 9 more
>      Caused by: java.net.ConnectException: Connection refused
>          at java.net.PlainSocketImpl.socketConnect(Native Method)
>          at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
>          at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
>          at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
>          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
>          at java.net.Socket.connect(Socket.java:579)
>          at java.net.Socket.connect(Socket.java:528)
>          at java.net.Socket.<init>(Socket.java:425)
>          at java.net.Socket.<init>(Socket.java:208)
>          at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
>          at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
>          at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
>          ... 14 more
>

-- 
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org