CasaOS icon indicating copy to clipboard operation
CasaOS copied to clipboard

[Bug] can't create container with custom network. Error: network casaos was found but has incorrect label com.docker.compose.network set to ""

Open raphamotta opened this issue 2 years ago • 23 comments
trafficstars

Describe the bug

I was using CasaOS without problem in the last 6 months. Today I re-run the install script again for updates (I was already on 0.4.4.1) to see if have new updates. I got the terminal working again (was a known bug) but now I can't create containers from UI with a custom network I have, it calls 'casaos'. I got this error:

network casaos was found but has incorrect label com.docker.compose.network set to ""

I can attach it to container with Portainer as a workaround. It's indeed a bug because I did not have this problem with other old installations.

To Reproduce

Create a custom network and try to change to this in any container from UI.

Expected behavior

no error

Desktop (please complete the following information):

 - OS: Debian 12
 - Browser [e.g. chrome, safari] - Edge
 - Version: latest 117
testing on Raspberry pi and Orange pi

raphamotta avatar Sep 04 '23 00:09 raphamotta

Our application center has been reconstructed, that is, before 0.4.4 applications in 0.4.4 and later versions will appear incompatible problems, we are also actively adapting, we are sorry for the inconvenience caused to you, if necessary, we can assist you to solve the problem.

LinkLeong avatar Sep 04 '23 03:09 LinkLeong

That's OK, I know bugs happens, and I discovered out a workaround. Just to let you know about the bug and hopefully get it fixed soon

raphamotta avatar Sep 04 '23 11:09 raphamotta

Thank you for your feedback, please keep in touch with us if you have any questions.

LinkLeong avatar Sep 05 '23 02:09 LinkLeong

Please don't close the issue, I just tested with a clean installation and it still exist

raphamotta avatar Sep 05 '23 22:09 raphamotta

Okay, we'll follow up.

LinkLeong avatar Sep 06 '23 02:09 LinkLeong

@raphamotta Any progress?

LinkLeong avatar Sep 11 '23 03:09 LinkLeong

@raphamotta Any progress?

I have the same issue with a fresh installation. Could you please test it too?

raphamotta avatar Sep 11 '23 16:09 raphamotta

Can you export the app to me?

LinkLeong avatar Sep 19 '23 10:09 LinkLeong

Ok, steps to reproduce @LinkLeong :

First, create a custom network thru cli:

docker network create mynetwork

Then, from UI, try to add any container with this new created network. Example:

image

Try to deploy:

image

Could you try to reproduce? There's no file to send to you since no container was created.

I can say that with previous version this was working

raphamotta avatar Sep 26 '23 22:09 raphamotta

i have same problem with ui use custom docker network but if you use docker-compose.yml

with external:true is work

version: '3'
services:
  main:
    networks:
      - appnet
  ....
networks:
  appnet:
    external: true

cyrus0880 avatar Sep 27 '23 03:09 cyrus0880

Can you export the app to me?

what version will work? i have same problem in 4.4.2 & 4.4.3

cyrus0880 avatar Sep 28 '23 02:09 cyrus0880

Can you export the app to me?

if install apps from apps store use docker custom network can do this edit /var/lib/casaos/apps/xxxxx/docker-compose.yml

find this setting and add external: true

networks:
   app:
      name: app
      external: true  # < add this line

and go to ui click start will work

can you fix this at casaos code?

cyrus0880 avatar Sep 28 '23 03:09 cyrus0880

Can you export the app to me?

what version will work? i have same problem in 4.4.2 & 4.4.3

4.4.1 and older works, I have one server that I did not update yet

raphamotta avatar Sep 28 '23 20:09 raphamotta

This issue still happens on 0.4.5. I will not update till this issue is solved, it's very important to choose the network in the UI.

raphamotta avatar Jan 18 '24 10:01 raphamotta

Same error with 0.4.6 version. If you will not fix it, I suggest to take it off from UI.

raphamotta avatar Jan 23 '24 12:01 raphamotta

I just recently discovered CasaOS and started playing around with it when I ran into this issue, too. I'm running 0.4.7, and the inability to use custom networks is preventing me from really fully utilizing this. I hope that this can be fixed in a future update.

OldManBrodie avatar Mar 24 '24 05:03 OldManBrodie

Still an issue in 0.4.8

Parlax avatar May 10 '24 23:05 Parlax

Same on 0.49. Please @LinkLeong , help us.

raphamotta avatar May 26 '24 12:05 raphamotta

Happened with me too. I'm on 0.49

Any workarounds?

lk-vila avatar Jul 08 '24 23:07 lk-vila

This issue occurs normally when you change the network from the UI. You can use my script to edit the Docker Compose. https://community.bigbeartechworld.com/t/added-an-edit-casaos-apps-script/197?u=dragonfire1119

dragonfire1119 avatar Jul 09 '24 00:07 dragonfire1119

You can also add the network to a container via Portainer however this is a band-aid fix.

Bring down the containers, Add the containers to the network, Bring up the containers.

If the containers go down for any reason (system reboot, config change etc) then they will revert to the bridge network and you will have to do it again.

Once you've done this, try ping one of the containers for another container and it should work.

chxlls avatar Jul 11 '24 00:07 chxlls

Managed to add custom network using: sudo docker network create --label com.docker.compose.network=casaos casaos Using 0.49

felipechang avatar Jul 12 '24 18:07 felipechang