Hi,
It seems that localhost is resolved to 64.95.64.218.
Is this correct? Can you try connection to -h 127.0.0.1?
Thx, Eric
On 27/11/2012 20:47, Michael J. Hammel wrote:
Hi there. I've built a system with the James server on my desktop
system (Fedora 16, x86-64) and it works fine. I can add users, list
domains, etc, with james-cli.sh. I've written a mailet that works just
fine too.
I installed a duplicate system (sans the new mailet) on a laptop (Fedora
16, i686) to give a demo. I can start the James server on the laptop
and see no errors in the james-server.log. If I try to use
james-cli.sh, the tool pauses for a long time and then I get this
connection failure:
$ ./james-cli.sh -h localhost -p 9999 listdomains
Error connecting to remote JMX agent!
java.rmi.ConnectException: Connection refused to host: 64.95.64.218;
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.invoke(UnicastRef.java:110)
at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown
Source)
at
javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2327)
at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:279)
at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
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: 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)
... 10 more
First, I can't find any reason it would try to connect to that IP
address. It isn't ours and is not configured in my hosts file nor in our
local DNS. Second, I've tried using the loopback IP instead of
"localhost" but that doesn't change anything. My hosts file does list
an IPV4 loopback and does not have an IPV6 loopback (I commented it out
since it often causes other problems). There is no firewall running on
the laptop.
I can telnet to port 25 and perform the install test successfully.
Sendmail is not running and the responses from the server show that I'm
connected to the James server.
I've tried running james-cli.sh from a new sh without inheriting my
environment but that didn't change anything.
I'm not sure what port James should be on. 9999 was what worked with a
default configuration on my desktop. Browsing through the wrapper.log I
see it referencing a port 32000:
Laptop:
DEBUG | wrapperp | 2012/11/27 11:59:51 | server listening on port
32000.
Trying port 32000 still fails, but with a slightly different error
message:
Error connecting to remote JMX agent!
java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.CommunicationException [Root exception is
java.rmi.ConnectIOException: error during JRMP connection establishment;
nested exception is:
java.net.SocketTimeoutException: Read timed out]
at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:338)
at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
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.CommunicationException [Root exception is
java.rmi.ConnectIOException: error during JRMP connection establishment;
nested exception is:
java.net.SocketTimeoutException: Read timed out]
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
at
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
at
javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
... 4 more
Caused by: java.rmi.ConnectIOException: error during JRMP connection
establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
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
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
... 9 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at java.io.DataInputStream.readByte(DataInputStream.java:248)
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228)
... 13 more
Something tells me this is some simple network configuration issue,
either with the laptop itself or maybe in the James config files, but I
just can't seem to find it. Any suggestions?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]