Somehow I got it working with
docker system prune -a
docker volume prune
So I got the system up and running at the previous version (3.4.1) with working certificates.
I registered a device and I got it right, when I run balena devices I can see it.
So far so good…
Then I tried to upgrade to the latest version.
I followed this procedure:
./scripts/compose down
git pull
./scripts/compose build
./scripts/compose up -d
Now the server is running, but balena CLI refuses to connect saying:
BalenaRequestError: Request error:
503 Service Unavailable
I receive the same error by testing using
https://domain/ping
Looking into docker logs on OpenBalena server I did not see anything unusual.
Any hint about what can I check?
Thank you
EDIT:
Inspecting ha_proxy container I noticed that not all services go UP, even if all containers are up and running.
Inspecting logs of those containers isn’t helpful since I only get “Systemd init system enabled.”
After restarting containers several times I get something to go UP but never all the services all together and never at first try.
EDIT 2:
Sorry for the edit… I got some more insight about the error. I’m struck here, I hope someone can point me to the right direction.
Calling:
./scripts/compose exec api journalctl -fn100
I finally got to see the errors on api service:
May 22 14:23:39 58fac93ff3cc configure-balena.sh[63]: Installing custom CA bundle...
May 22 14:23:40 58fac93ff3cc configure-balena.sh[489]: Updating certificates in /etc/ssl/certs...
May 22 14:23:42 58fac93ff3cc configure-balena.sh[489]: 0 added, 0 removed; done.
May 22 14:23:42 58fac93ff3cc configure-balena.sh[489]: Running hooks in /etc/ca-certificates/update.d...
May 22 14:23:42 58fac93ff3cc configure-balena.sh[489]: done.
May 22 14:23:42 58fac93ff3cc configure-balena.sh[1214]: 2024-05-22T14:23:42Z 58fac93ff3cc /usr/local/bin/confd[1214]: INFO Backend set to env
May 22 14:23:42 58fac93ff3cc configure-balena.sh[1214]: 2024-05-22T14:23:42Z 58fac93ff3cc /usr/local/bin/confd[1214]: INFO Starting confd
May 22 14:23:42 58fac93ff3cc configure-balena.sh[1214]: 2024-05-22T14:23:42Z 58fac93ff3cc /usr/local/bin/confd[1214]: INFO Backend source(s) set to
May 22 14:23:42 58fac93ff3cc systemd[1]: Reloading.
May 22 14:23:42 58fac93ff3cc systemd[1]: /etc/systemd/system/open-balena-api.service:14: Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring.
May 22 14:23:42 58fac93ff3cc systemd[1]: confd.service: Deactivated successfully.
May 22 14:23:42 58fac93ff3cc systemd[1]: Finished confd.service - Confd.
May 22 14:23:42 58fac93ff3cc systemd[1]: Started open-balena-api.service - open-balena-api.
May 22 14:23:42 58fac93ff3cc systemd[1]: Starting rsyslog.service - System Logging Service...
May 22 14:23:42 58fac93ff3cc systemd[1]: rsyslog.service: Main process exited, code=exited, status=1/FAILURE
May 22 14:23:42 58fac93ff3cc systemd[1]: rsyslog.service: Failed with result 'exit-code'.
May 22 14:23:42 58fac93ff3cc systemd[1]: Failed to start rsyslog.service - System Logging Service.
May 22 14:23:42 58fac93ff3cc systemd[1]: Reached target multi-user.target - Multi-User System.
May 22 14:23:42 58fac93ff3cc systemd[1]: Starting systemd-update-utmp-runlevel.service - Record Runlevel Change in UTMP...
May 22 14:23:42 58fac93ff3cc systemd[1]: systemd-update-utmp-runlevel.service: Deactivated successfully.
May 22 14:23:42 58fac93ff3cc systemd[1]: Finished systemd-update-utmp-runlevel.service - Record Runlevel Change in UTMP.
May 22 14:23:42 58fac93ff3cc systemd[1]: Startup finished in 8.245s.
May 22 14:23:43 58fac93ff3cc systemd[1]: rsyslog.service: Scheduled restart job, restart counter is at 1.
May 22 14:23:43 58fac93ff3cc systemd[1]: Stopped rsyslog.service - System Logging Service.
May 22 14:23:43 58fac93ff3cc systemd[1]: Starting rsyslog.service - System Logging Service...
May 22 14:23:43 58fac93ff3cc systemd[1]: rsyslog.service: Main process exited, code=exited, status=1/FAILURE
May 22 14:23:43 58fac93ff3cc systemd[1]: rsyslog.service: Failed with result 'exit-code'.
May 22 14:23:43 58fac93ff3cc systemd[1]: Failed to start rsyslog.service - System Logging Service.
May 22 14:23:43 58fac93ff3cc api[1237]: Running node-supervisor with
May 22 14:23:43 58fac93ff3cc api[1237]: program 'index.js'
May 22 14:23:43 58fac93ff3cc api[1237]: --watch 'src'
May 22 14:23:43 58fac93ff3cc api[1237]: --extensions 'js,node,coffee,sbvr,json,sql,pegjs,ts'
May 22 14:23:43 58fac93ff3cc api[1237]: --exec 'node'
May 22 14:23:43 58fac93ff3cc api[1237]: Starting child process with 'node index.js'
May 22 14:23:43 58fac93ff3cc api[1237]: Watching directory '/usr/src/app/src' for changes.
May 22 14:23:43 58fac93ff3cc api[1237]: Press rs for restarting the process.
May 22 14:23:43 58fac93ff3cc systemd[1]: rsyslog.service: Scheduled restart job, restart counter is at 2.
May 22 14:23:43 58fac93ff3cc systemd[1]: Stopped rsyslog.service - System Logging Service.
May 22 14:23:43 58fac93ff3cc systemd[1]: Starting rsyslog.service - System Logging Service...
May 22 14:23:43 58fac93ff3cc systemd[1]: rsyslog.service: Main process exited, code=exited, status=1/FAILURE
May 22 14:23:43 58fac93ff3cc systemd[1]: rsyslog.service: Failed with result 'exit-code'.
May 22 14:23:43 58fac93ff3cc systemd[1]: Failed to start rsyslog.service - System Logging Service.
May 22 14:23:43 58fac93ff3cc systemd[1]: rsyslog.service: Scheduled restart job, restart counter is at 3.
May 22 14:23:43 58fac93ff3cc systemd[1]: Stopped rsyslog.service - System Logging Service.
May 22 14:23:43 58fac93ff3cc systemd[1]: Starting rsyslog.service - System Logging Service...
May 22 14:23:43 58fac93ff3cc systemd[1]: rsyslog.service: Main process exited, code=exited, status=1/FAILURE
May 22 14:23:43 58fac93ff3cc systemd[1]: rsyslog.service: Failed with result 'exit-code'.
May 22 14:23:43 58fac93ff3cc systemd[1]: Failed to start rsyslog.service - System Logging Service.
May 22 14:23:44 58fac93ff3cc systemd[1]: rsyslog.service: Scheduled restart job, restart counter is at 4.
May 22 14:23:44 58fac93ff3cc systemd[1]: Stopped rsyslog.service - System Logging Service.
May 22 14:23:44 58fac93ff3cc systemd[1]: Starting rsyslog.service - System Logging Service...
May 22 14:23:44 58fac93ff3cc systemd[1]: rsyslog.service: Main process exited, code=exited, status=1/FAILURE
May 22 14:23:44 58fac93ff3cc systemd[1]: rsyslog.service: Failed with result 'exit-code'.
May 22 14:23:44 58fac93ff3cc systemd[1]: Failed to start rsyslog.service - System Logging Service.
May 22 14:23:44 58fac93ff3cc systemd[1]: rsyslog.service: Scheduled restart job, restart counter is at 5.
May 22 14:23:44 58fac93ff3cc systemd[1]: Stopped rsyslog.service - System Logging Service.
May 22 14:23:44 58fac93ff3cc systemd[1]: rsyslog.service: Start request repeated too quickly.
May 22 14:23:44 58fac93ff3cc systemd[1]: rsyslog.service: Failed with result 'exit-code'.
May 22 14:23:44 58fac93ff3cc systemd[1]: Failed to start rsyslog.service - System Logging Service.
May 22 14:23:44 58fac93ff3cc systemd[1]: syslog.socket: Failed with result 'service-start-limit-hit'.
May 22 14:23:45 58fac93ff3cc api[1247]: Error: Cannot find module '/usr/src/app/init.js' imported from /usr/src/app/index.js
May 22 14:23:45 58fac93ff3cc api[1247]: Did you mean to import "./init.ts"?
May 22 14:23:45 58fac93ff3cc api[1247]: at finalizeResolution (node:internal/modules/esm/resolve:264:11)
May 22 14:23:45 58fac93ff3cc api[1247]: at moduleResolve (node:internal/modules/esm/resolve:924:10)
May 22 14:23:45 58fac93ff3cc api[1247]: at defaultResolve (node:internal/modules/esm/resolve:1148:11)
May 22 14:23:45 58fac93ff3cc api[1247]: at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
May 22 14:23:45 58fac93ff3cc api[1247]: at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
May 22 14:23:45 58fac93ff3cc api[1247]: at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
May 22 14:23:45 58fac93ff3cc api[1247]: at ModuleLoader.import (node:internal/modules/esm/loader:322:34)
May 22 14:23:45 58fac93ff3cc api[1247]: at importModuleDynamically (node:internal/modules/esm/translators:160:35)
May 22 14:23:45 58fac93ff3cc api[1247]: at importModuleDynamicallyCallback (node:internal/modules/esm/utils:225:14)
May 22 14:23:45 58fac93ff3cc api[1247]: at start (file:///usr/src/app/index.js:8:2) {
May 22 14:23:45 58fac93ff3cc api[1247]: code: 'ERR_MODULE_NOT_FOUND',
May 22 14:23:45 58fac93ff3cc api[1247]: url: 'file:///usr/src/app/init.js'
May 22 14:23:45 58fac93ff3cc api[1247]: }
May 22 14:23:45 58fac93ff3cc api[1237]: Program node index.js exited with code 1