Neo4j: starting neo4j

Created on 16 May 2017  路  3Comments  路  Source: neo4j/neo4j

Neo4j Version: 3.0.1
Operating System: Xubuntu 16.04
API: Java API

  • Steps to reproduce
    sudo neo4j start

  • Expected behavior
    neo4j start normally

  • Actual behavior
    I get this message:
    Active database: graph.db
    Directories in use:
    home: /var/lib/neo4j
    config: /etc/neo4j
    logs: /var/log/neo4j
    plugins: /var/lib/neo4j/plugins
    import: /var/lib/neo4j/import
    data: /var/lib/neo4j/data
    certificates: /var/lib/neo4j/certificates
    run: /var/run/neo4j
    Starting Neo4j.
    WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
    /usr/share/neo4j/bin/neo4j: line 411: /var/run/neo4j/neo4j.pid: No such file or directory

It does not have the permission to create neo4j directory in /var/run. I use an alternative way. I go to /etc/init.d and run "sudo ./neo4j start". Even in this way, /var/run/neo4j directory would not be created but neo4j starts. The other way I can start neo4j is to create the directory, manually then run "sudo neo4j start" command
Surprisingly, the "sudo neo4j status" command will always say Neo4j is not running, even if Neo4j is running and I am using it. Only the neo4j file in /etc/init.d works properly (it shows that neo4j is running or not).

Most helpful comment

Answer from the team:

If you are using neo4j start (as neo4j user??). stop doing that

as @tom.geudens explains, /var/run is a tmpfs and so that folder needs to be created. it IS created in the neo4j service, which you are not using. TL:DR; stop doing neo4j start (preferrably forever) and use systemctl start neo4j

if you run neo4j start with a default config (like in the tarball) then a run directory is created in your local directory. naturally, you can't do that if you are using the system config but not using the service because you need root privileges to create a directory in /var/run

All 3 comments

Answer from the team:

If you are using neo4j start (as neo4j user??). stop doing that

as @tom.geudens explains, /var/run is a tmpfs and so that folder needs to be created. it IS created in the neo4j service, which you are not using. TL:DR; stop doing neo4j start (preferrably forever) and use systemctl start neo4j

if you run neo4j start with a default config (like in the tarball) then a run directory is created in your local directory. naturally, you can't do that if you are using the system config but not using the service because you need root privileges to create a directory in /var/run

systemctl start neo4j works for me. Thanks.

/usr/share/neo4j/bin/neo4j: line 394: /var/log/neo4j/neo4j.log: Permission denied

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sgehrig picture sgehrig  路  4Comments

apjanke picture apjanke  路  6Comments

szarnyasg picture szarnyasg  路  4Comments

guile2912 picture guile2912  路  3Comments

LWprogramming picture LWprogramming  路  4Comments