Neo4j service did not start (windows)

Hi.

I've been using neo4j 3.5.7 as windows service. But time for upgrade came and I've unpacked new version 4.1.3 (to different directory), uninstalled old service and installed new with "neo4j uninstall-service" and "neo4j install-service". But when I try to start service it failed.

Here is output:

C:\app\neo4j-community-4.1.3\bin>neo4j start -verbose
VERBOSE: Neo4j Root is 'C:\app\neo4j-community-4.1.3'
VERBOSE: Neo4j Server Type is 'Community'
VERBOSE: Neo4j Version is '4.1.3'
VERBOSE: Neo4j Database Mode is ''
VERBOSE: Start command specified
VERBOSE: Neo4j Windows Service Name is neo4j
VERBOSE: Java detected at 'C:\Program Files\Java\jdk-11.0.6\bin\java.exe'
VERBOSE: Invoking "C:\Program Files\Java\jdk-11.0.6\bin\java.exe" -version 2>&1
VERBOSE: Command returned with exit code 0
VERBOSE: Java version response: java version "11.0.6" 2020-01-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode)
VERBOSE: Java Version detected as 11.0.6
VERBOSE: Neo4j Windows Service Name is neo4j
VERBOSE: Starting Neo4j as a service
VERBOSE: Invoking C:\app\neo4j-community-4.1.3\bin\tools\prunsrv-amd64.exe "//ES//neo4j" 2>&1
VERBOSE: Command returned with exit code 5
Neo4j service did not start

I'm using Win 10 Enterprise. And of course I've tried restart my PC :slight_smile:

Also here is a console from installing service:

C:\app\neo4j-community-4.1.3\bin>neo4j install-service -verbose
VERBOSE: Neo4j Root is 'C:\app\neo4j-community-4.1.3'
VERBOSE: Neo4j Server Type is 'Community'
VERBOSE: Neo4j Version is '4.1.3'
VERBOSE: Neo4j Database Mode is ''
VERBOSE: Install command specified
VERBOSE: Neo4j Windows Service Name is neo4j
VERBOSE: Java detected at 'C:\Program Files\Java\jdk-11.0.6\bin\java.exe'
VERBOSE: Invoking "C:\Program Files\Java\jdk-11.0.6\bin\java.exe" -version 2>&1
VERBOSE: Command returned with exit code 0
VERBOSE: Java version response: java version "11.0.6" 2020-01-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode)
VERBOSE: Java Version detected as 11.0.6
VERBOSE: Neo4j Windows Service Name is neo4j
VERBOSE: Reading JVM settings from configuration
VERBOSE: Adding '-XX:+UseG1GC'
VERBOSE: Adding '-XX:-OmitStackTraceInFastThrow'
VERBOSE: Adding '-XX:+AlwaysPreTouch'
VERBOSE: Adding '-XX:+UnlockExperimentalVMOptions'
VERBOSE: Adding '-XX:+TrustFinalNonStaticFields'
VERBOSE: Adding '-XX:+DisableExplicitGC'
VERBOSE: Adding '-XX:MaxInlineLevel=15'
VERBOSE: Adding '-Djdk.nio.maxCachedBufferSize=262144'
VERBOSE: Adding '-Dio.netty.tryReflectionSetAccessible=true'
VERBOSE: Adding '-Djdk.tls.ephemeralDHKeySize=2048'
VERBOSE: Adding '-Djdk.tls.rejectClientInitiatedRenegotiation=true'
VERBOSE: Adding '-XX:FlightRecorderOptions=stackdepth=256'
VERBOSE: Adding '-XX:+UnlockDiagnosticVMOptions'
VERBOSE: Adding '-XX:+DebugNonSafepoints'
VERBOSE: Moving -XX:+UnlockExperimentalVMOptions to the beginning
VERBOSE: Reading JVM settings from console java invocation
VERBOSE: Merging '-XX:+UseG1GC'
VERBOSE: Merging '-XX:-OmitStackTraceInFastThrow'
VERBOSE: Merging '-XX:+AlwaysPreTouch'
VERBOSE: Merging '-XX:+UnlockExperimentalVMOptions'
VERBOSE: Merging '-XX:+TrustFinalNonStaticFields'
VERBOSE: Merging '-XX:+DisableExplicitGC'
VERBOSE: Merging '-XX:MaxInlineLevel=15'
VERBOSE: Merging '-Djdk.nio.maxCachedBufferSize=262144'
VERBOSE: Merging '-Dio.netty.tryReflectionSetAccessible=true'
VERBOSE: Merging '-Djdk.tls.ephemeralDHKeySize=2048'
VERBOSE: Merging '-Djdk.tls.rejectClientInitiatedRenegotiation=true'
VERBOSE: Merging '-XX:FlightRecorderOptions=stackdepth=256'
VERBOSE: Merging '-XX:+UnlockDiagnosticVMOptions'
VERBOSE: Merging '-XX:+DebugNonSafepoints'
VERBOSE: Adding '-Dfile.encoding=UTF-8'
VERBOSE: Moving -XX:+UnlockExperimentalVMOptions to the beginning
VERBOSE: Installing Neo4j as a service
VERBOSE: Invoking C:\app\neo4j-community-4.1.3\bin\tools\prunsrv-amd64.exe "//IS//neo4j" "--StartMode=jvm"
"--StartMethod=start" "--ServiceUser=LocalSystem" "--StartPath=C:\app\neo4j-community-4.1.3"
"--StartParams=--config-dir=C:\app\neo4j-community-4.1.3\conf" "++StartParams=--home-dir=C:\app\neo4j-community-4.1.3"
"--StopMode=jvm" "--StopMethod=stop" "--StopPath=C:\app\neo4j-community-4.1.3" "--Description=Neo4j Graph Database -
C:\app\neo4j-community-4.1.3" "--DisplayName=Neo4j Graph Database - neo4j" "--Jvm=C:\Program
Files\Java\jdk-11.0.6\bin\server\jvm.dll" "--LogPath=C:\app\neo4j-community-4.1.3\logs"
"--StdOutput=C:\app\neo4j-community-4.1.3\logs\neo4j.log"
"--StdError=C:\app\neo4j-community-4.1.3\logs\service-error.log" "--LogPrefix=neo4j-service"
"--Classpath=lib/*;plugins/*"
"--JvmOptions=-XX:+UnlockExperimentalVMOptions;-Djdk.tls.rejectClientInitiatedRenegotiation=true;-XX:+DebugNonSafepoint
s;-XX:+AlwaysPreTouch;-XX:+TrustFinalNonStaticFields;-XX:+UseG1GC;-Djdk.nio.maxCachedBufferSize=262144;-XX:FlightRecord
erOptions=stackdepth=256;-XX:+UnlockDiagnosticVMOptions;-Djdk.tls.ephemeralDHKeySize=2048;-Dio.netty.tryReflectionSetAc
cessible=true;-XX:-OmitStackTraceInFastThrow;-XX:+DisableExplicitGC;-XX:MaxInlineLevel=15;-Dfile.encoding=UTF-8"
"--Startup=auto" "--StopClass=org.neo4j.server.CommunityEntryPoint" "--StartClass=org.neo4j.server.CommunityEntryPoint"
 2>&1
VERBOSE: Command returned with exit code 0
Neo4j service installed

I forget to mention, if I run neo4j console, it works.

C:\app\neo4j-community-4.1.3>bin\neo4j.bat console -verbose
VERBOSE: Neo4j Root is 'C:\app\neo4j-community-4.1.3'
VERBOSE: Neo4j Server Type is 'Community'
VERBOSE: Neo4j Version is '4.1.3'
VERBOSE: Neo4j Database Mode is ''
VERBOSE: Console command specified
VERBOSE: Java detected at 'C:\Program Files\Java\jdk-11.0.6\bin\java.exe'
VERBOSE: Invoking "C:\Program Files\Java\jdk-11.0.6\bin\java.exe" -version 2>&1
VERBOSE: Command returned with exit code 0
VERBOSE: Java version response: java version "11.0.6" 2020-01-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode)
VERBOSE: Java Version detected as 11.0.6
VERBOSE: Starting Neo4j as a console with command line C:\Program Files\Java\jdk-11.0.6\bin\java.exe -cp
"C:\app\neo4j-community-4.1.3/lib/*;C:\app\neo4j-community-4.1.3/plugins/*" -server -XX:+UseG1GC
-XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields
-XX:+DisableExplicitGC -XX:MaxInlineLevel=15 -Djdk.nio.maxCachedBufferSize=262144
-Dio.netty.tryReflectionSetAccessible=true -Djdk.tls.ephemeralDHKeySize=2048
-Djdk.tls.rejectClientInitiatedRenegotiation=true -XX:FlightRecorderOptions=stackdepth=256
-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -Dfile.encoding=UTF-8 org.neo4j.server.CommunityEntryPoint
--config-dir="C:\app\neo4j-community-4.1.3\conf" --home-dir="C:\app\neo4j-community-4.1.3"
2020-10-08 12:02:50.404+0000 INFO  Starting...
2020-10-08 12:02:52.569+0000 INFO  ======== Neo4j 4.1.3 ========
2020-10-08 12:02:53.730+0000 INFO  Performing postInitialization step for component 'security-users' with version 2 and status CURRENT
2020-10-08 12:02:53.730+0000 INFO  Updating the initial password in component 'security-users'
2020-10-08 12:02:53.735+0000 INFO  Updating initial user password from `auth.ini` file: neo4j
2020-10-08 12:02:54.239+0000 INFO  Bolt enabled on localhost:7687.
2020-10-08 12:02:55.132+0000 INFO  Remote interface available at http://localhost:7474/
2020-10-08 12:02:55.133+0000 INFO  Started.

I've tried to install jdk 11.0.8 and 15. It didn't work either. I tried unpack neo4j to different location, also it didn't help. If I run neo4j with prunsrv-amd64.exe //TS// it works. Why the service don't work?

Same problem here. Also did try open-jdk 11 and 15. Console works but start does not. Unfortunately I'm searching for the last 2 hours, but nothing came up.

I meet the problem the same as yours , and I don"t know how to solute it. hope somebody help

ive seen this VERBOSE: Command returned with exit code 5 when starting the Neo4j Service but it was as a result of a change to the path name such that the Neo4j Service thought for example that software was installed at c:\xyz when in fact it was at c:\abc. And a simple

neo4j uninstall-service
neo4j install-service

this cleared up the error. Though from above its not clear this is exactly the same issue, though it does appear something is amiss with the Service. Can you start the Neo4j service from 'Services` UI in Windows? Does this fail in the same manner? Does the Event Viewer of Windows provide any details on the failure?

1 Like

@dana_canzano
I am getting the same error,

and when still got the same error after uninstalling and reinstalling. Got the following error when starting from the services UI in windows.

Thank you in advance!

Similar problem. Its a fresh install as a windows service, it starts and then stops. event viewer captured it but I did not see anything useful.

7034 0 2 0 0 0x8080000000000000 298725 System IronMan.WeBuildThings.Com Neo4j Graph Database - neo4j 2 6E0065006F0034006A000000

Sorry the above isn't clear, I tried to paste the event viewer output in xml format and it clearly broke something in your UI.

This is my second time trying to use Neo4J and getting nowhere, they need write an installation application that handles all this configuration properly. It should come prepackaged with whatever version of Java it needs. The java installation experience was only marginally better, I didn't know what version of Java I need so I just downloaded the latest version. Then I had to make an account with Oracle, I don't want to talk to those guys but now I'm probably going to get a bunch of spam. To get Java to run the Neo4j command line installer, I had to add an environmental variable. Furthermore, Xerox PARQ made command line obsolete in the 1980s, build a UI, it is not that hard. This is frustrating, assuming that nobody is going to read this, figure out the problem, and solve it. I'm going to spend a couple hours making my own Graph Database. That's a much easier problem than dealing with this nonsense.

Hi @volcanoj25 ,

Give Neo4j Desktop a try. It's a single download to get an app which packages the Neo4j DBMS along with the necessary runtime, some basic project management and essential tools like Neo4j Browser for sending queries and seeing the results.

You can get it here: Neo4j Desktop Download | Free Graph Database Download

Or learn more about it first here: Neo4j Desktop - Neo4j Desktop

Best,
ABK

There is a reason for using the command line tools. Mine is this and I could manage to make it work by means of the service (re)installation mentioned above.

Yes, I uninstalled the service and reinstalled it, then it works. Thanks!