Question Docker container with fixed IP for Sonarr output

Currently reading
Question Docker container with fixed IP for Sonarr output

1,072
356
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
To enable Sonarr to communicate with my downloader client, I had to enter the IP of the downloader container in the Host field. Recognizing that restarting the downloader container may cause an IP change, I'm curious if there is a straightforward means to set a fixed IP to a container.

My Docker package presently yields container IPs as 172.17.x.y

Since I haven't found a compelling way to lock in a fixed IP, I thought I might assign an IP (via Portainer) with a high final octet value for "y" which I could then reference in Sonarr.

If I do this, some questions.
  • Will the container IP I set through Portainer survive a container restart (or image update)?
  • Is the 3rd quartet in the Docker IP always constant? If I restart Docker (ex. DSM update, machine maintenance, etc) will "y" be constant.
Is there a better way to do assign a container IP?

Is there another/better means to point Sonarr to my downloader container?
 

Rusty

Moderator
NAS Support
2,383
706
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Is there another/better means to point Sonarr to my downloader container?
They are not on the same device I'm guessing?
 
9
7
NAS
DS918+
Operating system
  1. Windows
Mobile operating system
  1. Android
You also have to link or create a custom bridge between Sonarr and the download client. I then just use the fixed internal IP address of the NAS
 

Rusty

Moderator
NAS Support
2,383
706
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
what @oliroe said is correct. No reason for it not to work by using the static ip of that device. I have all my sonarr and radarr instances set like this with download clients on the same or separate devices (but in the same LAN).
 
1,072
356
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
Last edited:
No reason for it not to work by using the static ip of that device
I entered the NAS static IP and the port for qbittorrentvpn that I use to access via web browser, and the Sonarr connection "test" fails, as does "localhost".

Maybe it is the VPN in the downloader container that affects this, IDK... but all I have gotten to work is using the qbittorrentvpn Docker IP.

I've searched for "linking" (which I'm unfamiliar with) and have only found complicated descriptions involving database packages, like MongoDB.
 
1,072
356
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
OK.. progress... Added PUID/PGID to the qbittorrentvpn and I was able to get the NAS IP to succeed. Now I'll check to see if Sonarr's scan is passed to QBTvpn, and whether the downloaded video is moved back to Sonarr's file structure.
 
Last edited:
You also have to link or create a custom bridge between Sonarr and the download client
This is about right.

The default bridge does not have a buildin DNS server, thus a container requiring another one needs a link to it.

Though, the "docker way" is to use a custom network. It has a buildin DNS server, which provides name resolution for all containers in the network. There is no need to publish ports for custom network communication.

One more thing: If you want to communicate to container by its ip, you high likely doing something wrong. For container to container communication use custom networks, for external to host communication use the hosts ip/hostname and the published port of the container.

I entered the NAS static IP and the port for qbittorrentvpn that I use to access via web browser, and the Sonarr connection "test" fails, as does "localhost".
Only if a container uses the host network, localhost will be "the nas'es localhost".
If a container uses a bridged network, localhost will be local to the container.
 
1,072
356
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
Last edited:
So... I'm getting closer... but the finished download is not imported/renamed but sits in the QBT subfolder "sonarr-tv". Torrent download is 100% and "completed". Here's Sonarr queue...





What have I missed? Is this a permissions issue? Where would I look? Google hasn't been helpful.

Thanks again.
 

Rusty

Moderator
NAS Support
2,383
706
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Permissions issues yes. Check the sonarr log tab
 
1,072
356
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
Permissions issues yes. Check the sonarr log tab


Do I change owner of "sonar-tv" folder to an administrator? It says "root". If I did that how would I confirm that Sonarr can then see the folder?

I did that and tried manual import, and got this...


So it appears there is no communication. I'm confused how to set permissions between these 2 containers.
 

Rusty

Moderator
NAS Support
2,383
706
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Is this sonarr via package center? Or docker? You will have to look into remote paths option in sonarr to fix this problem. This is a common problem that sonarr is unable to grab the download manager destination and move the content to its final position. happens when you have sonarr and download manager in separate location as well as when both apps do not use the same /downloads destination.
 

Rusty

Moderator
NAS Support
2,383
706
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
then make sure that you have the downloads variable mounted to the same destination used by your download manager as well. Also user needs to have permissions to those locations so I guess you have used puid and guid in that container.
 
1,072
356
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
Last edited:
I'm going to redo all my docker folders and pointers here. I've made so many changes it's getting foggy. I'm going to rename the shared folder I use for docker configs and create a new shared folder using the same folder name so that everything has the same inherited permissions and copy over what I have for critical containers such as bitwarden, and otherwise let containers such as sonarr spawn their folders in the new shared folder.

Dumb question... I have a "docker" user. Did the Docker package create that, or did I. If it's my doing it only adds confusion and I'm going to delete it.
 
1,072
356
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
I've hit a wall. Sonarr can't see the folder that QBTvpn downloads to (tv-sonarr). I linked QBTvpn to Sonarr (unless linking the other direction makes a difference) and that did nothing. Added UMASK=002 to QBTvpn and still no success. So I have to unzip/rename/move the downloaded files manually. Life is hard in the first world.
 
1,072
356
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
This is vexing... When I try to manually bring in a completed download sonarr says there is no video in the folder, yet when I click the red "x" net to the manual import icon, it has no problem deleting the file. How can it tell me there is no video file present, yet it manages to delete it?

I'm sure higher minds can figure this out... it's n mkv file if that matters.
 
The more we know about the configuration, the more precise we can help..

May I suggest to stop both containers, export their configurations and share them with us?
Depending wether you feel comfortable with editing json files, you might want to anonymize any password in the json file or pre-export in the container settings.

Additionaly i'd like to see the output of `stat /volumex/host-side/of-a/mapped-volume`, for the host side of each involved docker mount.
 
1,072
356
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
@one-eyed-king Your comment about "stat" (this is new to me), showed me some differences I hadn't noticed. I reworked my docker folders (created new ones) for sonarr and qbttorrentvpn and I'm a half step closer.

Now sonarr can see the downloaded file, but can't move it into my Plex folder structure. So I am now going to create a new destination folder and see if that helps.

I'll get back to you with the json's and the stat once I've tried this. Thanks so much. Almost there!
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Similar threads

Trending threads

Top