1
votes

Neo4j version: Community Edition 2.3.2
Starting neo4j ce 2.3.2 by provided visual tool works correct while using a custom DB directory.

For example:

  • database location: C:\Neo4jDB
  • database tuning file: C:\Neo4jDB\neo4j.properties
  • server configuration file: C:\Users\leo\AppData\Roaming\Neo4j Community Edition\neo4j-server.properties
    here I set: org.neo4j.server.database.location="C:/Neo4jDB"

Starting neo4j ce 2.3.2 by Windows PowerShell works correct ONLY if I use default configuration (data/graph.db), but if I change C:\Neo4j\conf\neo4j-server.properties file setting to

org.neo4j.server.database.location="C:/Neo4jDB"

(like while using provided visual tool) Windows PowerShell rises the following error:

Start-Service : Service 'Neo4JLEO (Neo4JLEO)' cannot be started due to the
following error: Cannot start service Neo4JLEO on computer '.'.
At C:\neo4j\bin\Neo4j-Management\Start-Neo4jServer.ps1:142 char:30
+       $result = Start-Service <<<<  -Name $ServiceName -PassThru
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
    + FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand
2

2 Answers

0
votes

Windows uses back-slashes as path delimiters. Try replacing the forward-slash in your configuration with back-slash.

I.e. org.neo4j.server.database.location="C:\Neo4jDB"

0
votes

Actually previous answer is partially correct. Windows uses "\", but the neo4j.conf file should have "c:\\Neo4jDB" (double slash) in it. That is what I am using, this way the service is able to start. It has nothing to do with powershell limitations, the manually starting it from services.msg will present same error. It has more to do with service vs application (what you call visual tool).