I tried to build connection between airflow in local docker and desktop Neo4j(1.5.6) database. The connection info was in Airflow Connections. This error raise:
neo4j.exceptions.ServiceUnavailable: Couldn't connect to localhost:7687 (resolved to ()):
Failed to establish connection to ResolvedIPv4Address(('127.0.0.1', 7687)) (reason [Errno 111] Connection refused)
Failed to establish connection to ResolvedIPv6Address(('::1', 7687, 0, 0)) (reason [Errno 99] Cannot assign requested address)
[2023-01-17, 00:06:51 UTC] {taskinstance.py:1327} INFO - Marking task as FAILED. dag_id=neo4j_workflow_tutorial2, task_id=neo4j_operator_task, execution_date=20220309T053100, start_date=20230117T000651, end_date=20230117T000651
[2023-01-17, 00:06:51 UTC] {standard_task_runner.py:105} ERROR - Failed to execute job 33525 for task neo4j_operator_task (Couldn't connect to localhost:7687 (resolved to ()):
Failed to establish connection to ResolvedIPv4Address(('127.0.0.1', 7687)) (reason [Errno 111] Connection refused)
Failed to establish connection to ResolvedIPv6Address(('::1', 7687, 0, 0)) (reason [Errno 99] Cannot assign requested address); 2498)
[2023-01-17, 00:06:51 UTC] {local_task_job.py:159} INFO - Task exited with return code 1
[2023-01-17, 00:06:52 UTC] {taskinstance.py:2582} INFO - 0 downstream tasks scheduled from follow-on schedule check
This is my Neo4j setting:
# Whether requests to Neo4j are authenticated.
dbms.security.auth_enabled=false
# Bolt connector
server.bolt.enabled=true
#server.bolt.tls_level=DISABLED
server.bolt.listen_address=:7687
server.bolt.advertised_address=localhost:7687
# HTTP Connector. There can be zero or one HTTP connectors.
server.http.enabled=true
#server.http.listen_address=:7474
#server.http.advertised_address=:7474
# HTTPS Connector. There can be zero or one HTTPS connectors.
server.https.enabled=false
#server.https.listen_address=:7473
#server.https.advertised_address=:7473
Tried many solutions from other posts which have similar problems, but still not work for me. Can anyone please help with this?