linuxserver / docker-radarr

GNU General Public License v3.0
650 stars 104 forks source link

[BUG] Environment variable "p" not being respected on creation. #201

Closed BloodBlight closed 1 year ago

BloodBlight commented 1 year ago

Is there an existing issue for this?

Current Behavior

When creating a NEW instance of radarr, the "p" variable doesn't seem to be respected by the instance. Already created instances are not effected.

Expected Behavior

Should see the port request variable acked in the logs and the service starting on that port. Neither happen. Note that the UID and GID are being picked up correctly.

Steps To Reproduce

Create container with the config below and watch the logs.

Environment

- OS: Ubuntu 20.04
- How docker service was installed:
#Install docker and docker-compose
#InstallDocker
#sudo apt-get remove -y docker docker-engine docker.io containerd runc
#sudo apt-get update
#sudo apt-get install -y ca-certificates curl gnupg lsb-release
#sudo mkdir -p /etc/apt/keyrings
#curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
#echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#sudo apt-get update
#sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose
#sudo docker run hello-world

CPU architecture

x86-64

Docker creation

version: "3"
services:

### Other stuff..

  Radarr:
    image: linuxserver/radarr
    container_name: Radarr
    environment:
      - p=7880
      - PUID=11101
      - PGID=12101
      - TZ=America/Los_Angeles
    volumes:
      #......
    restart: on-failure

### Other stuff..

Container logs

[migrations] started
[migrations] no migrations found
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/

Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
Radarr: https://opencollective.com/radarr

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    11101
User gid:    12101
-------------------------------------

[custom-init] No custom files found, skipping...
[ls.io-init] done.
[Info] Bootstrap: Starting Radarr - /app/radarr/bin/Radarr - Version 4.3.2.6857 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Warn] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: No XML encryptor configured. Key {b66effb1-8769-4874-9913-8dd994ee8f75} may be persisted to storage in unencrypted form. 
[Info] MigrationController: *** Migrating data source=/config/radarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 
[Info] FluentMigrator.Runner.MigrationRunner: VersionMigration migrating 
###  DB Creation stuff...
[Info] FluentMigrator.Runner.MigrationRunner: => 0.0781631s 

### This section repeats:
[Fatal] ConsoleApp: Failed to bind to address http://[::]:7878: address already in use. This can happen if another instance of Radarr is already running another application is using the same port (default: 7878) or the user has insufficient permissions 
Press enter to exit...
[Info] Bootstrap: Starting Radarr - /app/radarr/bin/Radarr - Version 4.3.2.6857 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] MigrationController: *** Migrating data source=/config/radarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

j0nnymoe commented 1 year ago

That isn't a valid variable for our container.

Scratch that, I didn't realise that feature was added.

BloodBlight commented 1 year ago

It also appears to be impacting Sonarr

BloodBlight commented 1 year ago

A work around to this is to manually add the following line to the config.xml file after creation:

   <Port>7880</Port>
Roxedus commented 1 year ago

Jonny's initial comment is correct, we do not, and have not used a "p" environment variable.

BloodBlight commented 1 year ago

Jonny's initial comment is correct, we do not, and have not used a "p" environment variable.

It's in the documentation under the parameters section: https://hub.docker.com/r/linuxserver/radarr

And it was working a while back...

Roxedus commented 1 year ago

-p is not a environment variable

BloodBlight commented 1 year ago

I see what you are saying!

Weird. I have deployed at least a dozen times using that and could sworn that used to work... I must be crazy and/or just forgot fixing it! ^__^

This would be a nice feature when deploying multiple instances in a composer on a single network.