Skip to content
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

fail to connect to Neo4j AuraDB #388

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

fail to connect to Neo4j AuraDB #388

Liuz233 opened this issue Oct 1, 2024 · 2 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.

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

2 participants