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 "Michael J. Hammel" <Mi...@coloradoengineeringinc.com> on 2012/11/27 21:47:43 UTC
server running but can't connect?
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?
--
Michael J. Hammel
Mike.Hammel@coloradoengineeringinc.com
Exports of information/data contained herein may be subject to the
export laws of the United States including, but not limited to, the US
International Traffic in Arms Regulations (ITAR) and may require advance
authorization from the U.S. Government. The parties shall not export,
disclose or transfer any such data directly or indirectly without
compliance with this or any other applicable laws and regulations.
CONFIDENTIALITY NOTICE: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and
contains information that is confidential and proprietary to Colorado
Engineering Incorporated. It is to be used solely for the purpose of
furthering the parties' business relationship. All unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: server running but can't connect?
Posted by Eric Charles <er...@apache.org>.
Glad to read all is fine now :)
Thx for closing the loop,
Eric
On 28/11/2012 22:53, Michael J. Hammel wrote:
> On Wed, 2012-11-28 at 10:43 -0500, Michael J. Hammel wrote:
>> On Wed, 2012-11-28 at 01:47 -0500, Eric Charles wrote:
>>> 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?
>>
>> Well, it seems that way if I run james-cli.sh. But I can ping localhost
>> and get back the loopback IP address. So I'm not sure why James is
>> routing to that address.
>>
>> I can't find the cause, so I'm punting: reinstall the OS and reinstall
>> James from the tarball (none of my changes applied). If it still does
>> it, then its likely an incompatibility with the 32bit version of F16.
>> Something tells me this will work and that my previous installs were
>> just fubar.
>
> For completeness sake:
>
> A reinstall of the OS and loading James manually and testing at each
> point along the way worked. James is running fine on my F16 i686 laptop
> now.
>
> I have no idea what was wrong before. But at least whatever it was,
> it's fixed.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: server running but can't connect?
Posted by "Michael J. Hammel" <Mi...@coloradoengineeringinc.com>.
On Wed, 2012-11-28 at 10:43 -0500, Michael J. Hammel wrote:
> On Wed, 2012-11-28 at 01:47 -0500, Eric Charles wrote:
> > 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?
>
> Well, it seems that way if I run james-cli.sh. But I can ping localhost
> and get back the loopback IP address. So I'm not sure why James is
> routing to that address.
>
> I can't find the cause, so I'm punting: reinstall the OS and reinstall
> James from the tarball (none of my changes applied). If it still does
> it, then its likely an incompatibility with the 32bit version of F16.
> Something tells me this will work and that my previous installs were
> just fubar.
For completeness sake:
A reinstall of the OS and loading James manually and testing at each
point along the way worked. James is running fine on my F16 i686 laptop
now.
I have no idea what was wrong before. But at least whatever it was,
it's fixed.
--
Michael J. Hammel
Mike.Hammel@coloradoengineeringinc.com
Exports of information/data contained herein may be subject to the
export laws of the United States including, but not limited to, the US
International Traffic in Arms Regulations (ITAR) and may require advance
authorization from the U.S. Government. The parties shall not export,
disclose or transfer any such data directly or indirectly without
compliance with this or any other applicable laws and regulations.
CONFIDENTIALITY NOTICE: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and
contains information that is confidential and proprietary to Colorado
Engineering Incorporated. It is to be used solely for the purpose of
furthering the parties' business relationship. All unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: server running but can't connect?
Posted by "Michael J. Hammel" <Mi...@coloradoengineeringinc.com>.
On Wed, 2012-11-28 at 01:47 -0500, Eric Charles wrote:
> 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?
Well, it seems that way if I run james-cli.sh. But I can ping localhost
and get back the loopback IP address. So I'm not sure why James is
routing to that address.
I can't find the cause, so I'm punting: reinstall the OS and reinstall
James from the tarball (none of my changes applied). If it still does
it, then its likely an incompatibility with the 32bit version of F16.
Something tells me this will work and that my previous installs were
just fubar.
--
Michael J. Hammel
Mike.Hammel@coloradoengineeringinc.com
Exports of information/data contained herein may be subject to the
export laws of the United States including, but not limited to, the US
International Traffic in Arms Regulations (ITAR) and may require advance
authorization from the U.S. Government. The parties shall not export,
disclose or transfer any such data directly or indirectly without
compliance with this or any other applicable laws and regulations.
CONFIDENTIALITY NOTICE: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and
contains information that is confidential and proprietary to Colorado
Engineering Incorporated. It is to be used solely for the purpose of
furthering the parties' business relationship. All unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: server running but can't connect?
Posted by Eric Charles <er...@apache.org>.
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: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: server running but can't connect?
Posted by "Michael J. Hammel" <Mi...@coloradoengineeringinc.com>.
On Tue, 2012-11-27 at 15:47 -0500, Michael J. Hammel wrote:
> 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
[snip]
A little further digging shows that JMX is not running, or can't be
connected to. I tried to run
jconsole service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi
but this generates a failed connection as well. I'm guessing that
without JMX I can't use the cli interface to add domains and users.
So the next question would be: how do I determine why JMX is not
running?
--
Michael J. Hammel <Mi...@coloradoengineeringinc.com>
Colorado Engineering, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org