4

I have neo4j community server edition 3.4.5 and which will be giving me "WebSocket connection to 'ws://localhost:7687/' failed".

I found some solution to work in firefox, chrome, IE but those are temporary solutions which work. but I don't think that just by passing proxy would be a permanent solution.

It is not working if connected to VPN(office network), otherwise working. What could be a reason for this error within an office network? How to resolve this issue.

Any idea or suggestions, Please

user2848031
  • 187
  • 12
  • 36
  • 69
  • If this were my question I would change the tags. While the application is Neo4j, it appears the problem is with VPN and I see no tags related to a communication protocol or such other than bolt which will only draw in the Neo4j people. The VPN people are the people that need to be looking at this question. – Guy Coder Oct 30 '18 at 00:54
  • Good Idea, Thanks. – user2848031 Oct 30 '18 at 02:06

2 Answers2

1

There can be several reasons for this issue and I probably need to know more about your setup before I can pin point the problem.

1 check:
Disconnect from the VPN, and open a command prompt (Windows+R then write cmd and press enter) Use either telnet or putty ( https://www.putty.org/ ) and connect to 127.0.0.1 port 7687:

telnet 127.0.0.1 7687

See if you a response like this:

GET / HTTP/1.0

2 check:
Go to you proxy settings and see if you have a proxy enabled:
Firefox: Preferences/Options > Advanced > Network > Settings
IE: Tools > Options > Connections > Lan Settings

Suggest to turn off your proxy and do the check in check 1 again.

3 check:
Connect to your VPN and do the check 1 part once again

Check for error messages (that you probably would get) and then write in the command prompt:

route print

It should show a line like this:

    127.0.0.0        255.0.0.0               On-link         127.0.0.1    xxx
    127.0.0.1        255.255.255.255         On-link         127.0.0.1    xxx
    127.255.255.255  255.255.255.255         On-link         127.0.0.1    xxx

This ensure that you still have your loop back up and running (probably is ok).

4 check:
Turn off your local firewall with VPN connected (if allowed) and try the check 1 again.

Some firewall rules change connections to "localhost" while connected to a VPN, since the new connection is "corporate" or "public".

If that worked, you need to create a rule in your firewall to allow connection to port 7687 for all addresses, this will fix your problem.

5 check:
Check your neo4j community server to listen to "127.0.0.1" and not "0.0.0.0"

Check your ports open by using netstat

netstat -a -o

It should state something like this

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:7687            machinename:0          LISTENING       xxxx

or

  TCP    127.0.0.1:7687          machinename:0          LISTENING       xxxx

If the server is like the first line, it might be handled by a corporate firewall, but by using the 127.0.0.1 as address it should always be local.

Hopefully that will get you on the way :)

Large
  • 587
  • 4
  • 16
  • Thank you for effort. I have changed my port to .8080 but still i have same issue.1. I didn't see any error message or GET / HTTP/1.0. Just blank screen – user2848031 Nov 04 '18 at 23:54
  • (2) My company default browser setting is "Enabled automatic configuration script" (3) I'm seeing message as your comment. (4) I'm getting same error when connect to VPN and (5) i'm seeing server is listening port 8080 – user2848031 Nov 05 '18 at 00:10
1

i had same problem, so Let me tell you what i came out with...

the company has a proxy server for all connections, so i change my request from IP to DNS by typing nslookup IP on command prompt terminal.

from: ws://180......:80/socket/test to: ws://mxjuppro22......:80/socket/test

then error gone and now is working like a charm!!!

hope it helps

Jairo Cordero
  • 640
  • 6
  • 8