aetaric / checkrr

Checkrr Scans your library files for corrupt media and replace the files via sonarr and radarr
MIT License
179 stars 8 forks source link

[BUG] Usage / Command / Run Error / Docker Restart #82

Closed m1e1w1 closed 6 months ago

m1e1w1 commented 7 months ago

Describe the bug setup a debian 12 enviroment; fresh install. Setup docker, and docker compose, fresh install. setup docker container. docker bootloops / restarts (log indicates database path is not set in config) database file path is absolute.

Setup x86 linux executable and placed it in 2 locations with database file and config file setup. unable to execute in bash to run the file. permission set to execute in both locations tested.

Terminal output: root@Docker:~# checkrr -c /usr/checkrr/checkrr.yaml -bash: checkrr: command not found

Docker output: time="2023-11-24T19:52:41Z" level=info msg="err: While parsing config: yaml: control characters are not allowed" time="2023-11-24T19:52:41Z" level=fatal msg="Database file path missing or unset, please check your config file." startup=true

To Reproduce Steps to reproduce the behavior:

  1. run checkrr -c /etc/checkrr.yaml
  2. run docker container - see logs showing database path not set

Expected behavior a command line or UI from web browser port 8585 to indicate scan.

Desktop (please complete the following information):

Setup x86 linux executable and placed it in 2 locations with database file and config file setup. unable to execute in bash to run the file. permission set to execute in both locations tested.

Terminal output: root@Docker:~# checkrr -c /usr/checkrr/checkrr.yaml -bash: checkrr: command not found

Docker output: time="2023-11-24T19:52:41Z" level=info msg="err: While parsing config: yaml: control characters are not allowed" time="2023-11-24T19:52:41Z" level=fatal msg="Database file path missing or unset, please check your config file." startup=true

To Reproduce Steps to reproduce the behavior:

  1. run checkrr -c /etc/checkrr.yaml
  2. run docker container - see logs showing database path not set

Expected behavior a command line or UI from web browser port 8585 to indicate scan.

Desktop (please complete the following information):

aetaric commented 6 months ago

I am not able to reproduce this with the information provided.

You are getting command not found when running outside of docker because checkrr is not in your $PATH and you aren't specifying where to find it either via absolute path or via the more common relative path:

➜  checkrr git:(main) ./checkrr --config-file test-noarr.yaml 

            _|                               _|
   _|_|_|   _|_|_|       _|_|       _|_|_|   _|  _|     _|  _|_|   _|  _|_|
 _|         _|    _|   _|_|_|_|   _|         _|_|       _|_|       _|_|
 _|         _|    _|   _|         _|         _|  _|     _|         _|
   _|_|_|   _|    _|     _|_|_|     _|_|_|   _|    _|   _|         _|
Checkrr version development
 Commit: 
 Built On: 
 Built By: 
INFO[0000] Using config file: test-noarr.yaml           
INFO[0000] Next Run: 2023-12-12 01:00:00 -0700 MST      
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /api/files/bad            --> github.com/aetaric/checkrr/webserver.getBadFiles (4 handlers)
[GIN-debug] POST   /api/files/bad            --> github.com/aetaric/checkrr/webserver.deleteBadFiles (4 handlers)
[GIN-debug] GET    /api/stats/current        --> github.com/aetaric/checkrr/webserver.getCurrentStats (4 handlers)
[GIN-debug] GET    /api/stats/historical     --> github.com/aetaric/checkrr/webserver.getHistoricalStats (4 handlers)
[GIN-debug] GET    /api/schedule             --> github.com/aetaric/checkrr/webserver.getSchedule (4 handlers)
[GIN-debug] POST   /api/run                  --> github.com/aetaric/checkrr/webserver.runCheckrr (4 handlers)
[GIN-debug] Listening and serving HTTP on :8585

I have verified that the latest 3.2.1 is running on a friend's docker environment without issue.