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

Neomodel trying to connect to localhost, even if the database is on Aura ( When calling NODE_NAME.nodes.all() ) #787

Open
tseren1218 opened this issue Mar 22, 2024 · 2 comments

Comments

@tseren1218
Copy link

Expected Behavior (Mandatory)

NODE_NAME.nodes.all returning all the nodes

Actual Behavior (Mandatory)

Couldn't connect to localhost:7687 (resolved to ()):
Failed to establish connection to ResolvedIPv6Address(('::1', 7687, 0, 0)) (reason [WinError 10061] No connection could be made because the target machine actively refused it)
Failed to establish connection to ResolvedIPv4Address(('127.0.0.1', 7687)) (reason [WinError 10061] No connection could be made because the target machine actively refused it)

How to Reproduce the Problem

Create a form class. Inside that, try to call NODE_NAME.nodes.all():

class ConnectedLocationsForm(forms.Form):
connected_locations: Location.nodes.all()
# Any statement
. . . . .

Simple Example

Create a form class. Inside that, try to call NODE_NAME.nodes.all():

class ConnectedLocationsForm(forms.Form):
connected_locations: Location.nodes.all()
# Any statement
. . . . .

Datasets and Statements

Screenshots (where it's possibile)

Specifications (Mandatory)

Currently used versions

Versions

  • OS: Windows 11
  • Library: django_neomodel 0.1.1, neomodel 5.1.2
  • Neo4j: 5.12.0
@curious-broccoli
Copy link
Contributor

you should probably share what you set your config to:

from neomodel import config
config.DATABASE_URL = 'bolt://neo4j:neo4j@localhost:7687'

@mariusconjeaud
Copy link
Collaborator

I agree please share how you initiate the connection, either through config.DATABASE_URL, or db.set_connection

metacoma pushed a commit to mindwm/io-context that referenced this issue May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants