OpenBalena crash: Error: getaddrinfo ENOTFOUND api.github.com

Open Balena crashed yesterday. Had been running ok for over a week. There wasn’t anything going on at the time, no uploads or updates to it. The error log is included below.

I had experienced a crash before, but think unrelated (Balena Preload points to wrong registry? - #31 by Maggie).

Apr 07 10:05:34 75d79be6ace9 api[983]: )) [ 2021-04-07T10:05:34.677Z, 69 ]
Apr 07 10:05:34 75d79be6ace9 api[983]: 2021-04-07T10:05:34.684Z 172.18.0.8 s/vpn PATCH /resin/service_instance(69) 200 32.220ms -
Apr 07 10:05:40 75d79be6ace9 api[983]: Error: getaddrinfo ENOTFOUND api.github.com
Apr 07 10:05:40 75d79be6ace9 api[983]:     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
Apr 07 10:05:40 75d79be6ace9 api[983]: Program node index.js exited with code 1

It seems like it may have been a temporary DNS or network issue connecting to the GitHub API. I guess the question in both these instances is whether it should be handling these errors?

@maggie are you using PRODUCTION_MODE: "true" in the docker-compose.yml ? In production mode, the container will be cycled and stay up in the case of a network issue such as you indicated.

Oh my, no I am not, I had no idea that variable existed. I assumed it started in production mode by default. Could you point me to production deployment docs, I must have missed them :(. Is there anything else I should know for production deployment?

It seems there are two, one on the VPN container and one on the API container?

Thanks for the feedback here, @maggie. I created this issue to address creating docs or context on using PRODUCTION_MODE as a few other users have asked as well.

Have you tried out my teammates’ recommendations yet? Any success?

1 Like

I have changed the variable in both the vpn and api part of the compose file. Only time will tell whether it occurs again, but I suspect a whole bunch of things will work better for me now.

Hello Maggie. Please let us know how that works. Changing the subject slightly, you mentioned “I suspect a whole bunch of things will work better for me now.” That seems to imply that various things might not be working as well as you/we would like? Have you submitted these other questions on the forum?

As mentioned in the previous post above, there was this one: Balena Preload points to wrong registry? - #31 by Maggie