Neo4j not running
Asked Answered
G

8

8

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.

Gelsemium answered 6/10, 2016 at 23:16 Comment(2)
check the actual path of running neo4j ps -ef | grep neo4jDiseased
check the user running the process. In my case, it was 'root' and seemed to confuse the command when run under 'neo4j' userBlazonry
G
3

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.

Gelsemium answered 7/10, 2016 at 16:56 Comment(0)
L
1

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
Ladd answered 10/6, 2022 at 17:57 Comment(0)
C
0

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.

Cassiopeia answered 6/10, 2016 at 23:37 Comment(1)
It is the same machine, same IP . Infact I can start the neo4j but when I try to stop it gives the message neo4j is not runningGelsemium
D
0

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.

Dasteel answered 19/1, 2019 at 15:31 Comment(0)
C
0

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)

enter image description here

Catnip answered 24/10, 2019 at 13:26 Comment(0)
B
0

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
Burkett answered 24/7, 2020 at 11:22 Comment(0)
C
0

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.

Comply answered 28/11, 2023 at 16:16 Comment(0)
M
0

If your neo4j is not working on desktop.You can use it virtually.

  1. You should Download Docker
  2. Install the docker on your PC.
  3. Open your CMD type this Command docker run --name neo4j -e NEO4J_AUTH=neo4j/s3cr3t -p 7474:7474 -p 7687:7687 neo4j
  4. open Docker and run Neo4j.
Medarda answered 30/1, 2024 at 15:42 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Domeniga

© 2022 - 2025 — McMap. All rights reserved.