2

When I try to run the simplest html page that will show me graph of neo4j data, using neovis.js:

<html>
    <head>
        <title>DataViz</title>
        <style type="text/css">
            #viz {
                width: 900px;
                height: 700px;
            }
        </style>
        <script src="https://cdn.neo4jlabs.com/neovis.js/v1.0.0/neovis.js"></script>
    </head>   
    <script>
        function draw() {
            let config = {
                container_id: "viz",
                server_url: "bolt://54.210.87.221:32953",
                server_user: "neo4j",
                server_password: "cents-propeller-slits",
                labels: {
                    "Application": {
                        caption: "name",
                        size: "pagerank",
                        community: "community"
                    }
                },
                relationships: {
                    "DEPENDS_ON":{
                        caption: false,
                        thickness: "weight"
                    }
                },
                initial_cypher: "MATCH p=(Application)-[r:DEPENDS_ON]->() RETURN p LIMIT 25"
            };
            let viz = new NeoVis.default(config);
            viz.render();
        }
    </script>
    <body onload="draw()">
        <div id="viz"></div>
    </body>
</html>

I get this error message at the console:

"WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket readyState is: 3"

I saw the answer in https://neo4j.com/developer/kb/explanation-of-error-websocket-connection-failure/ But I didn't understood where I suppose to do the change, specially when I do not have any Neo4j files or configurations on my computer (Windows).

Why can't I connect to the bolt server like I saw in the guides?

adsl
  • 123
  • 7

1 Answers1

0

Like the link said, you need to tell Neo4j to listen on the network.

For this you need to change the Neo4j configuration by enabeling the line dbms.connector.bolt.address=0.0.0.0:7687 in the $NEO4J_HOME/conf/neo4j.conf.

So in your case you need to do that on your server 54.210.87.221, not on your local laptop.

Cheers.

logisima
  • 7,340
  • 1
  • 18
  • 31
  • But where the $NEO4J_HOME/conf/neo4j.conf file is? it is not on my computer – adsl Feb 19 '19 at 12:34
  • you have to do it on the server side, so on your server located at `54.210.87.221` – logisima Feb 19 '19 at 12:51
  • I know that from your side I might sounds really stupid, but if is not a trouble for you - can you give me more specific instructions? I'm on that problem all day and I know that something is not right. I do not find the conf file, or able to connect to the direct HTTP neo4j: http://54.210.87.221:32954/browser/ – adsl Feb 19 '19 at 13:04