When I run the command "neo4j status" or "neo4j stop" it says "Neo4j not running" however the browser is accessible and I can perform all transactions on the database. Also the database doesn't change when I change it on the neo4j.conf and run neo4j start.
Thanks Govind, you gave me a start, I think I found the problem, for a reason that I don't know the neo4j is running with a certain pid different than the one generated in the /var/run/neo4j/neo4j.pid, when I overwrote the neo4j.pid with the one running I was able to stop the neo4j and start a clean process.
I ran into this using the most recent GCP public image neo4j-community-1-4-3-6-apoc
which is using Neo4j Community 4.3.6.
Starting behavior is that the status command thinks Neo4j is not running:
$ /usr/share/neo4j/bin/neo4j status
Neo4j is not running.
It follows that attempts to stop
do nothing, since the system thinks that it isn't running to begin with:
$ sudo /usr/share/neo4j/bin/neo4j stop
Neo4j is not running.
But the app is clearly running, as evidenced by curl
output:
$ curl http://localhost:7474/
{
"bolt_routing" : "neo4j://localhost:7687",
"transaction" : "http://localhost:7474/db/{databaseName}/tx",
"bolt_direct" : "bolt://localhost:7687",
"neo4j_version" : "4.3.6",
"neo4j_edition" : "community"
}
Neo4j is also clearly present in running process list, too (truncated output below):
$ ps -U neo4j -u neo4j u
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
neo4j 1021 0.1 2.9 2202544 111492 ? Ssl 16:21 0:05 /usr/bin/java -Xmx...
neo4j 1615 1.1 16.6 3269476 625720 ? Sl 16:21 0:52 /usr/lib/jvm/java-...
To fix this, first create the missing run directory and set the directory owner to neo4j
user:
sudo mkdir /var/run/neo4j
sudo chown neo4j /var/run/neo4j
Then stop the running instance of neo4j by sending an interrupt (-2) signal:
sudo kill -2 1021
Verify it worked by checking ps
one more time:
$ ps -U neo4j -u neo4j u
Start the process, running it as neo4j
user (also, set the NEO4J_CONF
shell variable pointing to directory where neo4j.conf
is located):
$ sudo -u neo4j env NEO4J_CONF=/etc/neo4j sh -c '/usr/share/neo4j/bin/neo4j start'
Verify that neo4j is running, checking active processes (truncated output):
$ ps -U neo4j -u neo4j u
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
neo4j 3803 14.9 15.5 3250848 587740 pts/0 Sl 17:47 0:22 /usr/lib/jvm/java-...
Finally, verify that status
now correctly aligns with reality:
$ /usr/share/neo4j/bin/neo4j status
Neo4j is running at pid 3803
It sounds like the machine on which you run the neo4j status
and neo4j stop
commands is not the same as the machine on which the neo4j browser service that you are using is running.
If you want to control the neo4j browser service, you need to need to run those commands on the correct machine.
Are you running neo4j status as root user? sometime when you run neo4j status as a non root user while starting it as one it will give you that message.
I'm using "Ubuntu 18.04.3 LTS" and "neo4j-community-3.5.8". When I go to the main directory of neo4j (which I directly downloaded from website)
I just stumbled upon the same issue, namely the neo4j process was running, but neo4j status
said otherwise.
In my case it was due to a mishap during the initial installation/configuration, which caused no run folder to get created in: /var/run/neo4j
. Since that is where the neo4j PID file is stored, it causes neo4j status
to think that the process is not running, even though in reality it is.
I was able to confirm the behavior by killing the process manually and starting neo4j again, after which I was greeted with:
....
Starting Neo4j.
/usr/share/neo4j/bin/neo4j: line 451: /var/run/neo4j/neo4j.pid: No such file or directory
The problem went away after creating the run folder for neo4j with a simple:
(sudo) mkdir /var/run/neo4j
I was seeing this error because I've built neo4j zip with maven from official repo. Later I've downloaded prebuilt zip here: http://dist.neo4j.org/neo4j-community-3.15.0-windows.zip and this one worked with all the same steps.
Neo4j browser wasn't accessible in my case, but http endpoint was working.
If your neo4j is not working on desktop.You can use it virtually.
- You should Download Docker
- Install the docker on your PC.
- Open your CMD type this Command docker run --name neo4j -e NEO4J_AUTH=neo4j/s3cr3t -p 7474:7474 -p 7687:7687 neo4j
- open Docker and run Neo4j.
© 2022 - 2025 — McMap. All rights reserved.
ps -ef | grep neo4j
– Diseased