# Failure to connect to Neo4j

**URL:** <https://community.siren.io/t/failure-to-connect-to-neo4j/98>\
**Category:** Siren Platform/Investigate Tech Support Community\
**Created:** [July 23, 2019, 11:27pm UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98 "2019-07-23T23:27:16Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![julia.glen](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@julia.glen](https://community.siren.io/u/julia.glen)\
**Post date:** [July 23, 2019, 11:27pm UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/1 "2019-07-23T23:27:16Z")

</div>

Testing the JDBC connection to neo4j generates the following error message

Datasources Configuration Editor: Could not validate datasource [MVP]. {“error”:{“root\_cause”:[{“type”:“exception”,“reason”:“Detected conflicting jars in the JDBC drivers directory, please remove them and restart Elasticsearch.”}],“type”:“exception”,“reason”:“Could not validate datasource [MVP].”,“caused\_by”:{“type”:“exception”,“reason”:“Could not initialize the JDBC driver loader.”,“caused\_by”:{“type”:“exception”,“reason”:“Detected conflicting jars in the JDBC drivers directory, please remove them and restart Elasticsearch.”,“caused\_by”:{“type”:“illegal\_state\_exception”,“reason”:“jar hell!\r\nclass: org.neo4j.jdbc.http.HttpDriver\r\njar1: C:\Apps\siren-platform-no-data-no-security-10.2.4-windows-x86\_64\elasticsearch\config\jdbc-drivers\neo4j-jdbc-http-3.4.0.jar\r\njar2: C:\Apps\siren-platform-no-data-no-security-10.2.4-windows-x86\_64\elasticsearch\config\jdbc-drivers\neo4j-jdbc-driver-3.4.0.jar”}}}},“status”:500}

Thanks

---

<div class="post-metadata">

**Author:** ![varun.sharma](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/varun.sharma/32/46_2.png) [@varun.sharma](https://community.siren.io/u/varun.sharma)\
**Post date:** [July 24, 2019, 10:27am UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/2 "2019-07-24T10:27:50Z")

</div>

Hello julia,

The Neo4j Driver comes in two forms: A Single jar [`neo4j-jdbc-driver-3.4.0`](https://mvnrepository.com/artifact/org.neo4j/neo4j-jdbc-driver/3.4.0) or Two fragmented jars ([`neo4j-jdbc-3.4.0`](https://search.maven.org/artifact/org.neo4j/neo4j-jdbc/3.4.0/jar&sa=D&ust=1558707028525000) and [`neo4j-jdbc-http-3.4.0`](https://search.maven.org/artifact/org.neo4j/neo4j-jdbc-http/3.4.0/jar&sa=D&ust=1558707028525000)).  
You seem to have downloaded `neo4j-jdbc-http-3.4.0` and the complete driver jar (`neo4j-jdbc-driver-3.4.0`). Hence the jar hell. We require the fragmented jars in Federate (as of 10.2.4), so the correct driver jars are:  
[https://search.maven.org/artifact/org.neo4j/neo4j-jdbc-http/3.4.0/jar&sa=D&ust=1558707028525000](https://search.maven.org/artifact/org.neo4j/neo4j-jdbc-http/3.4.0/jar&sa=D&ust=1558707028525000)  
[https://search.maven.org/artifact/org.neo4j/neo4j-jdbc/3.4.0/jar&sa=D&ust=1558707028525000](https://search.maven.org/artifact/org.neo4j/neo4j-jdbc/3.4.0/jar&sa=D&ust=1558707028525000)

Regards,  
Varun

---

<div class="post-metadata">

**Author:** ![julia.glen](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@julia.glen](https://community.siren.io/u/julia.glen)\
**Post date:** [July 24, 2019, 10:16pm UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/3 "2019-07-24T22:16:55Z")

</div>

Problem solved.

Thanks

---

<div class="post-metadata">

**Author:** ![julia.glen](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@julia.glen](https://community.siren.io/u/julia.glen)\
**Post date:** [July 24, 2019, 10:58pm UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/4 "2019-07-24T22:58:01Z")

</div>

Follow-up issue. Now Running the same thing I am getting the following error:

Datasources Configuration Editor: Could not validate datasource [MVP]. {“error”:{“root\_cause”:[{“type”:“exception”,“reason”:“Could not validate datasource [MVP].”}],“type”:“exception”,“reason”:“Could not validate datasource [MVP].”,“caused\_by”:{“type”:“s\_q\_l\_transient\_connection\_exception”,“reason”:“MVP-pool - Connection is not available, request timed out after 30107ms.”}},“status”:500}

---

<div class="post-metadata">

**Author:** ![varun.sharma](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/varun.sharma/32/46_2.png) [@varun.sharma](https://community.siren.io/u/varun.sharma)\
**Post date:** [August 12, 2019, 10:43am UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/5 "2019-08-12T10:43:55Z")

</div>

I hope the problem was solved by: [Testing connection to Neo4J fails](https://community.siren.io/t/testing-connection-to-neo4j-fails/103/11) ?

---

<div class="post-metadata">

**Author:** ![julia.glen](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@julia.glen](https://community.siren.io/u/julia.glen)\
**Post date:** [August 12, 2019, 4:55pm UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/6 "2019-08-12T16:55:21Z")

</div>

Hi Varun,

thanks for asking - no it did not. I would appreciate your help on resolving this matter.

Thanks

---

<div class="post-metadata">

**Author:** ![varun.sharma](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/varun.sharma/32/46_2.png) [@varun.sharma](https://community.siren.io/u/varun.sharma)\
**Post date:** [August 12, 2019, 6:00pm UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/7 "2019-08-12T18:00:23Z")

</div>

Hello julia,  
`MVP-pool - Connection is not available, request timed out after 30107ms.` Means that the Elasticsearch server is not able to communicate with Neo4j. **Note** : It is to be noted that the NeoNode script uses a bolt connection while Federate/Elasticsearch while setting up the datasource uses a JDBC connection so the connection strings would be different.

Let’s start with the beginning to confirm everything is correct:

**Configuration check-list to make sure everything is fine:**

- So, you have a Neo4J instance running somewhere and you are able query it.
- You have downloaded the following JDBC jar files and place them in the `.../elasticsearch/config/jdbc-drivers/` directory:  
[https://search.maven.org/artifact/org.neo4j/neo4j-jdbc-http/3.4.0/jar&sa=D&ust=1558707028525000](https://search.maven.org/artifact/org.neo4j/neo4j-jdbc-http/3.4.0/jar&sa=D&ust=1558707028525000)  
[https://search.maven.org/artifact/org.neo4j/neo4j-jdbc/3.4.0/jar&sa=D&ust=1558707028525000](https://search.maven.org/artifact/org.neo4j/neo4j-jdbc/3.4.0/jar&sa=D&ust=1558707028525000)
- You’ve added the following line to the `elasticsearch.yml` file:  
node.attr.connector.jdbc: true
- You’ve restarted Elasticsearch afterwards. Got Investigate server up.

**Datasource setup:**

- To configure a datasource, you go to Management -\> Datasources (In Investigate).
- Select JDBC  
 ![image](https://canada1.discourse-cdn.com/flex032/uploads/siren/original/1X/aa123dff3c0b24984e86b0cbe5c8a261e4ae1300.png)
- Set ‘Datasource Type’ to ‘Neo4j’. Give it a `Name`, fill in `username`, `password` and `connection string`. And you get something like this:  
 ![image](https://canada1.discourse-cdn.com/flex032/uploads/siren/original/1X/09f53b60a72b13cfd6d8c90c796fcae1f2ed637f.png)
- Make sure the connection string is correct format: `jdbc:neo4j:http://<host>:<port>/` and you are able to communicate to the Neo4j server from the server where Elasticsearch is located.
- Click on save at the top:  
 ![image](https://canada1.discourse-cdn.com/flex032/uploads/siren/original/1X/d19da53193651d8c259d6f634773b7719ca01f30.png)
- Then click on test connection:  
 ![image](https://canada1.discourse-cdn.com/flex032/uploads/siren/original/1X/6470aaef82fb2f9ead860129ced89a387c984caf.png)

If you still face the same issue then it means that there is some firewall or the Neo4j server is only bound to localhost. What is the server configuration of your setup? Where is Neo4j, NeoNode script and Elasticsearch running. Is NeoNode able to communicate with the Neo4j server?

Regards,  
Varun

---

<div class="post-metadata">

**Author:** ![Saili\_Bakalkar](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/saili_bakalkar/32/102_2.png) [@Saili\_Bakalkar](https://community.siren.io/u/Saili_Bakalkar)\
**Post date:** [November 25, 2019, 5:50am UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/8 "2019-11-25T05:50:30Z")

</div>

i dont find the dropdown as neo4j in the database type

---

<div class="post-metadata">

**Author:** ![mike.hughes](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/mike.hughes/32/10_2.png) [@mike.hughes](https://community.siren.io/u/mike.hughes)\
**Post date:** [November 28, 2019, 4:08pm UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/9 "2019-11-28T16:08:18Z")

</div>

You can find the information here on how setup the Neo4J datasource here [https://docs.support.siren.io/10.3.3/platform/en/siren-investigate/data-reflection/integrating-neo4j-data.html](https://docs.support.siren.io/10.3.3/platform/en/siren-investigate/data-reflection/integrating-neo4j-data.html)

You need to set up a Neo4J source yourself using JDBC with connection details.

---

<div class="post-metadata">

**Author:** ![rushikesh\_haral](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/rushikesh_haral/32/115_2.png) [@rushikesh\_haral](https://community.siren.io/u/rushikesh_haral)\
**Post date:** [February 16, 2020, 2:29pm UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/10 "2020-02-16T14:29:00Z")

</div>

hi i am facing same issue … i have some questions…  
what should be username and password… i have create one graph database in neo4j named as Graph… where should i mentioned it… In siren it say name field is mandatory …can u tell me what to right in those fields specifically… abt neo4j database … i am using community edition and have created regular graph …

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/siren/original/1X/cf25812e1420bdcd549c402db47217718ae0348e.png)

when i click on test connection this error comes: Pls reply ASAP… i have work to do…  
Datasources Configuration Editor: Could not validate datasource [Graph]. {“error”:{“root\_cause”:[{“type”:“exception”,“reason”:“Could not validate datasource [Graph].”}],“type”:“exception”,“reason”:“Could not validate datasource [Graph].”,“caused\_by”:{“type”:“exception”,“reason”:“Could not execute datasource query.”,“caused\_by”:{“type”:“no\_class\_def\_found\_error”,“reason”:“org/neo4j/jdbc/Neo4jDriver”,“caused\_by”:{“type”:“class\_not\_found\_exception”,“reason”:“org.neo4j.jdbc.Neo4jDriver”}}}},“status”:500}

---

<div class="post-metadata">

**Author:** ![varun.sharma](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/varun.sharma/32/46_2.png) [@varun.sharma](https://community.siren.io/u/varun.sharma)\
**Post date:** [February 17, 2020, 6:15pm UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/11 "2020-02-17T18:15:22Z")

</div>

You seem to be missing the Neo4j Driver, did you install one? As per the [documentation](https://docs.support.siren.io/10.3.4/platform/en/siren-federate/connecting-to-remote-datasources/connecting-to-jdbc-datasources.html#UUID-d2fde02b-922c-a812-b9c2-f488ffe9cd3c), you may install the driver by:

- Placing the [JDBC driver jar](https://repo1.maven.org/maven2/org/neo4j/neo4j-jdbc-driver/3.4.0/neo4j-jdbc-driver-3.4.0.jar) in `elasticsearch/config/jdbc-drivers` folder.
- Restart elasticsearch

Username and password are used to authenticate against the datasource.

---

<div class="post-metadata">

**Author:** ![rushikesh\_haral](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/rushikesh_haral/32/115_2.png) [@rushikesh\_haral](https://community.siren.io/u/rushikesh_haral)\
**Post date:** [February 18, 2020, 1:25am UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/12 "2020-02-18T01:25:28Z")

</div>

Hi Varun thx for replying… I have installed driver in proper location as per the documentation…still facing the issue

---

<div class="post-metadata">

**Author:** ![rushikesh\_haral](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/rushikesh_haral/32/115_2.png) [@rushikesh\_haral](https://community.siren.io/u/rushikesh_haral)\
**Post date:** [February 18, 2020, 6:14am UTC](https://community.siren.io/t/failure-to-connect-to-neo4j/98/13 "2020-02-18T06:14:04Z")

</div>

tell me how do you get that local-neo4j database name in siren…is it appears automatic ?..Is there a proper video description of this?..
