.netneo4j

Windows neo4j: Cannot login / connect to database / browser


I've just installed neo4j desktop 5.6.0 (which I'm going to use in a dotnet 7 API), but no matter what I try, my login / password is always refused.

I didn't make any changes to default config, so username/password should be neo4j/neo4j, but they obviously doesn't work.

If I open browser URL via:

http://localhost:7474/browser/

and try to connect using bolt via:

bolt://localhost:7687

I always get

Neo.ClientError.Security.Unauthorized: The client is unauthorized due to authentication failure.

Running

.\neo4j.bat start

via a PowerShell Windows console:

Pops up a "Apache Commons Daemon Service Runner" asking for confirmation, and after I hit "Yes" it returns:

Started neo4j. It is available at http://localhost:7474
There may be a short delay until the server is ready.

But then

.\neo4j.bat status --verbose

returns:

neo4j 5.3.0
VM Name: Java HotSpot(TM) 64-Bit Server VM
VM Vendor: Oracle Corporation
VM Version: 17.0.6+9-LTS-190
JIT compiler: HotSpot 64-Bit Tiered Compilers
VM Arguments: [-Dbasedir=C:\Users\diego.estebanperez_a\.Neo4jDesktop\relate-data\dbmss\dbms-7b389a4d-222f-44d9-b8f1-dca7064ee5a9]
Configuration files used (ordered by priority):
C:\Users\diego.estebanperez_a\.Neo4jDesktop\relate-data\dbmss\dbms-7b389a4d-222f-44d9-b8f1-dca7064ee5a9\conf\neo4j.conf
--------------------
Executing command line: powershell.exe -OutputFormat Text -ExecutionPolicy Bypass -Command Get-Service neo4j | Format-Table -AutoSize
org.neo4j.cli.CommandFailedException: Neo4j is not running.
        at org.neo4j.server.startup.Bootloader$Dbms.status(Bootloader.java:479)
        at org.neo4j.server.startup.StatusCommand.execute(StatusCommand.java:37)
        at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:92)
        at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:37)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at org.neo4j.server.startup.Neo4jAdminCommand.call(Neo4jAdminCommand.java:122)
        at org.neo4j.server.startup.Neo4jAdminCommand.call(Neo4jAdminCommand.java:42)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at org.neo4j.server.startup.Neo4jCommand.main(Neo4jCommand.java:41)

Of course I tried to use it in a .net api registering the neo4j client like this (neo4jclient Nuget previously installed):

var client = new BoltGraphClient(new Uri("bolt://localhost:"), "neo4j", "neo4j");
client.ConnectAsync();
builder.Services.AddSingleton<IGraphClient>(client);

To no avail too.

I've also installed the service via:

.\neo4j.bat windows-service install

And also tried setting an initial password via:

./neo4j-admin dbms set-initial-password root

To no avail too.

What can I try next?

PS. Already investigated and tried some links like

Cannot log in Neo4j server


Solution

  • Typically when using Neo4j Desktop the initial database password is set via the Neo4j Desktop UI:

    enter image description here

    So whatever text you use here will be the initial password for the neo4j database user.

    Also, note that the default minimum password length is 8 characters so it is possible your attempts to set an initial password with fewer characters was ignored if the password is less than the minimum number of characters. More information in the docs here: https://neo4j.com/docs/operations-manual/current/configuration/set-initial-password/