hi,
I am a new Influxdb user and already spend a couple of days to figure out why write fail.
I wrote a nodejs script that use @influxdata/influxdb-client lib and used best practice found on github to batch import using API. So far the script is working well for loading around 1300 records at once into influxdb.
however for larger set of import it fail with a : Write to InfluxDB failed (attempt: 1). Error: connect EADDRNOTAVAIL 172.18.0.2:8086 - Local (0.0.0.0:0)
The script is making sure no duplicate are present and Influxdb is a Docker latest image.
What i am doing wrong? No error in container logs even having set logging level to debug/error.
Thanks for your help
Here is the console log output i get for an import of 30762 measurements:
2023-08-15-DATAXXXXXXXX
flush writeApi: chunk #1
flush writeApi: chunk #2
flush writeApi: chunk #3
flush writeApi: chunk #4
flush writeApi: chunk #5
flush writeApi: chunk #6
flush writeApi: chunk #7
2023-08-15-DATAXXXXXXXX - Inserted: 30762
WARN: Write to InfluxDB failed (attempt: 1). Error: connect EADDRNOTAVAIL 172.18.0.2:8086 - Local (0.0.0.0:0)
at internalConnect (node:net:1094:16)
at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1493:9)
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:132:8)
at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -99,
code: ‘EADDRNOTAVAIL’,
syscall: ‘connect’,
address: ‘172.18.0.2’,
port: 8086
}
node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect EADDRNOTAVAIL 172.18.0.2:8086 - Local (0.0.0.0:0)
at internalConnect (node:net:1094:16)
at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1493:9)
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:132:8)
at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -99,
code: ‘EADDRNOTAVAIL’,
syscall: ‘connect’,
address: ‘172.18.0.2’,
port: 8086
}
Node.js v20.16.0
.
A record is made of multiple mesurements having int and float.