cancel
Showing results for 
Search instead for 
Did you mean: 

Error when Connecting to Neo4j

dvagal
7 - Data Storage
7 - Data Storage

I need to connect to Neo4j using a JDBC driver. Following are the details

 

neo4j_driver = com.simba.neo4j.neo4j.jdbc42.Driver

Download Driver file: https://neo4j.com/bi-connector/?version=1.0.10

URL = jdbc:neo4j://<database_id>.databases.neo4j.io?SSL=true

 

It errors when i try to connect. Following is error message:

 

Request has been terminated Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.

 

Origin is not allowed by Access-Control-Allow-Origin is this on the Neo4j side or the BI tool side ?

Any ideas how to resolve this?

2 REPLIES 2

Miguel_Blanton
7 - Data Storage
7 - Data Storage

The error message "Origin is not allowed by Access-Control-Allow-Origin" typically indicates a cross-origin resource sharing (CORS) issue. It is likely on the Neo4j side as it restricts the access of the BI tool from a different origin. To resolve this, you can try configuring the Neo4j server to allow cross-origin requests by enabling CORS headers. This can be achieved by modifying the Neo4j server configuration or using a reverse proxy server to handle CORS headers.

Thanks @Miguel_Blanton , that makes sense. There is a setting in the Neo4j server configuration file that probably drives this. I will have to test if this works

#Value of the Access-Control-Allow-Origin header sent over any HTTP or HTTPS
# connector. This defaults to '*', which allows broadest compatibility. Note
# that any URI provided here limits HTTP/HTTPS access to that URI only.
dbms.security.http_access_control_allow_origin=*