louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
56.82k stars 5.11k forks source link

Self Reset #4969

Open jpzone282 opened 2 months ago

jpzone282 commented 2 months ago

⚠️ Please verify that this question has NOT been raised before.

🛡️ Security Policy

📝 Describe your problem

Hello, I have been running Uptime Kuma for around 11 days. Just tried to login to check a few things and it randomly asked me to create an account. Its like it was "factory reset". I already set things up and everything. Have I missed a setting?

📝 Error Message(s) or Log

No response

🐻 Uptime-Kuma Version

Latest

💻 Operating System and Arch

Ubuntu 24.04 LTS

🌐 Browser

Chrome 126.0.6478.185

🖥️ Deployment Environment

CommanderStorm commented 2 months ago

Did you mount storeage? What is your concrete docker compose/docker command deployment? I am assuming you deployed via docker as Runtime: 27.0.3 is too high for node.

jpzone282 commented 2 months ago

Yeah, it is mounted storage with it and running it with docker compose

version: '3'
services:
  uptime-kuma:
    image: louislam/uptime-kuma:latest
    container_name: uptime-kuma
    restart: always
    ports:
      - "3010:3001"
    volumes:
      - uptime-kuma:/app/data
CommanderStorm commented 2 months ago

Weird, but good, this seems interesting.

let's debug deeper:

jpzone282 commented 2 months ago

Yes sure here is the log. dockerlog.txt Its a Ubuntu laptop with Docker on it. I have no cronjobs everything else running on it really I am using ext4 filesystem type

CommanderStorm commented 2 months ago

No clues in there why storage is lost entirely sometimes..

Lets try a different option why this might be loosing storage:

what is the output of

sudo docker volume inspect uptime-kuma

And what does ls -lah Mountpoint with the Mountpoint from the first command look like?

jpzone282 commented 2 months ago

Hm I am getting an Error response from daemon no such volume error for some reason.

tismofied commented 2 months ago

Hm I am getting an Error response from daemon no such volume error for some reason.

Getting the exact same issue. I took the container down and rebuilt it and it seems to be working now.

jpzone282 commented 2 months ago

Yeah i'll set mine up again and see what happens. Just found it really really odd that everything was like set back to factory defaults with no evidence of showing what happened

CommanderStorm commented 2 months ago

Hm I am getting an Error response from daemon no such volume error for some reason.

If no docker volume exists, we can't persist data.. Maybe docker compose has changed their behavior what happens when you docker compose up -d. => Could you try that and report the outcome of the volume existing?

CommanderStorm commented 2 months ago

@tismofied LXC and docker container are different. Since we don't maintain LXC containers, we can't really help you there. Please contact who packaged your container. Similar debugging steps likely apply there too..

jpzone282 commented 2 months ago

Hm I am getting an Error response from daemon no such volume error for some reason.

If no docker volume exists, we can't persist data.. Maybe docker compose has changed their behavior what happens when you docker compose up -d. => Could you try that and report the outcome of the volume existing?

sudo docker-compose up -d just runs the container and seems fine

CommanderStorm commented 2 months ago

When you say run the container do you also mean create the volume? What is the result of docker volume inspect uptime-kuna?

louislam commented 2 months ago

Yeah, it is mounted storage with it and running it with docker compose

@jpzone282 Your compose file is missing the root volumes: section at the end.

version: '3'
services:
  uptime-kuma:
    image: louislam/uptime-kuma:latest
    container_name: uptime-kuma
    restart: always
    ports:
      - "3010:3001"
    volumes:
      - uptime-kuma:/app/data
volumes:
  uptime-kuma:

Reference: https://docs.docker.com/storage/volumes/#use-a-volume-with-docker-compose

But I personally would recommend using a relative path rather than a volume, this is more simple.

See: https://github.com/louislam/uptime-kuma/blob/master/compose.yaml

jpzone282 commented 2 months ago

I have done the relative path and still no change. Think I should start again and see what happens next time round. Unless there is more troubleshooting anyone wants to do.

github-actions[bot] commented 2 days ago

We are clearing up our old help-issues and your issue has been open for 60 days with no activity. If no comment is made and the stale label is not removed, this issue will be closed in 7 days.