Skip to content

Commit

Permalink
Fix opentofu-runner postgresql connection refused
Browse files Browse the repository at this point in the history
```
opentofu-runner[17378]: Error: getaddrinfo ENOTFOUND host.containers.internal
opentofu-runner[17378]:     at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
opentofu-runner[17378]: Emitted 'error' event on DataSource instance at:
opentofu-runner[17378]:     at DataSource.postInit (/opt/app-root/src/node_modules/loopback/node_modules/loopback-datasource-juggler/lib/datasource.js:489:16)
opentofu-runner[17378]:     at PendingItem.callback (/opt/app-root/src/node_modules/loopback-connector-postgresql/lib/postgresql.js:130:17)
opentofu-runner[17378]:     at Client._connectionCallback (/opt/app-root/src/node_modules/pg-pool/index.js:254:23)
opentofu-runner[17378]:     at Client._handleErrorWhileConnecting (/opt/app-root/src/node_modules/pg/lib/client.js:327:19)
opentofu-runner[17378]:     at Client._handleErrorEvent (/opt/app-root/src/node_modules/pg/lib/client.js:337:19)
opentofu-runner[17378]:     at Connection.emit (node:events:517:28)
opentofu-runner[17378]:     at Socket.reportStreamError (/opt/app-root/src/node_modules/pg/lib/connection.js:58:12)
opentofu-runner[17378]:     at Socket.emit (node:events:517:28)
opentofu-runner[17378]:     at emitErrorNT (node:internal/streams/destroy:151:8)
opentofu-runner[17378]:     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
opentofu-runner[17378]:     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
opentofu-runner[17378]:   errno: -3008,
opentofu-runner[17378]:   code: 'ENOTFOUND',
opentofu-runner[17378]:   syscall: 'getaddrinfo',
opentofu-runner[17378]:   hostname: 'host.containers.internal'
opentofu-runner[17378]: }
opentofu-runner[17378]:
opentofu-runner[17378]: Node.js v18.20.2
```
  • Loading branch information
agrare committed May 24, 2024
1 parent 6d2faff commit 4bdcfb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion systemd/opentofu-runner.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WantedBy=opentofu-runner.target
User=manageiq
Group=manageiq
ExecStartPre=/bin/rm -f /tmp/%n.cid
ExecStart=/usr/bin/podman run --conmon-pidfile %T/%N.pid --cidfile %T/%N.cid --cgroup-manager=cgroupfs --cgroups=no-conmon --log-driver=journald --replace --name=opentofu-runner --secret=opentofu-runner-secret --root=/var/www/miq/vmdb/data/containers/storage --env=DATABASE_HOSTNAME=${DATABASE_HOSTNAME} --env=DATABASE_NAME=${DATABASE_NAME} --env=DATABASE_USERNAME=${DATABASE_USERNAME} --env=MEMCACHE_SERVERS=${MEMCACHE_SERVERS} --expose=6000 $OPENTOFU_RUNNER_IMAGE
ExecStart=/usr/bin/podman run --conmon-pidfile %T/%N.pid --cidfile %T/%N.cid --cgroup-manager=cgroupfs --cgroups=no-conmon --log-driver=journald --replace --name=opentofu-runner --secret=opentofu-runner-secret --root=/var/www/miq/vmdb/data/containers/storage --env=DATABASE_HOSTNAME=${DATABASE_HOSTNAME} --env=DATABASE_NAME=${DATABASE_NAME} --env=DATABASE_USERNAME=${DATABASE_USERNAME} --env=MEMCACHE_SERVERS=${MEMCACHE_SERVERS} --expose=6000 --net=host $OPENTOFU_RUNNER_IMAGE
ExecStop=/usr/bin/podman stop --ignore -t 30 --cidfile %T/%N.cid --cgroup-manager=cgroupfs --root=/var/www/miq/vmdb/data/containers/storage
ExecStopPost=/usr/bin/podman rm --ignore --cidfile %T/%N.cid --cgroup-manager=cgroupfs --root=/var/www/miq/vmdb/data/containers/storage
ExecStopPost=/usr/bin/rm -f %T/%N.pid %T/%N.cid
Expand Down

0 comments on commit 4bdcfb4

Please sign in to comment.