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!

PMS not advertising local IP when running under bhyve vm

flauranflauran Posts: 14Members, Plex Pass Plex Pass
edited January 11 in FreeBSD

I have been trying to wrap my head around this but here are the details:

  • In most of my use cases, PlexPy shows 192.168.1.1 (my router) as client IP address when playing media from my local PMS instance.
  • This happens when playing using Plex Home accounts on my Roku Sticks, Roku TV or Samsung Smart TV app (last year's generation, not the old app). This also happens when playing media from app.plex.tv using either my main plex.tv account or a Plex Home account.
  • This doesn't happen when playing from my plex.tv main account on the above devices or when playing from my phone using either my main account or a Plex Home account or when playing from 192.168.1.65:32400/web/ using any account.
  • DNS rebinding seems to work just fine.
  • I have set 192.168.1.0/24 as my local network in PMS settings.
  • I have set Secure connections to Preferred and my clients have Fallback to insecure connection on local network only.

So I have a few questions:

  • Should playing from app.plex.tv be playing directly from my PMS local instance (i.e. should I be seeing my laptop's IP address in PlexPy).
  • What difference is there between the main plex.tv account and Plex Home accounts that would explain a change in behavior on Roku and Samsung devices?
  • What can I do to resolve this?

Answers

  • sa2000sa2000 Posts: 29,713Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    It would normally be DNS Rebinding protection that is blocking the DNS lookup for the plex.direct url for the local IP address. When this happens, the client apps would look for another https route and that would be the remote access url which would reach the server through the public IP and public port. These can show up as coming in from the router gateway address as it turns the requests round

    you can see what the routes are for your server by getting the resources.xml and then seeing what the plex .direct urls are
    See https://support.plex.tv/hc/en-us/articles/206721658-Using-plex-tv-resources-information-to-troubleshoot-app-connections

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • flauranflauran Posts: 14Members, Plex Pass Plex Pass
    edited January 10

    Hey @sa2000,

    Thanks for the pointer. I had a look at the resources.xml file and there's no local='1' entry for my server, only a Connection node with my public IP address in it.

    Looking at the logs, it seems to find the ethernet interface with the appropriate local IP:

    Jan 09, 2018 13:37:34.716 [0x809e16000] DEBUG - Network interfaces:
    Jan 09, 2018 13:37:34.716 [0x809e16000] DEBUG - * 1 vtnet0 (192.168.1.65) (loopback: 0)
    Jan 09, 2018 13:37:34.716 [0x809e16000] DEBUG - * 2 lo0 (127.0.0.1) (loopback: 1)
    [...]
    Jan 09, 2018 13:37:38.199 [0x80aa37300] DEBUG - NAT: UPnP, found device http://192.168.1.1:5000/rootDesc.xml with private address <192.168.1.65>
    Jan 09, 2018 13:37:38.202 [0x80aa37300] DEBUG - NAT: UPnP, usable device http://192.168.1.1:5000/rootDesc.xml with private address <192.168.1.65>.
    Jan 09, 2018 13:37:38.203 [0x80aa37300] DEBUG - NAT: UPnP, public address is 98.207.232.xxx

    These are the only references to the local IP address that I could find in Plex Media Server.log, unclear if there should be more.

    I don't know if this is relevant but PMS runs in a bhyve VM on a FreeNAS server.

  • flauranflauran Posts: 14Members, Plex Pass Plex Pass

    This looks very similar to the symptoms reported here: https://forums.plex.tv/discussion/178017/cant-connect-to-pms-on-lan-but-fine-on-wan

  • sa2000sa2000 Posts: 29,713Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member
    edited January 10

    @flauran said:
    Hey @sa2000,

    Thanks for the pointer. I had a look at the resources.xml file and there's no local='1' entry for my server, only a Connection node with my public IP address in it.

    Looking at the logs, it seems to find the ethernet interface with the appropriate local IP:

    Jan 09, 2018 13:37:34.716 [0x809e16000] DEBUG - Network interfaces:
    Jan 09, 2018 13:37:34.716 [0x809e16000] DEBUG - * 1 vtnet0 (192.168.1.65) (loopback: 0)
    Jan 09, 2018 13:37:34.716 [0x809e16000] DEBUG - * 2 lo0 (127.0.0.1) (loopback: 1)
    [...]
    Jan 09, 2018 13:37:38.199 [0x80aa37300] DEBUG - NAT: UPnP, found device http://192.168.1.1:5000/rootDesc.xml with private address <192.168.1.65>
    Jan 09, 2018 13:37:38.202 [0x80aa37300] DEBUG - NAT: UPnP, usable device http://192.168.1.1:5000/rootDesc.xml with private address <192.168.1.65>.
    Jan 09, 2018 13:37:38.203 [0x80aa37300] DEBUG - NAT: UPnP, public address is 98.207.232.xxx

    These are the only references to the local IP address that I could find in Plex Media Server.log, unclear if there should be more.

    I don't know if this is relevant but PMS runs in a bhyve VM on a FreeNAS server.

    I would have expected there to be a route to 192.168.1.65 as local=1
    could you get the output from ifconfig -a showing all network interfaces

    May be it is the way FreeBSD is configured

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • sa2000sa2000 Posts: 29,713Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • flauranflauran Posts: 14Members, Plex Pass Plex Pass

    @sa2000 said:

    I would have expected there to be a route to 192.168.1.65 as local=1
    could you get the output from ifconfig -a showing all network interfaces

    May be it is the way FreeBSD is configured

    Sure, here goes:

    root@plex:~ # ifconfig -a
    vtnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
        ether 00:a0:98:81:9f:73
        hwaddr 00:a0:98:81:9f:73
        inet 192.168.1.65 netmask 0xffffff00 broadcast 192.168.1.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo
    
  • flauranflauran Posts: 14Members, Plex Pass Plex Pass

    Further testing, I've installed PMS in a jail instead to see if it makes any difference and it seems to work as expected.

    I'm seeing a bunch of extra lines that seem relevant in the logs of that instance:

    Jan 10, 2018 19:54:54.146 [0x80a900100] DEBUG - NetworkService: Browsing on interface 192.168.1.3 on broadcast address 192.168.1.255 (index: 0)
    [...]
    Jan 10, 2018 19:54:54.156 [0x80a900100] DEBUG - NetworkServiceBrowser: SERVER arrived: 192.168.1.3 (Vault (test))
    Jan 10, 2018 19:54:54.156 [0x80a900100] DEBUG - Notifying the system bundle an update to server /system/notify/serverUpdated?host=192.168.1.3
    Jan 10, 2018 19:54:54.156 [0x80a900100] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/notify/serverUpdated?host=192.168.1.3
    Jan 10, 2018 19:54:54.157 [0x80a900100] DEBUG - HTTP requesting GET http://127.0.0.1:45320/system/notify/serverUpdated?host=192.168.1.3
    [...]
    Jan 10, 2018 19:54:54.273 [0x80a900100] DEBUG - HTTP 200 response from GET http://127.0.0.1:45320/system/notify/serverUpdated?host=192.168.1.3

    This is the ifconfig output for that jail:

    root@plex-test:~ # ifconfig
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo
    epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether a2:60:8c:84:21:5b
        inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
        nd6 options=9<PERFORMNUD,IFDISABLED>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        groups: epair
    

    Can anybody familiar with that part of the PMS code take a guess at what's happening in the VM case?

  • sa2000sa2000 Posts: 29,713Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    @flauran
    I am moving this forum thread to the FreeBSD forum to help you get advice from other users

    Obviously there are complexities within this environment

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • flauranflauran Posts: 14Members, Plex Pass Plex Pass

    Bueller? Anyone?

  • bwegrzynbwegrzyn Posts: 1Members, Plex Pass Plex Pass

    I'm having this same issue. Are you guys installing this in an iocage jail on on 11.1?

    https://plex.tv/pms/resources.xml shows no local IP address for this new server I have setup in my iocage jail.

    I have the exact same setup on a 9.10 warden jail and it works fine, and resources.xml shows the local IP address as well.

Sign In or Register to comment.