PlexConnect was working, now gives error.

I had the whole thing up and running. I was streaming to the Atv with no problems. After a restart I now get the following:

sudo “/Applications/PlexConnect-master/PlexConnect.py”
Password:
23:33:44 PlexConnect: ***
23:33:44 PlexConnect: PlexConnect
23:33:44 PlexConnect: Press CTRL-C to shut down.
23:33:44 PlexConnect: ***
23:33:44 Settings: add setting enable_plexgdm=True
23:33:44 Settings: add setting ip_pms=192.168.178.10
23:33:44 Settings: add setting port_pms=32400
23:33:44 Settings: add setting enable_dnsserver=True
23:33:44 Settings: add setting port_dnsserver=53
23:33:44 Settings: add setting ip_dnsmaster=8.8.8.8
23:33:44 Settings: add setting prevent_atv_update=True
23:33:44 Settings: add setting enable_plexconnect_autodetect=True
23:33:44 Settings: add setting ip_plexconnect=0.0.0.0
23:33:44 Settings: add setting hosttointercept=trailers.apple.com
23:33:44 Settings: add setting port_webserver=80
23:33:44 Settings: add setting enable_webserver_ssl=True
23:33:44 Settings: add setting port_ssl=443
23:33:44 Settings: add setting certfile=./assets/certificates/trailers.pem
23:33:44 Settings: add setting allow_gzip_atv=False
23:33:44 Settings: add setting allow_gzip_pmslocal=False
23:33:44 Settings: add setting allow_gzip_pmsremote=True
23:33:44 Settings: add setting loglevel=Normal
23:33:44 Settings: add setting logpath=.
23:33:44 PlexConnect: started: 23:33:44
23:33:44 PlexConnect: Version: 0.5-dev-020615
23:33:44 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)]
23:33:44 PlexConnect: Host OS: darwin
23:33:44 PlexConnect: PILBackgrounds: Is PIL installed? False
23:33:44 PlexConnect: IP_self: 192.168.1.103
23:33:44 DNSServer: started: 23:33:44
23:33:44 DNSServer: Failed to create socket on UDP port 53: [Errno 48] Address already in use
23:33:44 PlexConnect: DNSServer not alive. Shutting down.
23:33:44 PlexConnect: Shutting down.
23:33:44 PlexConnect: shutdown
23:33:44 PlexConnect: shutdown

Computer has static IP 192.168.1.103
All connected wired over ethernet
Macbook Pro
Apple TV3 Firmware 7.2

As I said it was working fine and now this. I’m lost as to why. I checked the trouble shooting pages and as far as I know I do not have a DNS server running on my Macbook.

But, saying that, in my network settings, under the DNS tab of the advanced settings it lists two ip addresses (192.168.1.1 and 0.0.0.0) in the DNS servers list but I can’t remove them. I can add one, 8.8.8.8 for example and it is then listed as the only DNS server. But when I remove 8.8.8.8 the other IPs show again.

What could be causing it to have gone from working to not working? If it is a DNS server problem how do I fix it?

Thanks in advance

One possibility: PlexConnect is actually already running. This first instance would already occupy port :53 and thus preventing the other from running.
Check Activity Monitor, or “ps -ef” and look for PlexConnect processes.

Hey, thanks for the reply.

I have activity monitor running and there is only Plex Plug-in, Plex Media Server
and Plex DLNA Server showing up. No PlexConnect.

I deleted and re-added the PlexConnect-master folder and the certificates. Restarted everything several times and still get the same error as above.

Well the system is saying there is something already bound to port 53. So you might have installed another DNS server in the meantime. Maybe “bind”. You could try and see what the following gives you when you enter it on the console:

lsof -i4TCP:53

This should show what process is running against that port. From there on, you could kill that process and make sure it won’t start again.

Hey, thanks as well…

No process called “bind” that I can see.

Entering “lsof -i4TCP:53” in the terminal gives no results… Literally does nothing.

All of this is verging on the edge of my understanding. I’m surprised I even got it working in the first place.

Any other ideas?

Cheers

Ok, I entered “ps -ef” in terminal and the following was included in the listings among the other results… Is this a history of activity? It’s all alien to me. :slight_smile:

0 75 1 0 11:09pm ?? 0:00.01 /bin/bash /Applications/PlexConnect-master/support/OSX/PlexConnect.bash

0 349 75 0 11:09pm ?? 0:00.27 python ./PlexConnect.py

0 364 349 0 11:09pm ?? 0:00.10 python ./PlexConnect.py

Tried using lsof -i :53 as well, nothing…

Your output shows plexconnect is running!

The ps -ef shows you the current running processes. A little bit the same as the activity monitor in OS X, just more details. When starting, each process will get a pid (process id), which you can see as the second number on each line. So your bash script has pid 75. The first python process has pid 349, but got started by pid 75 (which is the third number).

Since the last python got started by pid 349, you can see that all three plexconnect processes are related (number 75 started 349, number 349 started 364, you see it is a tree).

If you enter

sudo kill 75

you will kill the master process. This should kill the other two as well. If not kill them with

sudo kill 349

and

sudo kill 364

Check that it worked by entering:

ps -ef | grep -i plexconnect

The ‘grep -i’ searches the output of ‘ps -ef’ in a case Insensitive way. If this still returns processes, kill them! As soon as there are no processes left, start your PlexConnect again and the errors will probably be gone.

As a last note, the lsof -i:53 should have no space between the -i and the :53.

Ok, cool. Seems to be working now. I typed "sudo kill 75"and it asked for the password. I then restrarted terminal and typed "sudo “/Applications/PlexConnect-master/PlexConnect.py” and it started runnning ok. Streaming works again.

Thanks for your help SingleServingSociety and baa…

Now all I need is to get the process to start on launch. I can’t get the launchdaemon to work. I don’t even see a launchdaemon in my library.

I will start a new thread for that.

Keep up the good work and thanks again.

Never started services on a Mac… running on Linux myself.

Followed the instructions on the wiki. Seems to work now. Still not sure how. Not complaining. Will leave it alone until it stops working. Hopefully never.

Thanks again for the help.