Container to Container Networking

Locked
User avatar
kizza42
New here
Posts: 3
Joined: Wed Apr 01, 2015 9:16 am
Location: Sydney, Australia

Container to Container Networking

Post by kizza42 »

I cannot seem to get a Sonarr Container to communicate with a NZBGet Container via the NAS's LAN IP (192.168.0.2) Is NAT Loopback not a thing with Docker or should all container to container comms be kept on the Docker subnet (10.0.3.x)
rb2k_
First post
Posts: 1
Joined: Thu Dec 31, 2015 2:35 pm

Re: Container to Container Networking

Post by rb2k_ »

When creating a container you can go to the advanced settings and "link" it to other containers. When you create the link, you can select the hostname for the other container.

So it goes a bit like this:
1. Create NZBGet container
2. Create Sonarr Container, link to NZBGet container (call it e.g. "nzbget")
3. In the Sonarr config, say your downloader is on host "nzbget"
4. ???
5. Profit!

Works fine for me so far :)
tbgoose
Starting out
Posts: 15
Joined: Mon Aug 10, 2015 1:39 pm

Re: Container to Container Networking

Post by tbgoose »

I am trying to do this as well, and I can't get any of my services to see each other. Using CouchPotato, Sonarr, SAB, Deluge, Jackett, PlexPy etc. They can all see the outside world, tested by looking for movies etc in CP.

I have re-built the dockers just now adding links to the ones that need it, with the exception of PlexPy as Plex is running natively off the NAS. So added links to both downloaders from Sonarr and CP, and links from both downloaders + jackett to Sonarr and CP (maybe double up isn't great?). PlexPy also can't see my PMS either... Somethings definitely up in network settings.

TS453 Pro running 4.2.1

Edit - PlexPy can now see my PMS. However none of the docker services can see each other...

Edit2: I didn't read your instructions properly. I wasn't using the container name /link alias as the host, I was still trying to use my NAS ip. Seems to be working now! Cheers

Edit3: jackett doesnt seem to work, but mostly everything else is now...
freeedom
First post
Posts: 1
Joined: Sun Jan 08, 2017 1:34 am

Re: Container to Container Networking

Post by freeedom »

One thing to note here is you're only presented the option to "link" when creating a new container.
therealcgspeck
New here
Posts: 3
Joined: Tue Jan 31, 2017 9:45 am

Re: Container to Container Networking

Post by therealcgspeck »

This is still a major problem. I haven't seen this issue in docker on any other platform, only QTS. I also note Docker on QTS/CS is out of date. Is there any way to file a defect/bug report with QNAP?
User avatar
razormoon
Easy as a breeze
Posts: 465
Joined: Fri Feb 13, 2015 5:05 am
Location: Denver, CO

Re: Container to Container Networking

Post by razormoon »

therealcgspeck wrote:This is still a major problem. I haven't seen this issue in docker on any other platform, only QTS. I also note Docker on QTS/CS is out of date. Is there any way to file a defect/bug report with QNAP?
Via Helpdesk app or link in my sig (support).
:!: TVS-871-i7-16G 5.0.0.1932 Build 20220129, KODI, WSE 2019
:?: 1 x KINGSTON SNV325S2 as 2mb block cache, WDC WD40EFRX as RAID5, 1 x WDC WD40EFRX as iSCSI
:idea: APC PRO 1500 S
:-0 WIKI SUPPORT

"Nothing is impossible. Only expensive, illegal or both."
therealcgspeck
New here
Posts: 3
Joined: Tue Jan 31, 2017 9:45 am

Re: Container to Container Networking

Post by therealcgspeck »

Thanks razormoon and sorry to hijack this thread. I've submitted a helpdesk ticket.

I've also attempted to start a forum topic about this here (with diagnostic information) however it seems as if my topic has fallen into some moderation hole...is this normal?
User avatar
R0GGER
Getting the hang of things
Posts: 69
Joined: Sun Jun 12, 2016 6:33 am

Re: Container to Container Networking

Post by R0GGER »

Simple command to display local ip's of your docker containers to talk with each other

Code: Select all

docker inspect -f '{{.Name}} - {{.NetworkSettings.IPAddress }}' $(docker ps -aq)
Output: hostname - local ip
/sonarr - 10.0.3.5
/nzbget - 10.0.3.6

Just use those hostnames/local ip's + port within the containers can communicate with each other.
Example - NZBget: http://10.0.3.6:6789
Model: TVS-871 16GB | Disks: 8 x 4TB WD RED PRO NAS - RAID 5 | Cache Acceleration: QM2-2P-244A - 2x 1TB NVMeM.2 - RAID 0
Model: TS-253A 4GB | OS: OpenMediaVault Disks: 2 x 8TB Seagate IronWolf - RAID 1
User avatar
razormoon
Easy as a breeze
Posts: 465
Joined: Fri Feb 13, 2015 5:05 am
Location: Denver, CO

Re: Container to Container Networking

Post by razormoon »

therealcgspeck wrote:Thanks razormoon and sorry to hijack this thread. I've submitted a helpdesk ticket.

I've also attempted to start a forum topic about this here (with diagnostic information) however it seems as if my topic has fallen into some moderation hole...is this normal?
I think that attachments are allowed, but only after a certain number of posts.
Try not to attach anything until the 10th, 20th, 30th, etc post.
I could be wrong though, but I only see this issue with users with incredibly small amount of posts.

Try again without attachment. I don't think moderators have time for these.
:!: TVS-871-i7-16G 5.0.0.1932 Build 20220129, KODI, WSE 2019
:?: 1 x KINGSTON SNV325S2 as 2mb block cache, WDC WD40EFRX as RAID5, 1 x WDC WD40EFRX as iSCSI
:idea: APC PRO 1500 S
:-0 WIKI SUPPORT

"Nothing is impossible. Only expensive, illegal or both."
klogg
New here
Posts: 6
Joined: Sat Jun 17, 2017 7:35 pm

Re: Container to Container Networking

Post by klogg »

R0GGER wrote: Just use those hostnames/local ip's + port within the containers can communicate with each other.
Example - NZBget: http://10.0.3.6:6789
Thanks R0GGER, what I don't understand how it solve for is those IPs will change based on the order the containers are started in, so if I configure with the internal Docker engine assigned IPs [10.0.3.x] (not the QNAP IP + port forwarding [192.168.1.x"yyyy]) then there is no guarantee that it works from reboot to reboot.

I have found success using the LINK option, but I don't seem to be able to set that up during container creation via command line, and I want to be able to use the CLI set up option so I can update the containers easily rather than re-completing the ContainerStation webform each time.

I have spent more time googling this than I care to admit, is there no solution that lets me use the QNAP [external] facing IP:port mapping?

Thanks for any tips,
/Kyle
geolaw
New here
Posts: 3
Joined: Thu Jul 23, 2020 9:56 pm

Re: Container to Container Networking

Post by geolaw »

still an issue - I am using portainer to manage all of my containers and still can't get the networking between containers working

e.g I have sonarr running which will ping plex media server to force a re-scan when new shows are added, but since moving plex and sonarr to docker, this no longer works.

The biggie I have is sonarr and radarr getting to nzbget so I have fallen back to running QNZBGet via the app store
the sonarr and radarr containers can communicate to it without a problem to queue up downloads.

In an ideal world I would like to containerize everything, but for the most part, as long as it works, it doesn't much matter if its running via docker or the qnap app store
User avatar
oyvindo
Experience counts
Posts: 1399
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: Container to Container Networking

Post by oyvindo »

The "--link" feature was depreciated many years ago.
A new method to establish inter-container communication is by using the "App" mode when creating 2 or more containers using a Docker Compose YAML script.
This allows you to address containers by their name.
ImageImageImage
User avatar
OneCD
Guru
Posts: 12038
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Container to Container Networking

Post by OneCD »

* topic locked to prevent further necroposting *

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Locked

Return to “Container Station”