Hi OpenAI Community,
Issue: Codex cloud environment cannot connect to external databases (Neon DB). Getting ENETUNREACH errors even after enabling all network access permissions.
Error: AggregateError [ENETUNREACH]
when trying to connect to PostgreSQL database via connection string.
Question: What is the correct way to enable external database connections in Codex cloud?
Current setup:
- Environment permissions set to allow network access
- Valid database connection string
- Works fine in local environment
Need: Simple solution to connect to external databases from Codex cloud environment.
LOGS:
root@158026684d8a:/workspace/vizfleet-v4-sass-db# node validate-test-db.js > /tm
p/testdb.log && cat /tmp/testdb.log
Database configuration error:
AggregateError [ENETUNREACH]:
at internalConnectMultiple (node:net:1122:18)
at internalConnectMultiple (node:net:1190:5)
at internalConnectMultiple (node:net:1190:5)
at internalConnectMultiple (node:net:1190:5)
at internalConnectMultiple (node:net:1190:5)
at internalConnectMultiple (node:net:1190:5)
at internalConnectMultiple (node:net:1190:5)
at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1526:7)
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:132:8) {
code: 'ENETUNREACH',
[errors]: [
Error: connect ENETUNREACH 2406:da18:94d:820a:7802:44a:8047:9bf2:5432 - Loca
l (:::0)
at internalConnectMultiple (node:net:1186:16)
at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1526:7)
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:132:8) {
errno: -101,
code: 'ENETUNREACH',
syscall: 'connect',
address: '2406:da18:94d:820a:7802:44a:8047:9bf2',
port: 5432
},
Error: connect ENETUNREACH 52.220.170.93:5432 - Local (0.0.0.0:0)
at internalConnectMultiple (node:net:1186:16)
at internalConnectMultiple (node:net:1190:5)
at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1526:7)
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:132:8) {
errno: -101,
code: 'ENETUNREACH',
syscall: 'connect',
address: '52.220.170.93',
port: 5432
},
Error: connect ENETUNREACH 2406:da18:94d:821b:df69:86d1:da7a:84f1:5432 - Loc
al (:::0)
at internalConnectMultiple (node:net:1186:16)
at internalConnectMultiple (node:net:1190:5)
at internalConnectMultiple (node:net:1190:5)
at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1526:7)
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:132:8) {
errno: -101,
code: 'ENETUNREACH',
syscall: 'connect',
address: '2406:da18:94d:821b:df69:86d1:da7a:84f1',
port: 5432
},
Error: connect ENETUNREACH 13.228.184.177:5432 - Local (0.0.0.0:0)
at internalConnectMultiple (node:net:1186:16)
at internalConnectMultiple (node:net:1190:5)
at internalConnectMultiple (node:net:1190:5)
at internalConnectMultiple (node:net:1190:5)
at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1526:7)
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:132:8) {
errno: -101,
code: 'ENETUNREACH',
syscall: 'connect',
address: '13.228.184.177',
port: 5432
},
Thanks!