nginxneo4jssl-certificatenginx-reverse-proxylibneo4j-client

routines:SSL23_GET_SERVER_HELLO:unknown protocol when trying to connect to neo4j server using proxy


I have neo4j-server installed on remote linux server. This server using nginx and has virtual host. Here is config:

server {
    listen 80;
    listen [::]:80;

    server_name neo.mydomain.in.ua;

    access_log /var/log/nginx/neo-browser-access.log;
    error_log /var/log/nginx/neo-browser-error.log;

    location / {
        proxy_pass http://localhost:7474;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

I use it because i cant use port 7474, only 80 or 8080.

http://neo.mydomain.in.ua/browser/, works good, and i see neo4j-browser. But i cant connect to DB using any client (even using console client). I got this:

>> neo4j-client -u neo4j neo.mydomain.in.ua 80
OpenSSL error: 336031996:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
error: Unexpected error

But when i tried to use postman for it, i got

>> http://neo.mydomain.in.ua/db/data/

{
    "errors": [
        {
            "code": "Neo.ClientError.Security.Unauthorized",
            "message": "No authentication header supplied."
        }
    ]
}

This means that i have an access to DB, but not through neo4j-client. I tried to login using basic auth, and it`s works.

What is wrong?


Solution

  • Problem solved. I just uncomment

    dbms.connectors.default_listen_address=0.0.0.0
    

    in my neo4j.conf. But strange that i can login to neo4j using postman even this option is disabled. \(0_0)/