Gladys no longer connects to anything

Hello!
This morning there was a brief power outage at my place and since the restart, Gladys refuses to connect to anything.
Whether it’s Gladys Plus or Open Weather, etc.


I tried restarting the container, restarting the Raspberry Pi 3.

I did a ping to Google (8.8.8.8) on the Raspberry Pi, everything is OK.

I have the feeling that Gladys has preferred to close in on itself!

Any ideas to help me?

Thanks in advance!

Did you restart the Pi?

@cce66

Yes unfortunately nothing

What does « ip addr show docker0 » do?

On your idea @cce66 I tried the ping in the container

I don’t understand anymore

It doesn’t seem to come from docker or the pi but more from gladys?

Network side is OK :thinking: @pierre-gilles do you have any idea what could cause this on the Node.js side?

@spenceur do you have more information in the gladys logs?

docker logs gladys

I already checked indeed
I have a lot of errors with Telegram, I suppose the API that can’t connect.
Open Weather and the calendar, etc.

But nothing else

2022-02-12T11:57:52+0100 <error> calendar.syncUserCalendars.js:34 (CalDAVHandler.syncUserCalendars) Error: Bad status: 501
    at exports.XMLHttpRequest.request.onreadystatechange (/src/server/services/caldav/node_modules/dav-request/dav.js:3424:27)
    at exports.XMLHttpRequest.dispatchEvent (/src/server/services/caldav/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
    at setState (/src/server/services/caldav/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
    at IncomingMessage.<anonymous> (/src/server/services/caldav/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
2022-02-12T11:57:52+0100 <error> index.js:52 (Timeout.syncAllUsers [as _onTimeout]) NotFoundError: CALDAV_FAILED_REQUEST_CALENDARS
    at CalDAVHandler.syncUserCalendars (/src/server/services/caldav/lib/calendar/calendar.syncUserCalendars.js:35:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Promise.map.concurrency (/src/server/services/caldav/index.js:45:13)
2022-02-12T11:57:53+0100 <warn> message.connect.js:19 (TelegramBot.<anonymous>) Telegram polling error, code = EFATAL, message = EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org
2022-02-12T11:57:59+0100 <warn> message.connect.js:19 (TelegramBot.<anonymous>) Telegram polling error, code = EFATAL, message = EFATAL: Error: getaddrinfo EAI_AGAIN api.telegram.org
2022-02-12T11:00:04+0100 <error> index.js:77 (Object.get) Error: getaddrinfo EAI_AGAIN api.openweathermap.org
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26) {
  errno: -3001,
  code: 'EAI_AGAIN',
  syscall: 'getaddrinfo',
  hostname: 'api.openweathermap.org',
 [...]
2022-02-12T08:43:07+0100 <warn> gateway.forwardDeviceStateToGoogleHome.js:41 (sendCurrentState) Gladys Gateway: Unable to forward google home reportState
2022-02-12T08:43:07+0100 <warn> gateway.forwardDeviceStateToGoogleHome.js:42 (sendCurrentState) Error: getaddrinfo EAI_AGAIN api.gladysgateway.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26) {
  errno: -3001,
  code: 'EAI_AGAIN',
  syscall: 'getaddrinfo',
  hostname: 'api.gladysgateway.com',
  config: {
    url: 'https://api.gladysgateway.com/google/report_state',
[...]

No log when I try to log in to gladys, that doesn’t help ^^’

This looks more like a DNS resolution issue.

Can you try pinging google.com from the RPI and from the Docker container?

Ok so the network ping works, but when you ping 8.8.8.8 you are pinging the IP address and you need to then ping www.google.com to check if the DNS configuration is ok. If it is not, openweather will not be able to function as it makes its request to a DNS address (www.openweather) and not to an IP address!

Yes DNS issues (what we see in the Gladys logs)

What does « docker network inspect bridge » return to you?

@cce66 It’s hosting, not bridging on Gladys

You can try changing the DNS on the Docker side

/etc/docker/daemon.json

{
    "dns": ["9.9.9.9", "8.8.8.8"]
}

Quad9 and Google

And you restart the pi

It does indeed seem to be a DNS issue related to the host, in my opinion, with no connection to Gladys!

Hello! Indeed, I hadn’t thought of that, but indeed my NAS was also turned off and did not restart correctly.
As a result, my containers, including adguard, were also affected.
After @cicoub13’s return, I thought about it but didn’t have time to reply to you :smiley:

Thank you and indeed it had nothing to do with gladys ^^’

Yes that happens to me with Pi-hole :sweat_smile: