Failed to write data to connection IPv4Address(('localhost', 18709)) (IPv6Address(('::1', 18709, 0, 0)))

Please format code + Cypher statements with the code </> icon, it's much easier to read.

Please provide the following information if you ran into a more serious issue:

  • neo4j version : 4.4.3
  • what kind of API / driver do you use: neo4j-driver
  • screenshot of PROFILE or EXPLAIN with boxes expanded (lower right corner)
2023-03-16 18:02:56,244[riskintelorca.sync][ERROR] Exception occurred during sync stage azure_defender
Traceback (most recent call last):
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/neo4j/io/__init__.py", line 499, in _send_all
    self.socket.sendall(data)
OSError: [Errno 22] Invalid argument

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/intel/azuredefender/__init__.py", line 88, in start_azure_defender_ingestion
    _sync_azure_defender_vulns(neo4j_session, config, update_tag, common_job_parameters)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/intel/azuredefender/__init__.py", line 42, in _sync_azure_defender_vulns
    sync_softwares(
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/util.py", line 128, in timed
    f_return = method(*args, **kwargs)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/intel/azuredefender/software/__init__.py", line 85, in sync_softwares
    _load_software_vulns_relationship(neo4j_session=neo4j_session, vuln_software_list=vuln_software_list, update_tag=update_tag)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/util.py", line 128, in timed
    f_return = method(*args, **kwargs)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/intel/azuredefender/software/__init__.py", line 122, in _load_software_vulns_relationship
    neo4j_session.run(azure_defender_software_ingestion_query, hosts=vuln_software_list, update_tag=update_tag)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/backoff/_sync.py", line 105, in retry
    ret = target(*args, **kwargs)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/driver.py", line 69, in run
    return [future.result() for future in concurrent.futures.as_completed(futures)]
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/driver.py", line 69, in <listcomp>
    return [future.result() for future in concurrent.futures.as_completed(futures)]
  File "/export/apps/python/3.10/lib/python3.10/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/export/apps/python/3.10/lib/python3.10/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/export/apps/python/3.10/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/neo4j/work/simple.py", line 215, in run
    self._autoResult._run(
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/neo4j/work/result.py", line 113, in _run
    self._connection.send_all()
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/neo4j/io/_common.py", line 186, in inner
    func(*args, **kwargs)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/neo4j/io/__init__.py", line 515, in send_all
    self._send_all()
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/neo4j/io/__init__.py", line 501, in _send_all
    self._set_defunct_write(error)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/neo4j/io/__init__.py", line 551, in _set_defunct_write
    self._set_defunct(message, error=error, silent=silent)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/neo4j/io/__init__.py", line 581, in _set_defunct
    raise ServiceUnavailable(message) from error
neo4j.exceptions.ServiceUnavailable: Failed to write data to connection IPv4Address(('localhost', 18709)) (IPv6Address(('::1', 18709, 0, 0)))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/sync.py", line 121, in run
    stage_func(neo4j_session, config, update_tag)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/backoff/_sync.py", line 105, in retry
    ret = target(*args, **kwargs)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/util.py", line 128, in timed
    f_return = method(*args, **kwargs)
  File "/export/content/lid/apps/risk-intel-orca/dev-i001/libexec/risk-intel-orca.pyz_09135080ab6b3f2ddd39d75a9677340a4bde2ecad6949c90777c965eeacb7554/site-packages/riskintelorca/intel/azuredefender/__init__.py", line 91, in start_azure_defender_ingestion
    raise AzDefSyncError(str(e)) from e
riskintelorca.exceptions.AzDefSyncError: Failed to write data to connection IPv4Address(('localhost', 18709)) (IPv6Address(('::1', 18709, 0, 0)))
2023-03-16 18:02:56,245[riskintelorca.driver][INFO] closing sessions
2023-03-16 18:02:56,247[linkedin.cia.tasks][INFO] Calling finalize method for task result uuid: 0186ea5c-c683-653a-a608-55f62c1b4584
CALL apoc.periodic.iterate(
    "UNWIND $softwares AS host RETURN host",
    "MERGE (n:Software {id: host.software_id})
    ON CREATE SET n.firstseen = timestamp(),
    n.name = host.software_name,
    n.vendor = host.software_vendor,
    n.version = host.software_version
    SET n.lastupdated = $update_tag",
    {batchSize: $ingest_batch_size, iterateList: true, params:{softwares: $software_list, update_tag: $update_tag}}
    )

What is port '18709'?

port 18709 is NEO4J local instance connection url port

I am not familiar with that port. I use 7687 for connecting using the bolt protocol.