1

I've got Neo4j installed and running on a dedicated server (NEOSERVER). NEOSERVER is a Windows Server 2008 VM and Neo4J is running as a windows service. Ultimately, I would like to be able to write data to the Neo4j database from an application server (NEOAPP). As a simple proof-of-concept test, I am using cURL from NEOAPP to try to first have data returned from the REST API.

From the command line, I am running the following cURL command:

curl -H Accept:application/json http://NEOSERVER:7474/db/data/

I receive the following error:

curl(7): Failed to connect to NEOSERVER:7474; No error.

I can run the same cURL command (using localhost instead of NEOSERVER) on NEOSERVER and can succesfully return data.

I assumed this would be pretty straightforward, but am learning otherwise. I'm new to Neo4j obviously. So, the question is, how do I connect to the Neo4j REST API from an external machine (NEOAPP, for example)?

2
  • 1
    Have you edited neo4j-server.properties to accept remote connections? Commented Nov 7, 2013 at 13:29
  • 1
    Yes. I've uncommented this following line: org.neo4j.server.webserver.address=0.0.0.0 Commented Nov 7, 2013 at 15:52

2 Answers 2

2

Try This:

curl —u <username>:<password> \
     -H Accept:application/json \
     -H Content-Type:application/json \
     -v http://localhost:7474/db/data/
Sign up to request clarification or add additional context in comments.

Comments

1

I'm assuming a DNS or network issue here. If a

ping NEOSERVER

does not succeed, either setup naming services correctly or use IP addresses instead.

If the ping runs fine, make sure you're not f***ed up by some firewall (either locally on your Windows box or somewhere in between).

1 Comment

It was a firewall issue on NEOSERVER. Windows Firewall was set to block all incoming connections. Thanks Stefan!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.