Push notifications not working (dns error)

Description

Push notifications are not working. Where are errors in log.

Server Setup Information

  • Version of Rocket.Chat Server: 3.15.0
  • Operating System: Debian 10
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: on
  • NodeJS Version: v12.22.1
  • MongoDB Version: 4.0.23
  • Proxy: apache
  • Firewalls involved: no

Any additional Information

Errors in logs when trying to send a message:
I20210607-08:55:05.770(0) server.js:204 Push ➔ error Error sending push to gateway (0 try) → Error: getaddrinfo EAI_AGAIN gateway.rocket.chat at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) at GetAddrInfoReqWrap.callbackTrampoline (internal/async_hooks.js:126:14) { errno: ‘EAI_AGAIN’, code: ‘EAI_AGAIN’, syscall: ‘getaddrinfo’, hostname: ‘gateway.rocket.chat’ }
On the host system DNS resolving works well: gateway.rocket.chat has 51.81.11.138 and 51.81.11.198 address.
What’s wrong in rockerchat server app?

I did a quick search in the interwebs for your error

‘EAI_AGAIN’, syscall: ‘getaddrinfo’, hostname: ‘gateway.rocket.chat’ }

I found this which is likely the issue (because is it a DNS lookup error). The Host system may have working DNS but that doesn’t mean the docker container does.

You can shell into the container and test from there as well - something like this:

docker exec -ti my_container sh

There are no test tool in docker. How i can do test dns?

I found the cause of the problem: broken firewall. The firewall was missing docker chains. Reinstalling docker solved the issue.

Cool - glad you got it sorted!