Skip to content

fail to connect to Neo4j AuraDB #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Liuz233 opened this issue Oct 1, 2024 · 4 comments
Open

fail to connect to Neo4j AuraDB #388

Liuz233 opened this issue Oct 1, 2024 · 4 comments

Comments

@Liuz233
Copy link

Liuz233 commented Oct 1, 2024

Here is my config in HTML
When I try to load the draw the graph from Neo4j AuraDB, it failed and show nothing

console in web browser shows
image
But I have write my Neo4j AuraDB url, username, password in config. Why it still try to connect to localhost:7687?

How can I fix it?


    <!-- FIXME: load from dist -->
    <script type="text/javascript" src="../static/neovis.js"></script>


    <script
            src="https://code.jquery.com/jquery-3.2.1.min.js"
            integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
            crossorigin="anonymous"></script>

    <script type="text/javascript">
		// define config car
		// instantiate nodevis object
		// draw

		var viz;

		function draw() {
			var config = {
				containerId: "viz",
				neo4j: {
				server_url: "bolt://xx.xx.xx.xx:7687",
				server_user: "neo4j",
				server_password: "navigators-bowl-flake",
				},
				labels: {
					Character: {
						label: "name",
						value: "pagerank",
						group: "community"
					}
				},
				relationships: {
					INTERACTS: {
						value: "weight"
					}
				},
				initialCypher: "MATCH p=()-->() RETURN p"
			};

			viz = new NeoVis.default(config);
			viz.render();
			console.log(viz);

		}
    </script>
</head>
<body onload="draw()">
<div id="viz"></div>
@prsfreal
Copy link

prsfreal commented Oct 7, 2024

your server_URL is using bolt - looking for a local instance. You want to connect to AuraDB - which should look something like this:

'neo4j+s://7e1dfa.databases.neo4j.io:7687'

This can be found in the Aura_db console.

Also be aware that if you are using the feee instance you may come across a bug where all nodes return but only one relationship. #367

Switching to paid instance or local install fixes issue.

@Liuz233
Copy link
Author

Liuz233 commented Oct 7, 2024

your server_URL is using bolt - looking for a local instance. You want to connect to AuraDB - which should look something like this:

'neo4j+s://7e1dfa.databases.neo4j.io:7687'

This can be found in the Aura_db console.

Also be aware that if you are using the feee instance you may come across a bug where all nodes return but only one relationship. #367

Switching to paid instance or local install fixes issue.

Thank you. I try to build my local neo4j and face no bug.

@spyroskotsakis
Copy link

Hello,
I'm running one of the examples on localhost with Neo4j using AuraDB and ran into an issue.

I'm seeing the following error, and below is an example of the connection configuration (I've modified the details, so they're not the actual ones).

'serverUrl': 'neo4j+s://AU4dUbid.databases.neo4j.io',
'serverUser': 'neo4j',
'serverPassword': 'UcOBWs7W2ZGdY2G6ziey'

Any idea what might be causing this and how I can fix it?
Thanks!

error:
index.js:462 Uncaught Error: Encryption/trust can only be configured either through URL or config, not both
at RB.MB (neovis.ts:366:64)
at new RB (neovis.ts:285:7)
at draw (advanced-test.html:81:10)
at onload (advanced-test.html:88:23)

@oldwangmate
Copy link

@spyroskotsakis Hi, have you solved this problem? I have the same problem, can you tell me how you solved it?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants