If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Docker support (solved)

moody_bluemoody_blue Posts: 3,221Members, Plex Pass, Plex Ninja Plex Ninja

One of the most interesting ways to install PlexConnect in a platform independent way is to use dockers. Several users created their own forks, and even suggested pull requests to the iBaa repo to make this an easier task.

I'm not a docker user myself, due to the fact that I have PMS and PlexConnect installed in the same QNAP, and when I install dockers this can "confuse" PMS to use the wrong IP interface. So, until Plex Inc. finds a way to bind PMS to a certain NIC, I'm stepping away from dockers (some users have reported that PlexConnect does not "like" multiple NIC's either, but that's a matter for a separate thread, if needed).

But recently I have given the "power" to accept pull request into the iBaa repo, therefore I'm willing to apply changes that can enhance PlexConnect experience in docker environments without disrupting PlexConnect to the remaining users, and even updating the wiki pages for a docker installation.

The objective of this post is to open a discussion where we can select the best technical alternative, document it, and put in the wiki. Can I have your ideas, please ?

QNAP TS-253A 4G QTS 4.3.4.0569 + PMS 1.13.1.5063 + QPython2 2.7.12.0 + PlexConnect 0.6

TV Sony KDL-32V2500 (720p) + aTV3 Rev. A firmware 7.2.2 + Denon AVR-1604 A/V Receiver 5.1 + Harmony Touch

Portables 1x iPad4, 2x Android phone, 1x Android tablet, 2x PMP on Win10

No support via PM unless requested by me

Comments

  • izznogoooodizznogooood Posts: 56Members ✭✭
    edited February 18

    @moody_blue said:

    I'm not a docker user myself, due to the fact that I have PMS and PlexConnect installed in the same QNAP, and when I install dockers this can "confuse" PMS to use the wrong IP interface. So, until Plex Inc. finds a way to bind PMS to a certain NIC, I'm stepping away from dockers (some users have reported that PlexConnect does not "like" multiple NIC's either, but that's a matter for a separate thread, if needed).

    There would be no issues running both PMS and PlexConnect on the same server on the same ip. They use different ports. I do however put Plexconnect on a different ip because it uses 53 (DNS), 80 (HTTP) and 443 (HTTPS) which are not uncommen ports... On a linux install its easy to target different NICs / macvlan... Not sure about other platforms.

    When it comes to choosing PMS in docker i would highly recommend:
    https://hub.docker.com/r/linuxserver/plex/

    I currently maintain two docker images:
    https://hub.docker.com/r/izzno/unraid-plexconnect/
    https://hub.docker.com/r/izzno/plexconnect/

    I am maintaining an unRAID server for a friend and running the "normal" image myself.

    These require no modification of plexconnect, and will most likely never do so. They pull the source directly from git and autoupdate on every restart.

    So I guess what I am saying is the only thing necessary would be to update the wiki on docker usage and choose an "official" docker image.

  • Ghill13Ghill13 Posts: 27Members, Plex Pass Plex Pass
    edited February 21

    The issue come up with ips when you don't want to run with --network=host i am looking into a better way to deal with this

    PMS Server : Intel Xeon E3-1276-V3 | Asus P9D-E/4L | 32GB ECC Ram | Nvidia Quadro P4000 | Adaptec 6805Q | 28TB Raid 6 (7xWD Red 6TB) 

    Web Server : Mac Mini | i7 2.6Ghz | 16GB Ram | 1TB SSD | 1TB Storage SSD

    Network : 80Mb Down | 20Mb Up 

  • izznogoooodizznogooood Posts: 56Members ✭✭

    Just run with "-p 53:53 -p 80:80 -p 443:443" instead...

  • Ghill13Ghill13 Posts: 27Members, Plex Pass Plex Pass

    the dns will bind to the internal ip

    PMS Server : Intel Xeon E3-1276-V3 | Asus P9D-E/4L | 32GB ECC Ram | Nvidia Quadro P4000 | Adaptec 6805Q | 28TB Raid 6 (7xWD Red 6TB) 

    Web Server : Mac Mini | i7 2.6Ghz | 16GB Ram | 1TB SSD | 1TB Storage SSD

    Network : 80Mb Down | 20Mb Up 

  • izznogoooodizznogooood Posts: 56Members ✭✭

    Yes, of course.

  • moody_bluemoody_blue Posts: 3,221Members, Plex Pass, Plex Ninja Plex Ninja
    edited February 23

    Please help me understand what's the best alternative to make everybody happy.

    Link to github https://github.com/iBaa/PlexConnect/pull/521

    QNAP TS-253A 4G QTS 4.3.4.0569 + PMS 1.13.1.5063 + QPython2 2.7.12.0 + PlexConnect 0.6

    TV Sony KDL-32V2500 (720p) + aTV3 Rev. A firmware 7.2.2 + Denon AVR-1604 A/V Receiver 5.1 + Harmony Touch

    Portables 1x iPad4, 2x Android phone, 1x Android tablet, 2x PMP on Win10

    No support via PM unless requested by me

  • Ghill13Ghill13 Posts: 27Members, Plex Pass Plex Pass
    edited February 23

    Then the dns server will respond with the wrong redirect ip e.g the internal ip is say 172.17.0.2 then the dns server will tell the client that trailers.apple.com is at 172.17.0.2 but thats the internal ip not the docker host ip so is inaccessible to the client on the lan network. the dns server needs to send the ip of the docker host machine.

    @izznogooood said:
    Yes, of course.

    PMS Server : Intel Xeon E3-1276-V3 | Asus P9D-E/4L | 32GB ECC Ram | Nvidia Quadro P4000 | Adaptec 6805Q | 28TB Raid 6 (7xWD Red 6TB) 

    Web Server : Mac Mini | i7 2.6Ghz | 16GB Ram | 1TB SSD | 1TB Storage SSD

    Network : 80Mb Down | 20Mb Up 

  • izznogoooodizznogooood Posts: 56Members ✭✭
    edited February 23

    I think I know what you mean.

    I dont have your problem but I can look in to it.

    When it comes to merging your code I would wait.

    If you are having issues with any of my images you should post here:
    http://forums.plex.tv/discussion/294020/plexconnect-docker-and-unraid#latest

  • Ghill13Ghill13 Posts: 27Members, Plex Pass Plex Pass

    i run my own docker image for security reasons and thats what i don't run as net host

    PMS Server : Intel Xeon E3-1276-V3 | Asus P9D-E/4L | 32GB ECC Ram | Nvidia Quadro P4000 | Adaptec 6805Q | 28TB Raid 6 (7xWD Red 6TB) 

    Web Server : Mac Mini | i7 2.6Ghz | 16GB Ram | 1TB SSD | 1TB Storage SSD

    Network : 80Mb Down | 20Mb Up 

  • moody_bluemoody_blue Posts: 3,221Members, Plex Pass, Plex Ninja Plex Ninja
    edited February 27

    @Ghill13 said:
    the dns server needs to send the ip of the docker host machine

    This is a comment from @baa in Settings.cfg

    IP_self: enable_plexconnect_autodetect, ip_plexconnect - manual override for VPN usage
    

    So why don't you put the required IP in ip_plexconnect and code enable_plexconnect_autodetect=False ? Because you want to use a hostname ? I can change the code to use hostname, if necessary.

    QNAP TS-253A 4G QTS 4.3.4.0569 + PMS 1.13.1.5063 + QPython2 2.7.12.0 + PlexConnect 0.6

    TV Sony KDL-32V2500 (720p) + aTV3 Rev. A firmware 7.2.2 + Denon AVR-1604 A/V Receiver 5.1 + Harmony Touch

    Portables 1x iPad4, 2x Android phone, 1x Android tablet, 2x PMP on Win10

    No support via PM unless requested by me

  • Ghill13Ghill13 Posts: 27Members, Plex Pass Plex Pass

    please read this post this one has nothing to do with the host name

    @Ghill13 said:
    Then the dns server will respond with the wrong redirect ip e.g the internal ip is say 172.17.0.2 then the dns server will tell the client that trailers.apple.com is at 172.17.0.2 but thats the internal ip not the docker host ip so is inaccessible to the client on the lan network. the dns server needs to send the ip of the docker host machine.

    @izznogooood said:
    Yes, of course.

    @moody_blue said:

    @Ghill13 said:
    the dns server needs to send the ip of the docker host machine

    This is a comment from @baa in Settings.cfg

    IP_self: enable_plexconnect_autodetect, ip_plexconnect - manual override for VPN usage
    

    So why don't you put the required IP in ip_plexconnect and code enable_plexconnect_autodetect=False ? Because you want to use a hostname ? I can change the code to use hostname, if necessary.

    PMS Server : Intel Xeon E3-1276-V3 | Asus P9D-E/4L | 32GB ECC Ram | Nvidia Quadro P4000 | Adaptec 6805Q | 28TB Raid 6 (7xWD Red 6TB) 

    Web Server : Mac Mini | i7 2.6Ghz | 16GB Ram | 1TB SSD | 1TB Storage SSD

    Network : 80Mb Down | 20Mb Up 

  • moody_bluemoody_blue Posts: 3,221Members, Plex Pass, Plex Ninja Plex Ninja
    edited February 28

    Let me see if I understand. We have 3 different services:
    1. PMS listening to port 32400
    2. PlexConnect DNS listening to port 53
    3. PlexConnect WebServer listening to ports 80 and 443

    These services can be on the same IP or separate ones.

    When users select trailers in the ATV the request will be sent to 2. above. That DNS service inspects the request, and if trailerspasses it to the service whose base IP is ip_plexconnect (if enable_plexconnect_autodetect=False is also specified), otherwise passes it to DNS running on IP defined by ip_dnsmaster. Therefore it's possible to have DNS and WebServices running on two different IP's, although I don't see a reason for that, except in the case where the machine has several NIC's (or a VPN "nic" plus a HW one), that's why (I think) @baa created new parameters in Settings.

    Then the WebServer processes the request, and interfaces all communications between ATV and PMS (that was discovered through various processes, one of them is using ip_pms).

    What is different in a docker situation ? If this is a DNS issue in some docker situations, why don't you create a docker with an embedded DNS server and deactivate PlexConnect's one ? Any DNS service out there will be faster and more reliable than PlexConnect's DNS service, which is written in python. Or use dnsmasq instead ?

    From what I read in this thread @Ghill13 seems to have an issue with the current PlexConnect version but @izznogooood doesn't. How can I make both happy ?

    QNAP TS-253A 4G QTS 4.3.4.0569 + PMS 1.13.1.5063 + QPython2 2.7.12.0 + PlexConnect 0.6

    TV Sony KDL-32V2500 (720p) + aTV3 Rev. A firmware 7.2.2 + Denon AVR-1604 A/V Receiver 5.1 + Harmony Touch

    Portables 1x iPad4, 2x Android phone, 1x Android tablet, 2x PMP on Win10

    No support via PM unless requested by me

  • izznogoooodizznogooood Posts: 56Members ✭✭
    edited February 28

    The difference is docker puts plexconnect behind NATed network by default (unless you "--network=host"). I dont have this issues because I run most my containers of bridges. I dont want to change my image either as its simple an works :).

    Please look at: https://github.com/varju/docker-plexconnect

    The difference with this image is he applies a patch to plexconnect at build time resolving your issue. Plexconnect is also pulled upon image creation meaning if there is updates and he does not push a new image you will not get them.

    If you should apply this patch to plexconnect main i dont know, but i dont think it matters, but i would do some testing with a dev branch.

  • Ghill13Ghill13 Posts: 27Members, Plex Pass Plex Pass

    i already have my own version of that patch working in my plexconnect fork but would like it in the main plexconnect for other users

    PMS Server : Intel Xeon E3-1276-V3 | Asus P9D-E/4L | 32GB ECC Ram | Nvidia Quadro P4000 | Adaptec 6805Q | 28TB Raid 6 (7xWD Red 6TB) 

    Web Server : Mac Mini | i7 2.6Ghz | 16GB Ram | 1TB SSD | 1TB Storage SSD

    Network : 80Mb Down | 20Mb Up 

  • moody_bluemoody_blue Posts: 3,221Members, Plex Pass, Plex Ninja Plex Ninja
    edited February 28

    @Ghill13 said:
    i already have my own version of that patch working in my plexconnect fork but would like it in the main plexconnect for other users

    That's what I want to do. Can we discuss today in Slack ? 9PM Lisbon/London time, one hour later for @izznogooood if he wants to join ?

    QNAP TS-253A 4G QTS 4.3.4.0569 + PMS 1.13.1.5063 + QPython2 2.7.12.0 + PlexConnect 0.6

    TV Sony KDL-32V2500 (720p) + aTV3 Rev. A firmware 7.2.2 + Denon AVR-1604 A/V Receiver 5.1 + Harmony Touch

    Portables 1x iPad4, 2x Android phone, 1x Android tablet, 2x PMP on Win10

    No support via PM unless requested by me

  • moody_bluemoody_blue Posts: 3,221Members, Plex Pass, Plex Ninja Plex Ninja
    edited March 1

    All pending requests related with dockers have been applied.

    Special thanks to @Ghill13 and @izznogooood

    QNAP TS-253A 4G QTS 4.3.4.0569 + PMS 1.13.1.5063 + QPython2 2.7.12.0 + PlexConnect 0.6

    TV Sony KDL-32V2500 (720p) + aTV3 Rev. A firmware 7.2.2 + Denon AVR-1604 A/V Receiver 5.1 + Harmony Touch

    Portables 1x iPad4, 2x Android phone, 1x Android tablet, 2x PMP on Win10

    No support via PM unless requested by me

Sign In or Register to comment.