0

I have checked into another question on the same issue in the link

Linux port open locally, but not externally

neo4j-shell -host 127.0.0.1 -port 1337

I get the error

root@ip-10-142-85-146:~# neo4j-shell -v -host 127.0.0.1 -port 1337
ERROR (-v for expanded information):
        Connection refused
java.rmi.ConnectException: Connection refused to host: 10.142.85.146; 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.invoke(UnicastRef.java:129)
        at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
        at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
        at com.sun.proxy.$Proxy1.welcome(Unknown Source)
        at org.neo4j.shell.impl.AbstractClient.sayHi(AbstractClient.java:215)
        at org.neo4j.shell.impl.RemoteClient.findRemoteServer(RemoteClient.java:63)
        at org.neo4j.shell.impl.RemoteClient.<init>(RemoteClient.java:55)
        at org.neo4j.shell.impl.RemoteClient.<init>(RemoteClient.java:43)
        at org.neo4j.shell.ShellLobby.newClient(ShellLobby.java:165)
        at org.neo4j.shell.StartClient.startRemote(StartClient.java:297)
        at org.neo4j.shell.StartClient.start(StartClient.java:175)
        at org.neo4j.shell.StartClient.main(StartClient.java:120)
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:392)
        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:147)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
        ... 14 more

telnet 127.0.0.1 1337 works fine telnet 10.142.85.146 1337 fails

root@ip-10-142-85-146:~# telnet 10.142.85.146 1337
Trying 10.142.85.146...
telnet: Unable to connect to remote host: Connection refused
root@ip-10-142-85-146:~#

also ping 10.142.85.146 fails

root@ip-10-142-85-146:~# ping 10.142.85.146
PING 10.142.85.146 (10.142.85.146) 56(84) bytes of data.
^C
--- 10.142.85.146 ping statistics ---
11 packets transmitted, 0 received, 100% packet loss, time 10018ms

I see some parallels here; the neo4j-shell is looking for 10.142.85.146 and not able to find it

I am able to work properly with the public ip address; it is the local address I am having a problem

any help will be appreciated. I did not want to start another question and hence writing in the same thread

Additional Information the most weird part is that my AWS console says the private is 10.142.65.14 how is this translated to 10.142.85.146 I have no idea

1 Answer 1

0

I updated /etc/hosts with the current ip and the hostname as per AWS naming conventions and everything started working fine.

I am looking at this post to update them automatically on every boot http://www.onepwr.org/2012/04/26/chef-recipe-to-setup-up-a-new-nodes-fqdn-hostname-etc-properly/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .