cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Desktop unable to establish local connection

renatospaka
Graph Voyager

Hi guys.

I'm resuming an old PoC using Neo4j with Go. First I was using a sandbox instance, worked fine. Today I launched a local project using Neo4j Desktop (v 4.4.10). However, when I try to connect to this local instance, the connection fails, even using the same function to connect I used with the sandbox.

These are the variables I'm using:

{
  "NEO4J_URI": "bolt://localhost:7687",
  "NEO4J_USERNAME": "neo4j",
  "NEO4J_PASSWORD": "secret-password"
}

 And the connection is established using this factory:

func NewNeo4jDatabase(settings *config.Config) (*Neo4jDatabase, error) {
    driver, err := neo4j.NewDriver(settings.Uri, neo4j.BasicAuth(settings.Username, settings.Password, ""))
    if err != nil {
        log.Printf("neo4j: %v", db.ErrDbUnableToConnect)
        log.Printf("neo4j: %v", err)
        return nil, db.ErrDbUnableToConnect
    }

    // check if the connection is valid
    err = driver.VerifyConnectivity()
    if err != nil {
        return nil, err
    }

    // return the driver connected to the database
    database := &Neo4jDatabase{
        driver: driver,
    }
    return database, nil
}

Also, I tried to connect using neo4j:// protocol instead of bolt://

What I am doing wrong?

0 REPLIES 0