runtipi / runtipi

Runtipi is a homeserver for everyone! One command setup, one click installs for your favorites self-hosted apps. ✨
https://www.runtipi.io/
GNU General Public License v3.0
7.47k stars 258 forks source link

[BUG] Wrong running status of app after taking a backup #1649

Open Frankynov opened 2 months ago

Frankynov commented 2 months ago

Checklist

Before opening your issue be sure to have completed all those tasks.

Describe the bug Hello, I have noticed a bug regarding the backup feature, which I have reproduced on my 2 separate tipi instances (one behind custom port, one running default ports). When a app is stopped, and I take a manual backup, Tipi will say that the app is running after the backup is taken. Unfortunately, that is not the case, so I need to restart the app manually. For me, the app should remain down if its status was down before taking the backup, and should only be brought back online when we take the backup when the app is running (or after an update).

To Reproduce Steps to reproduce the behavior:

  1. Go to any app, stop it via the tipi button
  2. Take a manual backup
  3. After backup is done, tipi will say that the app is running, but it is actually not. You can check that there is no log populated, and a docker ps doesn't show that the app is up

Expected behavior App status should remain down, if the app was down in the first place. Tipi shouldn't try to restart it. This looks like a cosmetic issue but might be confusing.

Screenshots N/A

Server (please complete the following information):

Additional context runtipi/logs/error.log: didn't show anything

Runtipi debug :

Welcome to Runtipi CLI ✨

⚠️ Make sure you have started tipi before running this command

--- System information --- ┌──────────────┬───────────────────┐ │ OS │ linux │ ├──────────────┼───────────────────┤ │ OS Version │ 6.5.0-1023-oracle │ ├──────────────┼───────────────────┤ │ Memory (GB) │ 23.42 │ ├──────────────┼───────────────────┤ │ Architecture │ arm64 │ └──────────────┴───────────────────┘

--- Tipi configuration --- ┌───────────────────────────┬──────┐ │ Custom tipi docker config │ No │ └───────────────────────────┴──────┘

--- Settings.json --- { "allowAutoThemes": true, "allowErrorMonitoring": false, "appsRepoUrl": "https://github.com/runtipi/runtipi-appstore", "demoMode": false, "dnsIp": "9.9.9.9", "domain": "redacted", "guestDashboard": false, "internalIp": "10.0.0.49", "localDomain": "tipi.lan", "persistTraefikConfig": false, "postgresPort": 5432, "storagePath": "/home/ubuntu/runtipi", "version": "v2.5.0" }

--- Environment variables --- ┌───────────────────────┬──────────────────────────────────────────────────────────────────┐ │ POSTGRES_PASSWORD │ │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ REDIS_PASSWORD │ │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ APPS_REPO_ID │ 29ca930bfdaffa1dfabf5726336380ede7066bc53297e3c0c868b27c97282903 │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ APPS_REPO_URL │ https://github.com/runtipi/runtipi-appstore │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ TIPI_VERSION │ v3.6.0 │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ INTERNAL_IP │ 10.0.0.49 │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ ARCHITECTURE │ arm64 │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ JWT_SECRET │ │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ ROOT_FOLDER_HOST │ /home/ubuntu/runtipi │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ RUNTIPI_APP_DATA_PATH │ /home/ubuntu/runtipi │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ NGINX_PORT │ 80 │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ NGINX_PORT_SSL │ 443 │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ DOMAIN │ │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ POSTGRES_HOST │ runtipi-db │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ POSTGRES_DBNAME │ tipi │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ POSTGRES_USERNAME │ tipi │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ POSTGRES_PORT │ 5432 │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ REDIS_HOST │ runtipi-redis │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ DEMO_MODE │ false │ ├───────────────────────┼──────────────────────────────────────────────────────────────────┤ │ LOCAL_DOMAIN │ tipi.lan │ └───────────────────────┴──────────────────────────────────────────────────────────────────┘

--- Docker containers --- ┌───────────────────────┬──────┐ │ runtipi-reverse-proxy │ Up │ ├───────────────────────┼──────┤ │ runtipi │ Up │ ├───────────────────────┼──────┤ │ runtipi-db │ Up │ ├───────────────────────┼──────┤ │ runtipi-redis │ Up │ └───────────────────────┴──────┘ ^ If a container is not 'Up', you can run the command docker logs <container_name> to see the logs of that container.

steveiliop56 commented 2 months ago

Hello @Frankynov,

Can you please provide both the error.log and the app.log contents when clicking the backup button on an app? (you can also copy paste the output from the logs tab in the settings page)

Frankynov commented 2 months ago

Hi @steveiliop56 From the settings page, here is the output :

runtipi                | dashboard: 2024-09-02T11:45:44.414Z - info >   Dispatching event {"type":"app","command":"backup","appid":"firefly-iii-data-importer","form":{}}.
runtipi                | worker: 2024-09-02T11:45:44.417Z - info >  Processing job 13 with data {"type":"app","command":"backup","appid":"firefly-iii-data-importer","skipEnv":false,"form":{"openPort":true}}
runtipi                | worker: 2024-09-02T11:45:44.420Z - info >  Stopping app firefly-iii-data-importer
runtipi                | worker: 2024-09-02T11:45:44.423Z - info >  Running docker compose with args --env-file /app-data/firefly-iii-data-importer/app.env --project-name firefly-iii-data-importer -f /data/apps/firefly-iii-data-importer/docker-compose.yml -f /data/repos/29ca930bfdaffa1dfabf5726336380ede7066bc53297e3c0c868b27c97282903/apps/docker-compose.common.yml rm --force --stop
runtipi                | worker: 2024-09-02T11:45:44.471Z - info >  App stopped!
runtipi                | worker: 2024-09-02T11:45:44.472Z - info >  Copying files to backup location...
runtipi                | worker: 2024-09-02T11:45:44.479Z - info >  Creating archive...
runtipi                | worker: 2024-09-02T11:45:44.497Z - info >  Moving archive to backup directory...
runtipi                | worker: 2024-09-02T11:45:44.502Z - info >  Backup completed!
runtipi                | worker: 2024-09-02T11:45:44.506Z - info >  Job 13 completed with result: {"success":true,"stdout":"App firefly-iii-data-importer backed up successfully"}

I don't see anything abnormal here above.

The error.log file contains only records from 2 days ago the earliest :

dashboard: 2024-08-28T14:30:59.548Z - error >   server error: App .env has an invalid config.json file
dashboard: 2024-08-30T12:22:23.169Z - error >   server error: Invalid credentials
dashboard: 2024-08-30T12:22:26.283Z - error >   server error: Identifiants invalides
dashboard: 2024-08-30T12:22:29.027Z - error >   server error: Identifiants invalides
dashboard: 2024-08-30T12:24:10.537Z - error >   server error: Le domaine xxxx.yyyy.zz est déjà utilisé par l'application nextcloud
dashboard: 2024-08-31T21:47:51.557Z - error >   server error: App .env has an invalid config.json file

Note : to see the status of the app as 'Running', I have to refresh the page ( I do a CMD+R on Chrome on macOS )

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.