Failure to connect to Neo4j

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

Hello julia,

The Neo4j Driver comes in two forms: A Single jar neo4j-jdbc-driver-3.4.0 or Two fragmented jars (neo4j-jdbc-3.4.0 and neo4j-jdbc-http-3.4.0).
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/3.4.0/jar&sa=D&ust=1558707028525000

Regards,
Varun

Problem solved.

Thanks

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}

I hope the problem was solved by: Testing connection to Neo4J fails ?

Hi Varun,

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

Thanks

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:

Datasource setup:

  • To configure a datasource, you go to Management -> Datasources (In Investigate).
  • Select JDBC
  • Set ‘Datasource Type’ to ‘Neo4j’. Give it a Name, fill in username, password and connection string. And you get something like this:
  • 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:
  • Then click on test connection:
    image

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

i dont find the dropdown as neo4j in the database type

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

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