Alright. We can close this then.
To recap: Local mode API (i.e. the NDJSON one) works only when your app is in development mode, and the non-local mode API (i.e. the one that listens to journald) is not yet fully in production, but would be (hopefully) by the time the next guy/girl reads this.
Honestly though, despite the mishap here, your guys’ support is remarkable. Thank you!
persisted across reboot?
Also, this is a command to run locally in the device, right? If so, in order to read logs remotely the SDK is more viable solution, right?
thanks
Hi @banto-78 the logs are only persisted over reboot if you set the “persistent logging” device configuration setting (found on the Actions page). This will allow one to see past boots on the hostOS using journalctl. For reading the logs remotely or storing them in the container you can use the supervisor API mentioned here: https://www.balena.io/docs/reference/supervisor/supervisor-api/#journald-logs
Hi @tomgs can you tell me how you manage to run BalenaOS-in-contianer.
I have try ./balenaos-in-container.sh --image balenalib/raspberrypi3-64-alpine-node -c config.json, but I got:
Status: Downloaded newer image for balenalib/raspberrypi3-64-alpine-node:latest
INFO: Running balenaOS as container balena-container-21248 …
WARNING: Localhost DNS setting (–dns=127.0.0.2) may fail in containers.
can’t run ‘/sbin/openrc’: No such file or directory
can’t run ‘/sbin/openrc’: No such file or directory
can’t run ‘/sbin/openrc’: No such file or directory
can’t run ‘/sbin/openrc’: No such file or directory
And I have search over DockerHub didn’t find balenaOS Docker Image from Balenalib. Should I build the balenaOS docker image myself, or there is another way?
I am new with balena. Anything is apprecated, please.
@zvin thanks for you reply! I can see the container is running, but it seen there is noting inside, like balenaEngine or balena-supervisor. Is it suppose to be like that, or there are ways I can setup balenEngine and balena-supervisor?
ONe of my colleagues just pointed you are using a balena base-image and you are supposed to use a balenaOS base image. Try using this image resin/resinos:2.44.0_rev1-intel-nuc with the command.
Is there another way to translate the container ids to container names other than bind-mounting the balena socket into a container? Bind mounting the socket into the container provides a bit more privileges to the container than I would like to give it. Without the names the logs are much less useful since we cannot see or filter which service created it.