how to make plexconnect use the correct IP address?

I run PMS and PlexConnect on my mac Mini which has an active Ethernet and Wifi Connection. The ethernet is 192.168.x.3 and the wifi is 192.168.x.4.

I would like My PMS and PlexConnect to both run on the ethernet (192.168.x.3), but for some reason PlexConnect seems to keep choosing the wifi (192.168.x.4).

Since I have all my apple TVs pointed to the .3 address, this causes it not to work on the AppleTVs.

If I disable my wifi and reboot the mac mini, everything works fine, but unfortunately i need to have both connections enabled.

I can see that there is a line in the settings.cfg file which will allow me to explicitly set the ip address but unfortunately when I try to edit the file it tells me the file is locked.

Can anyone tell me how to make this work so that it always chooses the ethernet connection instead of the wifi?

@bdee1 said:
I run PMS and PlexConnect on my mac Mini which has an active Ethernet and Wifi Connection. The ethernet is 192.168.x.3 and the wifi is 192.168.x.4.

I would like My PMS and PlexConnect to both run on the ethernet (192.168.x.3), but for some reason PlexConnect seems to keep choosing the wifi (192.168.x.4).

Since I have all my apple TVs pointed to the .3 address, this causes it not to work on the AppleTVs.

If I disable my wifi and reboot the mac mini, everything works fine, but unfortunately i need to have both connections enabled.

I can see that there is a line in the settings.cfg file which will allow me to explicitly set the ip address but unfortunately when I try to edit the file it tells me the file is locked.

Can anyone tell me how to make this work so that it always chooses the ethernet connection instead of the wifi?

In windows (although this should be similar in mac), you can change your Network Priorities, so if I have wireless and ethernet active I can set one to have more priority than the other.

I done a quick google search regarding if this is possible for mac, now I don’t know your OS but essentially you do the following. Source: Apple

1- Go to System Preferences, then click Network.
2- Choose Set Service Order from the Action pop-up menu.
3- Drag a service, such as Ethernet, to the top of the list.
4- Click OK, then click Apply to make the new settings active.

Those instruction are for OS X Mavericks, but it should be similar for other mac OS’s.

thanks for your reply! I actually had that same thought last night and I did move the ethernet priority up above the wifi priority in system preferences. Once I rebooted, PMS seemed to be grabbing the ethernet IP address, but plexConnect still seems to be grabbing the wireless ip address.

@bdee1 said:
thanks for your reply! I actually had that same thought last night and I did move the ethernet priority up above the wifi priority in system preferences. Once I rebooted, PMS seemed to be grabbing the ethernet IP address, but plexConnect still seems to be grabbing the wireless ip address.

So perhaps PlexConnect is using the wifi IP by default because it was originally set-up when wifi was the first priority in your network settings? (Although this is purely an assumption)

In that case shutdown PlexConnect by pressing CTRL-C when the terminal window is focused and wait for the processes to be stopped, then attempt to edit settings.cfg.

If you are still not able to edit the file then perhaps deleting it instead will resolve the problem?, To do this simply run PlexConnect after deleting settings.cfg and then cleanly shutdown the application (using CTRL-C), which will then create a new settings.cfg file, hopefully this will set-up the ethernet as your source for your local IP.

when you say press CTRL-C when the terminal window is focused, i’m not sure what terminal window you mean.

I do not have a terminal window open with the process running, so I am not sure how to kill the plexconnect process and unlock the settings file?

to clarify - when I go to stop plexConnect, I click the openPlex icon on my menu bar and then click the “Stop PlexConnect” button - but that doesnt seem to unlock the plexsettings.cfg file :frowning:

@bdee1 said:
when you say press CTRL-C when the terminal window is focused, i’m not sure what terminal window you mean.

I do not have a terminal window open with the process running, so I am not sure how to kill the plexconnect process and unlock the settings file?

Sorry, I thought you were using the terminal when running PlexConnect… I’m assuming you have it running as a Daemon? If so then you need to enter a command to shut it down.

You will need to run terminal and enter sudo launchctl unload /Library/LaunchDaemons/com.plex.plexconnect.bash.plist for more information on this you can view additional commands at GitHub/PlexConnect//Install-Guide-Mac

thanks very much! I was able to stop the daemon, delete the settings.cfg file, replace it with a modified version with the ip explicitly set and reboot.

unfortunately after the reboot, plexConnect seems to still be starting on the wireless IP instead of the ethernet ip that i specified in settings.cfg

@bdee1 said:
thanks very much! I was able to stop the daemon, delete the settings.cfg file, replace it with a modified version with the ip explicitly set and reboot.

unfortunately after the reboot, plexConnect seems to still be starting on the wireless IP instead of the ethernet ip that i specified in settings.cfg

Did you check the settings.cfg to see if the IP you specified is still there? I’m thinking maybe PlexConnect is overwritting the settings.cfg file changing the IP back…

In your settings.cfg did you write it like so?

enable_plexgdm = False ip_pms = 192.168.x.3 port_pms = 32400

The above is based on the following information from the gethub.

PlexGDM
Disabling GDM auto discovery of your Plex Media Server

GDM is used to auto discover your PMS server, if you are having issues with it not automatically discovering your PMS or it is showing the wrong IP then you can disable this and hard code your PMS’s IP (and port if using a non-standard one).

GDM auto discovery is may get confused if you are running VmWare (or similar) or a VPN because of the IP addresses generated by these; the symptoms are usually that you cannot see your content thumbnails and content will not play, disabling GDM and setting a manual IP has been shown to resolve this particular issue.

NB if GDM is not disabled it will override any hard coded PMS IP. A sample configuration is shown below (note the capital ‘F’):

Check out the Source: GitHub/PlexConnect//Install-Guide-Mac

WebServer
Manual Override to PlexConnect’s IP

In some environments PlexConnect is unable to figure out the local IP address of its host system. You can disable the auto detect feature by editing the following lines, specifying your local IP address.

NB if you do not disable the auto detect then it will override any IP that you have hard coded in settings.cfg.

enable_plexconnect_autodetect = False ip_plexconnect = 0.0.0.0

It’s between this and the other setting that will resolve your issue, I would assume that it’s this one since this is dealing with the Local Ip.

ok so i must be gettign close now…

My settings.cfg file looks like this:
[PlexConnect]
enable_plexgdm = False
ip_pms = 192.168.1.3
port_pms = 32400
enable_dnsserver = True
port_dnsserver = 53
ip_dnsmaster = 8.8.8.8
prevent_atv_update = True
enable_plexconnect_autodetect = False
ip_plexconnect = 192.168.1.3
hosttointercept = trailers.apple.com
port_webserver = 80
enable_webserver_ssl = True
port_ssl = 443
certfile = ./assets/certificates/trailers.pem
allow_gzip_atv = False
allow_gzip_pmslocal = False
allow_gzip_pmsremote = True
loglevel = Normal
logpath = .

and after a reboot, when i look at the plexconnect log it looks like this:
09:18:13 PlexConnect: started: 09:18:13
09:18:13 PlexConnect: Version: 0.5-dev
09:18:13 PlexConnect: Python: 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
09:18:13 PlexConnect: Host OS: darwin
09:18:13 PlexConnect: PILBackgrounds: Is PIL installed? True
09:18:13 PlexConnect: IP_self (from settings): 192.168.1.3
09:18:13 DNSServer: started: 09:18:13
09:18:13 DNSServer: Failed to create socket on UDP port 53: [Errno 49] Can’t assign requested address
09:18:14 PlexConnect: DNSServer not alive. Shutting down.
09:18:14 PlexConnect: Shutting down.
09:18:14 PlexConnect: shutdown
09:18:14 PlexConnect: shutdown

@bdee1

What is IP_SELF set to when you are running it without the setting? is it the local IP from your wireless or is it displaying your public IP address?, I think just having

enable_plexconnect_autodetect = False ip_plexconnect = 192.168.1.3

would be what you need, as the IP_SELF I think would be your public IP and not your local.

The DNS error either means it’s failing to connect to ip_pms = 192.168.1.3, and apply port 53 or port 53 isn’t open. So I would suggest removing

enable_plexgdm = False ip_pms = 192.168.1.3 port_pms = 32400

or even change plexdgm to true… then see what the log brings up.

without the setting, IP_SELF is set to 192.168.1.4 which is the local IP from my wireless connection.

I tried setting enable_plexgdm back to true and then rebooting and I am still getting issues connecting to the DNS:
09:25:22 PlexConnect: started: 09:25:22
09:25:22 PlexConnect: Version: 0.5-dev
09:25:22 PlexConnect: Python: 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
09:25:22 PlexConnect: Host OS: darwin
09:25:22 PlexConnect: PILBackgrounds: Is PIL installed? True
09:25:22 PlexConnect: IP_self (from settings): 192.168.1.3
09:25:22 DNSServer: started: 09:25:22
09:25:22 DNSServer: Failed to create socket on UDP port 53: [Errno 49] Can’t assign requested address
09:25:22 PlexConnect: DNSServer not alive. Shutting down.
09:25:22 PlexConnect: Shutting down.
09:25:22 PlexConnect: shutdown
09:25:22 PlexConnect: shutdown

@bdee1

Right, this DNS error is pondering me, so after googling the issue, apparently it means the DNSServer is already running.

someone who had the same issue, restarted their machine and this resolved the matter for them

So keep your settings.cfg the way you originally had it
[PlexConnect] enable_plexgdm = False ip_pms = 192.168.1.3 port_pms = 32400 enable_dnsserver = True port_dnsserver = 53 ip_dnsmaster = 8.8.8.8 prevent_atv_update = True enable_plexconnect_autodetect = False ip_plexconnect = 192.168.1.3 hosttointercept = trailers.apple.com port_webserver = 80 enable_webserver_ssl = True port_ssl = 443 certfile = ./assets/certificates/trailers.pem allow_gzip_atv = False allow_gzip_pmslocal = False allow_gzip_pmsremote = True loglevel = Normal logpath = .

and restart your machine, hopefully this will fix the issue…

If that doesn’t work, then the only thing to do would be to delete the cfg file run PlexConnect, then properly shut it down (using the commands provided previously), in order to generate the settings.cfg file, if plex starts up without the DNSServer issue, then using the newly pre-configured settings.cfg file do the following.

First back up the file so you have an original copy.

Enter these details
enable_plexgdm = False ip_pms = 192.168.1.3 port_pms = 32400

Save the file, start PlexConnect, check the log. Hopefully the matter is resolved at this point, if not and if the issue is the DNSServer, then try restarting the machine again. Then we’ll have to go from here to find the cause of the issue…

There has to be a conflict somewhere… I’d assume the port wouldn’t need forwarded… but then again if it works on x.4 and not x.3 then maybe it is a port forwarding issue…

ok so i deleted the settings.cfg file and restarted the plexconnect daemon. This did generate a new settings.cfg file and the service started up without the dns error.

However the settings.cfg file is locked again and when I stop the plexconnect daemon the settings.cfg file remains locked - just like when I started… :frowning:

@bdee1 said:
ok so i deleted the settings.cfg file and restarted the plexconnect daemon. This did generate a new settings.cfg file and the service started up without the dns error.

However the settings.cfg file is locked again and when I stop the plexconnect daemon the settings.cfg file remains locked - just like when I started… :frowning:

Are you able to view the file? as long as you can get the content and back it up then you can create a settings.cfg with the same data and simply just modify that one part…

Do you have Plexconnect running with the highest privalage? maybe try running a text editor with the same privalages in order to edit the file?

Or perhaps try changing the permission of the file?

https://support.apple.com/kb/PH18894?locale=en_GB&viewlocale=en_US
https://support.apple.com/kb/PH13799?locale=en_GB

Just a quick search on how to do this in Mac… not sure what MAc Os you’re on… so hopefully that helps.

The goal is to backup the settings.cfg then modify or create another settings.cfg but with only the following settings changed.
enable_plexgdm = False ip_pms = 192.168.1.3 port_pms = 32400

In theory since this is the only part of the file you are changing, then this should resolve all the issues.

Here is how to do it with OpenPlex:

Not sure why you need both the wifi and ethernet enabled simultaneously but for whatever reason…

Stop PlexConnect from the Settings Tab (This will stop it also via launchctl since OpenPlex runs PlexConnect via launchctl by default so PlexConnect starts as a daemon @ boot)

Copy your Settings.cfg file from the /Applications/PlexConnect folder to your desktop once its there you can edit it easily by changing this to your proper ip (it won’t let you edit it from within the /Applications/PlexConnect folder due to folder/file permissions and is easier to just copy it to your desktop to easily edit it, it is locked by design by iBaa most files are locked from editing wishing the PlexConnect base dir)

enable_plexconnect_autodetect = False
ip_plexconnect = 192.168.x.3

change the ip to match your ethernet ip!

Once you are done editing it copy it back into the /Applications/PlexConnect folder. Now goto the advanced tab and backup your edited Settings.cfg. Next goto the extras tab and turn on the settings.cfg auto loader. Now start PlexConnect back up from the Settings tab. Check you log by clicking the log button and confirm its using the proper ethernet ip. If your router supports DHCP reservation I would highly recommend using it.