dcaputo-harmoni / open-balena-admin

Open Balena Admin
MIT License
94 stars 20 forks source link

On 'compose up', getting 'openbalena_default not found' #40

Closed djohnson-mulytic closed 5 months ago

djohnson-mulytic commented 5 months ago

Hi all, this community has been great, really appreciate the support. I've encountered a strange issue $ open-balena-admin/scripts/compose up WARN[0000] /home/balena/open-balena-admin/compose/services.yml: version is obsolete WARN[0000] /home/balena/open-balena-admin/config/docker-compose.yml: version is obsolete Error response from daemon: network openbalena_default not found

I'm not sure what to say, since it's there: $ grep -r -o -i "openbalena_default" * open-balena-admin/compose/services.yml:openbalena_default open-balena-admin/compose/services.yml:openbalena_default open-balena-admin/compose/services.yml:openbalena_default open-balena-admin/compose/services.yml:openbalena_default

Any thoughts on what the error is saying and how I should point it out?

robbe-haesendonck commented 5 months ago

Hi!

It seems this error is related to the network not existing. I suppose you're trying to run this on a different host than the one openbalena is running on.

In the docker docs (https://docs.docker.com/compose/compose-file/06-networks/#external) the following is mentioned:

external specifies that this network’s lifecycle is maintained outside of that of the application. Compose doesn't attempt to create these networks, and returns an error if one doesn't exist.

You can create the network manually, but then you'll probably also need to edit some of the environment variables to make sure open-balena-admin can access the necessary openbalena components.

I hope this helps! Best regards Robbe

djohnson-mulytic commented 5 months ago

Hi Robbe, thanks for getting back to me. I actually am running it on the same host as OpenBalena. I wonder if this means my OpenBalena configuration is messed up...

Right now, I have charging stations that connect to this OpenBalena instance, so that is working, making me think Openbalena itself is using the network.

FYI, if it helps, I used the following to set it up. https://open-balena.pages.dev/getting-started/

robbe-haesendonck commented 5 months ago

Can you execute docker network ls and see if the openbalena_default network is there? Also, if the balena cli is working all should be fine on the openbalena end.

I suspect the network isn't there due to some change in OpenBalena and the recent PR. I think the easiest option is to find out which network name is used for openbalena (using the command above) and then just use that name.

djohnson-mulytic commented 5 months ago

Hey Robbe, you're exactly right! Wow, that's awesome thanks.

bdf6d2dae9ff open-balena_default bridge local

got it fixed, thanks