Unable to connect to postgres cluster

Name or service not known indicates that Django is unable to resolve the hostname taltrums-db.flycast.

logs

2024-08-10T10:59:29Z app[d890e39f034728] ams [info] INFO Sending signal SIGINT to main child process w/ PID 318
2024-08-10T10:59:29Z app[d890e39f034728] ams [info][2024-08-10 10:59:29 +0000] [318] [INFO] Handling signal: int
2024-08-10T10:59:29Z app[d890e39f034728] ams [info][2024-08-10 10:59:29 +0000] [324] [INFO] Worker exiting (pid: 324)
2024-08-10T10:59:29Z app[d890e39f034728] ams [info][2024-08-10 10:59:29 +0000] [323] [INFO] Worker exiting (pid: 323)
2024-08-10T10:59:30Z app[d890e39f034728] ams [info][2024-08-10 10:59:30 +0000] [318] [INFO] Shutting down: Master
2024-08-10T10:59:30Z app[d890e39f034728] ams [info] INFO Main child exited normally with code: 0
2024-08-10T10:59:30Z app[d890e39f034728] ams [info] INFO Starting clean up.
2024-08-10T10:59:30Z app[d890e39f034728] ams [info] WARN could not unmount /rootfs: EINVAL: Invalid argument
2024-08-10T10:59:30Z app[d890e39f034728] ams [info][  431.151299] reboot: Restarting system

What does your fly.toml look like?
Could you run the nslookup or dig command and see if your hostname is configured correctly ?
Also try the ping command to check if you can access the DNS server.

# fly.toml app configuration file generated for taltrums on 2024-08-10T05:27:44+05:30
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'taltrums'
primary_region = 'ams'
console_command = '/code/manage.py shell'

[build]

[deploy]
  release_command = 'python manage.py migrate --noinput'

[env]
  PORT = '8000'

[http_service]
  internal_port = 8000
  force_https = true
  auto_stop_machines = 'stop'
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

[[vm]]
  memory = '1gb'
  cpu_kind = 'shared'
  cpus = 1

[[statics]]
  guest_path = '/code/static'
  url_prefix = '/static/'

what command for nslookup what exactly do you mean by hostname ?
how do i ping the DNS server?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.