I just installed Neo4j today to play around on my Ubuntu EC2 instance, and I'm having two problems. First, the ubuntu install did not create a neo4j command so I'm not able to issue commands from the cli. Second, when I try this sample command to add a node to the database, I get the error
curl -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -X POST http://localhost:7474/db/data/cypher -d '{
"query" : "CREATE (n:Person { name : {name} }) RETURN n",
"params" : {
"name" : "Foo"
}
}'
I get this error:
{
"errors" : [ {
"message" : "No authorization header supplied.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]
I read the docs here, and I modified the config file per these instructions:
http://neo4j.com/docs/stable/rest-api-security.html
I updated the config file so that it should not require authentication:
dbms.security.auth_enabled=false
But still my curl requests to my localhost Neo4j server are blocked. All I can think is maybe neo4j needs a restart, but since I have no neo4j command, I can't use neo4j restart
. I logged into the neo4j shell, but in the shell's list of commands there is no restart.
So my questions are:
(1) How can I restart neo4j?
(2) Where is my neo4j command/how can I create one following a standard ubuntu install?
(3) How could I create a username/password if I wanted to keep the access authentication in place?
Thanks.
Best Answer
You restart Neo4j by calling
/path/to/neo/bin/neo4j restart
or by/etc/init.d/neo4j restart
if you installed it as a service.The neo4j startup script is in the same path as the shell.