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.1k stars 112 forks source link

[BUG]: Cosmos-Server Crashes and does not recover if URLs has an error #93

Closed CropWatchDevelopment closed 4 months ago

CropWatchDevelopment commented 11 months ago

What happened?

Enter a bad proxy type in the URLs section and Cosmos will crash and become un-recoverable

What should have happened?

It should not crash, or require a full delete and restart. Perhaps check for bad values being entered before saving?

How to reproduce the bug?

  1. Go to URLs
  2. Click on Create
  3. Enter some sort of proxy values, I have been unable to figure out what is bad as cosmos crashes and I can't get it to load
  4. really quickly delete /var/lib/cosmos and resetup before people complain (had to do this 2 times :( )

Relevant log output

No response

Other details

No response

System details

azukaar commented 11 months ago

What do you mean by wrong "proxy type"? Which value exactly requires validation?

image

CropWatchDevelopment commented 11 months ago

Yes, I suspect that I accidentily put the server IP address there, and not the URL... OR what I did was enter a url, but it wasn't setup in my dns server yet

azukaar commented 11 months ago

It shouldnt crash though, it should just have a broken URL... can you give me an example of something that crashes?

CropWatchDevelopment commented 11 months ago

If I get a chance I will try to re-create this. I need to first setup a less used server :)

kverbyob commented 8 months ago

When I was playing around with URLs, I got into a situation where the cosmos-server container would not start. Regardless of the configuration, I would expect the routing to break, but the container should always be able to start.

What I did:

  1. ServApps -> cosmos-server -> URLs -> New
  2. enable "Use Host" using cosmos.myrealdomain.name

The docker logs showed: 2023/12/25 18:37:30 [ERROR] Container tries to connect to a non existing Cosmos network, replacing it. : Error response from daemon: network auto not found

azukaar commented 4 months ago

Fixed, wrong targets / hostname now simply show an error