cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4j on ubuntu vps

li3zhang
Node Link

I tried following the steps from here, which are linked to from the "hosting neo4j in the cloud" page.

On a clean droplet, running the 6 steps listed on the guide give the exception Store and its lock file has been locked by another process: /var/lib/neo4j/data/databases/store_lock.

I have tried

  • changing the directory owner to neo4j, same error
  • Killing the process (sudo kill -9), but the process instantly comes back
  • Deleting the store_lock file, but I get the same lock issue for "var/lib/neo4j/data/databases/graph.db/neostore"

Is there a more updated guide on running neo4j on ubuntu?

1 ACCEPTED SOLUTION

Hi Li3zhang

Because I was curious I just created an account on Digital Ocean and made a Ubuntu 20.04 droplet.
I choose AMS as it is geographical nearest and created a default droplet:

In just 6 command's I had an instance of Neo4J running on it:

    1  wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
    2  echo 'deb https://debian.neo4j.com stable latest' | sudo tee /etc/apt/sources.list.d/neo4j.list
    3  sudo apt-get update
    4  apt update
    5  apt search neo4j
    6  apt install neo4j-enterprise

To verify it actually runs:

service neo4j status

and its output:

     Loaded: loaded (/lib/systemd/system/neo4j.service; disabled; vendor preset: enabled)
     Active: active (running) since Sat 2020-06-27 13:06:41 UTC; 6min ago
   Main PID: 5064 (java)
      Tasks: 60 (limit: 9513)
     Memory: 571.6M
     CGroup: /system.slice/neo4j.service
             └─5064 /usr/bin/java -cp /var/lib/neo4j/plugins:/etc/neo4j:/usr/share/neo4j/lib/*:/var/lib/neo4j/plugins/* -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNon>

Jun 27 13:06:41 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5152]:   data:         /var/lib/neo4j/data
Jun 27 13:06:41 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5152]:   certificates: /var/lib/neo4j/certificates
Jun 27 13:06:41 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5152]:   run:          /var/run/neo4j
Jun 27 13:06:41 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: Starting Neo4j.
Jun 27 13:06:42 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:42.766+0000 INFO  Starting...
Jun 27 13:06:46 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:46.833+0000 INFO  ======== Neo4j 4.1.0 ========
Jun 27 13:06:49 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:49.999+0000 INFO  Sending metrics to CSV file at /var/lib/neo4j/metrics
Jun 27 13:06:50 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:50.054+0000 INFO  Bolt enabled on localhost:7687.
Jun 27 13:06:51 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:51.537+0000 INFO  Remote interface available at http://localhost:7474/
Jun 27 13:06:51 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:51.538+0000 INFO  Started.

There must be something you do different, the commands are all issued as root as it is the default account on a droplet.

Hope this helps,
Paul

View solution in original post

6 REPLIES 6

li3zhang
Node Link

Just tried following the debian guide from the neo4j docs and am getting the same issue
(https://neo4j.com/docs/operations-manual/current/installation/linux/debian/)

webtic
Graph Fellow

The instructions at https://debian.neo4j.com/ work for me, on stock default ubuntu VM's
Not familiar with the DO droplets but I assume it is similar enough..

li3zhang
Node Link

I tried install neo4j 3.5 and 4.0 on ubuntu 18 as well as ubuntu 20 and get the same issues each time; it may be a DO issue.

Hi Li3zhang

Because I was curious I just created an account on Digital Ocean and made a Ubuntu 20.04 droplet.
I choose AMS as it is geographical nearest and created a default droplet:

In just 6 command's I had an instance of Neo4J running on it:

    1  wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
    2  echo 'deb https://debian.neo4j.com stable latest' | sudo tee /etc/apt/sources.list.d/neo4j.list
    3  sudo apt-get update
    4  apt update
    5  apt search neo4j
    6  apt install neo4j-enterprise

To verify it actually runs:

service neo4j status

and its output:

     Loaded: loaded (/lib/systemd/system/neo4j.service; disabled; vendor preset: enabled)
     Active: active (running) since Sat 2020-06-27 13:06:41 UTC; 6min ago
   Main PID: 5064 (java)
      Tasks: 60 (limit: 9513)
     Memory: 571.6M
     CGroup: /system.slice/neo4j.service
             └─5064 /usr/bin/java -cp /var/lib/neo4j/plugins:/etc/neo4j:/usr/share/neo4j/lib/*:/var/lib/neo4j/plugins/* -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNon>

Jun 27 13:06:41 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5152]:   data:         /var/lib/neo4j/data
Jun 27 13:06:41 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5152]:   certificates: /var/lib/neo4j/certificates
Jun 27 13:06:41 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5152]:   run:          /var/run/neo4j
Jun 27 13:06:41 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: Starting Neo4j.
Jun 27 13:06:42 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:42.766+0000 INFO  Starting...
Jun 27 13:06:46 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:46.833+0000 INFO  ======== Neo4j 4.1.0 ========
Jun 27 13:06:49 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:49.999+0000 INFO  Sending metrics to CSV file at /var/lib/neo4j/metrics
Jun 27 13:06:50 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:50.054+0000 INFO  Bolt enabled on localhost:7687.
Jun 27 13:06:51 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:51.537+0000 INFO  Remote interface available at http://localhost:7474/
Jun 27 13:06:51 ubuntu-s-4vcpu-8gb-ams3-01 neo4j[5064]: 2020-06-27 13:06:51.538+0000 INFO  Started.

There must be something you do different, the commands are all issued as root as it is the default account on a droplet.

Hope this helps,
Paul

li3zhang
Node Link

You're right. I was trying to spin up neo4j on a smaller droplet to be more economical. Verified working on Standard / 8 GB / 4 vCPUs.

Ah sneaky Digital Ocean marketing, only after you mentioned there were smaller droplets I found them by scrolling left in the user interface

Looking at the specs I think the 2 core 4G memory should be ok as well, I run projects on similar specs.

Any smaller will be troublesome or not working at all.
BTW: In the requirements a minimum of 2 vcores is listed 😉