azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
3.45k stars 119 forks source link

[BUG]: Can't update/delete a port #174

Closed joeymukherjee closed 7 months ago

joeymukherjee commented 8 months ago

What happened?

When I go to my cosmos-server/ServApps, and then view details. I then go to the Network tab on the side. I click the trash can on the port and the container crashes.

What should have happened?

It should have removed the port.

How to reproduce the bug?

  1. Go to ServApps
  2. Click on View Details of the cosmos-server
  3. Click on 'Network'
  4. Click the trash can on one of the ports. (I added 15673 once)
  5. Container stops

Relevant log output

No response

Other details

No response

System details

azukaar commented 8 months ago

The container cannot crash when you click the trash can, because until you hit "save" nothing is done to the container,, could you describe the issue with (a lot) more details please? and some logs too

joeymukherjee commented 8 months ago

Yes, you are right. I am also clicking "Update Ports". I see a "Load failed" and then the container crashes with: cosmos-server | 2024/01/15 16:58:46 [INFO] UpdateContainerUpdating container cosmos-server | 2024/01/15 16:58:46 [INFO] EditContainer - inspecting previous container 73e4c87486f0d8573a668127a1ff8201c134914e739f7057e97f1aa74807774c cosmos-server | 2024/01/15 16:58:46 [INFO] EditContainer - Container updating. Retriveing currently running 73e4c87486f0d8573a668127a1ff8201c134914e739f7057e97f1aa74807774c cosmos-server | 2024/01/15 16:58:54 "GET https://xx.xx.xx.xx/cosmos/api/notifications HTTP/2.0" from xx.xx.xx.xx:65341 - 200 1324B in 3.40324ms cosmos-server exited with code 0

Is there another place to see logs? Is there something else to check? I'm somewhat new to docker.

azukaar commented 7 months ago

This is not a crash, cosmos-server exited with code 0 means it terminated gracefully. Something you've done causes this, I really dont think it's port updating? Can you reproduce this consistently?

joeymukherjee commented 7 months ago

So when I went to the Cosmos UI, it said to migrate to host mode and now the ports are gone, so no, I can't duplicate it anymore. Before I migrated, I could! So maybe that's a good fix for this.

azukaar commented 7 months ago

AHHHH you were trying to edit Cosmos itself! Alright that explains it: a container cannot update itself, simple as that. Normally Cosmos prevents you from even trying but I might have missed something here. Does not matter anymore since ports are gone indeed :)