This is my first time using balena, and I’m experiencing an issue with my deployment and would appreciate any help or insights.
What I’ve done so far:
I built and uploaded my image successfully and pushed it to my fleet. The release status is shown as “Downloaded” in the dashboard, so the image appears to be in place on the device.
However, when I check the logs, the device seems to be stuck at this step: Installing service 'obs_360 sha256:956e06fd06a3c29b427fc6054ce86fdf053725830f2c906005f650a956ab3715'
When I try to start the service, I receive an error message that reads: Request error: App not found: an app needs to be installed for this endpoint to work. If you've recently moved this device from another app, please push an app and wait for it to be installed first.
Hello, are you able to provide your docker-compose file? (or Dockerfile if you are not using compose.) We can start by checking that to see if anything stands out.
I’ve attached my Dockerfile for your reference. I’m currently using it to run a GUI python app (built with kivy) both locally on a Linux PC for development and remotely on a Raspberry Pi as the production environment.
Thanks for the help, hope you can shed some light on this.
you should probably have single or double quotes around your named volume field, see: Multiple containers | balena (example: 'obs_360_data:/obs_360_data')
I think I might be narrowing down the issue. After following your suggestions, here’s what I’ve tried so far:
Adding quotes to the named volume didn’t change anything.
Removed the tty tag.
Regarding variable substitution: inside my .balena directory, I have a balena.yml file with build-variables that match the ones listed under the args section. I followed this example: balena build secrets and variables. However, I’m still not sure that I fully understand how this works. Here are some questions, hope you can clear these out:
Should I also define these variables in the dashboard, or is the balena.yml file enough? I also have a .env file locally with the same variables.
If I define the variables in the balena.yml , then I do not need to define the args tag? In the example, inside the image there is this line RUN cat /run/secrets/my-recipe to cat the secrets, but I didn’t see anything, that is why I added them under args.
One odd thing I noticed: if I comment out the working_dir tag, the build process goes through (even with tty and args). Sometimes the container starts successfully, and other times it fails with the same error as before.
It seems like this might come down to a misunderstanding of how build-variables are handled. What’s the correct way to set them up, via the balena.yml file in the .balena directory, or directly through the dashboard?