Docker communication between containers ... again

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Docker communication between containers ... again

      New

      I know that this has been posted before, but there appears to be no satisfactory list of steps to solve it. I had this working on my old OMV4 setup - but it crashed and I am unable to remember how to do it.

      Environment:
      • OMV 4.1.8 installed on Dell PE R720
      • Docker-UI plugin and Docker installed via OMV UI of the same version
      • Docker Client v18.03.1-ce
      • Docker Server v18.03.1-ce
      • OMV says I have all the latest patches
      • No Docker network changes to default setting


      Scenario #1:
      • Pull linuxserver/tt-rss:latest image
      • Pull postgres:9 image
      • Run Postgres image as "postgres9" on Bridge network with either no ports exposed, or 5432->5432
      • Run TTRSS image as "ttrss" on Bridge network with all the appropriate ports exposed and the extra arguments "--link postgres9:db"
      • TTRSS web application is unable to connect to the Postgres9 database. I receive the following error: "Unable to connect to database (as ttrss to postgres9, database ttrss):Unable to connect to database (as ttrss to postgres9, database ttrss):"
      • I run an interactive terminal on ttrss (docker exec -it ttrss bash) and not only can I ping the IP Address which postgres9 is using, if I ping via the name "postgres9" it resolves properly.


      Scenario #2:.
      • Pull linuxserver/tautulli (formerly PlexPy)
      • Run Tautulli as "plexpy" on Bridge network with proper ports exposed
      • Access the exported port on my OMV server (172.17.0.2:8181 exposed as 8181)
      • The first step is for Tautulli to connect to Plex.TV and collect a token
      • Web application attempts to fetch token ... but fails with the following error:

      Source Code

      1. 2018-06-12 22:50:32 - INFO :: CP Server Thread-7 : Tautulli PlexTV :: Fetching a new Plex.tv token for Tautulli.
      2. 2018-06-12 22:50:52 - WARNING :: CP Server Thread-7 : Failed to access uri endpoint /users/sign_in.xml. Is your server maybe accepting SSL connections only? HTTPSConnectionPool(host='plex.tv', port=443): Max retries exceeded with url: /users/sign_in.xml (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4b0635d450>: Failed to establish a new connection: [Errno -3] Try again',))


      The reason I posted two different scenarios is that I believe the problems are linked. I seem to remember that on an earlier version of Docker (before they went to a CE release) on OMV3 (yes, I inline upgraded to OMV4), there was a command or configuration I needed to change to allow containers on the default docker0 bridge to a) be able to talk to each other even with the "--link" argument and b) to NAT through the host OMV server to the outside world.

      I've tried to look at the easy thing:

      Source Code

      1. root@server:~# cat /proc/sys/net/ipv4/ip_forward
      2. 1
      3. root@server:~# iptables -L
      4. Chain INPUT (policy ACCEPT)
      5. target prot opt source destination
      6. ACCEPT all -- 192.168.2.0/24 anywhere
      7. ACCEPT all -- anywhere anywhere
      8. Chain FORWARD (policy DROP)
      9. target prot opt source destination
      10. DOCKER-USER all -- anywhere anywhere
      11. DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
      12. ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
      13. DOCKER all -- anywhere anywhere
      14. ACCEPT all -- anywhere anywhere
      15. ACCEPT all -- anywhere anywhere
      16. Chain OUTPUT (policy ACCEPT)
      17. target prot opt source destination
      18. Chain DOCKER (1 references)
      19. target prot opt source destination
      20. ACCEPT tcp -- anywhere 172.17.0.2 tcp dpt:8181
      21. ACCEPT tcp -- anywhere 172.17.0.7 tcp dpt:postgresql
      22. ACCEPT tcp -- anywhere 172.17.0.10 tcp dpt:https
      23. ACCEPT tcp -- anywhere 172.17.0.10 tcp dpt:http
      24. Chain DOCKER-ISOLATION-STAGE-1 (1 references)
      25. target prot opt source destination
      26. DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
      27. RETURN all -- anywhere anywhere
      28. Chain DOCKER-ISOLATION-STAGE-2 (1 references)
      29. target prot opt source destination
      30. DROP all -- anywhere anywhere
      31. RETURN all -- anywhere anywhere
      32. Chain DOCKER-USER (1 references)
      33. target prot opt source destination
      34. RETURN all -- anywhere anywhere
      Display All

      Is there anything I have overlooked?
      Would any additional information help in finding the root of the issue?

      Many thanks in advance! Logically Yours,

      --rogue
      Files

      The post was edited 1 time, last by LogicallyRogue ().