"messages.log" File Not Found exception

230 views
Skip to first unread message

Samwillie

unread,
May 4, 2012, 10:07:10 AM5/4/12
to Neo4j
Hi,

I copy my embdedded graph.db directory to the Neo4j server /data/
graph.db - all is well here, until I try to restart my neo4j server -
it throws this exception and fails to start - I start Neo4j as root.

caused by: /home/username/NEO4J_HOME/data/graph.db/messages.log
(Permission denied)

What might be the issue here?

Many thanks,

Greets

Peter Neubauer

unread,
May 4, 2012, 10:08:57 AM5/4/12
to ne...@googlegroups.com

Sounds like a unix permission problem. The server is running as a non root user, male sure that user has write permission in your dirs

Samwillie

unread,
May 4, 2012, 10:49:31 AM5/4/12
to Neo4j
Hi Peter,

Thanks. But this issue only happens after I copy my graph.db directory
and its contents to the server's data/ directory.

I log in as root and then go to NEO4J_HOME and do ./bin/neo4j restart
- it shuts down and never starts. Can I just replace the messages.log
file?

Many thanks,

On May 4, 4:08 pm, Peter Neubauer <neubauer.pe...@gmail.com> wrote:
> Sounds like a unix permission problem. The server is running as a non root
> user, male sure that user has write permission in your dirs

Samwillie

unread,
May 4, 2012, 11:11:39 AM5/4/12
to Neo4j
Hi Peter,

I noticed that everytime you start the Neo4j server, it creates a
graph.db directory inside the data/ directory.

So when I replace the existing graph.db with my own populated
graph.db, and restart the server it throws this error, even if we run
as root.

Is there something to be done before copying a populated graph.db
directory over to the server's data directory?

many thanks,

Michael Hunger

unread,
May 4, 2012, 12:03:12 PM5/4/12
to ne...@googlegroups.com
No normally nothing,

what you should do after copying the files

chown neo:neo -R data/graph.db
chmod u+rw -R data/graph.db

neo:neo are the user and group of the user running the server (please adapt accordingly)

the second one sets both read and write permissions for the user owning the files, from what OS are you copying the data?

Michael

Samwillie

unread,
May 4, 2012, 12:43:36 PM5/4/12
to Neo4j
Hi Michael,

Thanks for the reply. My embedded graph database runs on Ubuntu and
the neo4j server runs on Debian.

I installed a fresh copy of the neo4j server on debian, and installed
it - when asked for user I typed in: neo
Then I copied the files over from my local machine (scp) into the data/
graph.db directory
cp -r * server/data/graph.db
I ran the commands you mentioned below.
So far so good.
Now when I see the web-admin of the neo4j server - I see the amount of
disk space as 23MB (exactly correct) as in the embedded database, but
there is only 1 node and 0 properties showing. The logical disk space
number is also correct.

Don't know what I am doing wrong here..

many thanks for your patience

On May 4, 6:03 pm, Michael Hunger <michael.hun...@neotechnology.com>
wrote:

Michael Hunger

unread,
May 4, 2012, 12:52:55 PM5/4/12
to ne...@googlegroups.com
Can you check that there is no graph.db directory in the data/graph.db directory ?

cd mylocalgraphdb
scp -r * user@server:/path/to/server/data/graph.db

Michael

Samwillie

unread,
May 4, 2012, 1:04:58 PM5/4/12
to Neo4j
Hi Michael,

I remove the graph.db directory entirely from the data/ on the server,
and when I do scp from my local machine,

I get; No such file or directory.

Shall I now create an empty graph.db directory and do the scp again?

Thanks


On May 4, 6:52 pm, Michael Hunger <michael.hun...@neotechnology.com>

Samwillie

unread,
May 4, 2012, 1:08:01 PM5/4/12
to Neo4j
Hi Michael,

When I try to create a graph.db directory on the server and then do
scp I get "permission denied" error for all files!

Michael Hunger

unread,
May 4, 2012, 1:10:37 PM5/4/12
to ne...@googlegroups.com
Then scp a zip or tgz of it to /tmp

log in as root
su neo
cd into the server/data directory
a extract the compressed file there as the neo user.

Michael

Samwillie

unread,
May 4, 2012, 1:30:58 PM5/4/12
to Neo4j
Hi Michael,

I sent a tgz compressed file and unzipped the same from the server/
data directory as the neo user.

Now I see around 22mb disk space occupied but with only 1 node and 0
properties.

I will try resinstalling neo4j server and then once again creating an
embedded graph and copy over. The wierd thing is I can see my index/
lucene/node/ folder inside my copied over graph.db, but in the web-
admin it does not show any indexes.

Thanks

On May 4, 7:10 pm, Michael Hunger <michael.hun...@neotechnology.com>

Michael Hunger

unread,
May 4, 2012, 2:04:21 PM5/4/12
to ne...@googlegroups.com
Did you shut down your local database cleanly ?

How did you create the data with batchinserter or an embedded graph database service?

Michael

Michael Hunger

unread,
May 4, 2012, 3:54:38 PM5/4/12
to ne...@googlegroups.com
I totally forgot that Tero actually wrote a blog post about using the Batch-Inserter to create SDN data structures.
Here it is:

http://code.paananen.fi/2012/04/05/neo4j-batchinserter-and-spring-data-for-neo4j

Cheers

Michael

Samwillie

unread,
May 7, 2012, 2:45:07 AM5/7/12
to Neo4j
Hi Michael,

Many thanks...I noticed that I did not do a shutdown of the graph
database. I did tx.commit() after each transaction, but not a shut
down.

I will try this again with my embedded graph database server and let
you know!

Thanks for the blog post! I will go through it!..


On May 4, 8:04 pm, Michael Hunger <michael.hun...@neotechnology.com>

Samwillie

unread,
May 7, 2012, 3:33:37 AM5/7/12
to Neo4j
Hi Michael,

I tried creating an embedded database and then did a clean shut down
and copied over to the locally installed neo4j server .

The migration is complete, just wanted to export this database onto
the server, so as to view the database in the web admin.

http://localhost:7474 - but I only get the disk space used in the web
admin - no nodes and properties and no indexes are displayed.

Here is what I do:

graphDbService = new EmbeddedGraphDatabase(localPath);
//before each transaction
tx = graphDbService.beginTx();
//do migration here
//after each transaction
tx.success();
tx.finish();
//then shutdown
graphDbService.shutdown();

Greets,

Samwillie

unread,
May 7, 2012, 4:36:08 AM5/7/12
to Neo4j
Hi Michael,

It works finally!! Thanks a lot! I retried the steps you mentioned
above starting with a fresh install:

I removed the existing graph.db directory completely from the data/
folder.

Copied over the migrated database to the data/graph.db folder

Restarted the server - got the error messages saying "messages.log"
permission denied and failed to restart server

Did what you suggested, with chown (in an earlier post in this
thread).

Now I see all the nodes, indexes and relationships!

Thank you very much,

Greets

On May 4, 9:54 pm, Michael Hunger <michael.hun...@neotechnology.com>
wrote:
> I totally forgot that Tero actually wrote a blog post about using the Batch-Inserter to create SDN data structures.
> Here it is:
>
> http://code.paananen.fi/2012/04/05/neo4j-batchinserter-and-spring-dat...

Michael Hunger

unread,
May 7, 2012, 5:04:02 AM5/7/12
to ne...@googlegroups.com
Perfect, thanks.

I would love if you could publish your findings in a blog post.

Thanks

Michael

Samwillie

unread,
May 7, 2012, 5:54:19 AM5/7/12
to Neo4j
Hi Michael,

Thanks! Will document everything finally... :-)

On May 7, 11:04 am, Michael Hunger <michael.hun...@neotechnology.com>
wrote:
Reply all
Reply to author
Forward
0 new messages