DNSServer returns not existing IP

I moved the issue from the retired "Think different" topic to this dedicated topic.

 

The issue is the following

 

opening trailer app / seeing "Loading Trailer App..." / waiting for some time / Seeing "Trailer App is currently not available..."

 

System used

- ATV 3 5.2.1 (6025)
- DNS Server on ATV 192.168.1.2
- PMS 0.9.7.22.511 running on MacMini Server OS X Server 10.8.3
- PlexConnect running on IP 192.168.1.2
- PMS running on IP 192.168.1.2
- Media is stored on two NAS (Drobo FS) in the same network
- PlexConnect downloaded about an hour ago
 

With the PlexConnect released 30min ago ("DNSServer - log reply IP for intercepted "trailers" [iBaa]"), the log now shows me that the DNSServer forwards the ATV request to a wrong IP (192.168.1.123). First I thought this is because my parents run a PMS in the same network, but their PMS IP is 192.168.1.27. The IP 192.168.1.123 is currently not available in my network.

Yes... my commit was worth it :-)

Please do the following: in debug.py set the debug level for PlexGDM to 1 (should be 0 currently) and try again. Please attach the log then. I am curious why you got a response from a non-existing device :-)

Totally worth it ;)

Hmmm seems awkward, since PlexGDM finds the correct server IP - 192.168.1.2 

Maybe it's an old DNS Record or something. I'll double check my router and server settings.

Here is the complete log output

PlexConnect : ***
PlexConnect : PlexConnect
PlexConnect : Press ENTER to shut down.
PlexConnect : ***
PlexGDM : ***
PlexGDM : looking up Plex Media Server
PlexGDM : ***
PlexGDM : Sending discovery message: M-SEARCH * HTTP/1.0
PlexGDM : Received data from ('192.168.1.2', 32414)
PlexGDM : Data received:
 HTTP/1.0 200 OK
Content-Type: plex/media-server
Resource-Identifier: 8a2546d71a6cd57dbdfeebb29ff1cd1e44cb3bab
Name: HomeServer
Port: 32400
Updated-At: 1369047031
Version: 0.9.7.22.511-4b5280f
 
 
PlexGDM : servers discovered: 1
PlexGDM : HomeServer 192.168.1.2:32400
DNSServer : ***
DNSServer : Starting up.
DNSServer : intercept: trailers.apple.com
DNSServer : forward other to higher level DNS: 192.168.1.1
DNSServer : ***
WebServer : ***
WebServer : WebServer: Serving HTTP on 0.0.0.0 port 80.
WebServer : ***
DNSServer : DNS request received!
DNSServer : Source: ('192.168.1.156', 61455)
DNSServer : Domain: ax.init.itunes.apple.com
DNSServer : ***forward request
DNSServer : -> DNS response from higher level
DNSServer : DNS request received!
DNSServer : Source: ('192.168.1.156', 52895)
DNSServer : Domain: p3-buy.itunes.apple.com.akadns.net
DNSServer : ***forward request
DNSServer : -> DNS response from higher level
DNSServer : DNS request received!
DNSServer : Source: ('192.168.1.156', 62094)
DNSServer : Domain: trailers.apple.com
DNSServer : ***intercept request
DNSServer : -> DNS response: 192.168.1.123
 
PlexConnect : Shutting down.
WebServer : Shutting down.
DNSServer : Shutting down.

And it is working!!

I had to delete old DNS entries on my router and restart the router. Now everything is working just fine!

BTW the web server fails to start on a MAC server OS by default. You have to execute "sudo apachectl stop" first in order to stop the built in web server, just stopping the web server via the server app isn't sufficient.

Thank you for your support!!

Strange... please edit line 107 of DNSServer.py to the following:

    dprint(__name__, 1, "intercept "+Settings.getHostToIntercept()+": "+param['IP_self'])
This adds printing of the IP address used at DNS Server initialization.
Please check, if this address is faulty already...
 
The issue is, we have to distinguish between the IP-Addr of the PMS and PlexConnect - they might run on different machine. I don't understand why, but some people like this idea :-)
PlexGDM looks up the address of PMS.
The DNSServer has to intercept the calls to "trailers...", modify the request and forward this to PMS. The IP used here is IP_self...
Please open a terminal/cmd window and type the following:
python
import socket
socket.gethostbyname(socket.getfqdn())
You should get the IP address of the machine you are just running on - the question is: What happens if this computer has more than one valid IP...

...

BTW the web server fails to start on a MAC server OS by default. You have to execute "sudo apachectl stop" first in order to stop the built in web server, just stopping the web server via the server app isn't sufficient.

...

As I heard, you could also stop "Internet sharing" in preferences... Killing the apache server will basically do that :-)

As I heard, you could also stop "Internet sharing" in preferences... Killing the apache server will basically do that :-)

That's good to know, since you've to kill the apache every time you reboot. Guess that'd be unnecessary when disabling the "Internet sharing". 

Is there currently a way to change the audio stream of the video? Maybe in advance? In multi language iTunes movies (as you probably already know), you can hold down the select button while playing the movie, to switch languages, choose chapters or change the AirPlay Audoi output (this is working, pretty cool btw).

Bubudaking out of interest do you use DCHP address reservation on your router?

Bubudaking out of interest do you use DCHP address reservation on your router?

Yep

Still, I don't get why a "socket.gethostbyname(socket.getfqdn())" would return an old, outdated IP.

Btw what happens if the user is using IPv6? Has that been accounted for?

Still, I don't get why a "socket.gethostbyname(socket.getfqdn())" would return an old, outdated IP.

Bubudaking can you check you hosts file to see what entries are there?

Also do you have more than one subnet (either deliberately or e.g. because you use a wireless extender)?

Btw what happens if the user is using IPv6? Has that been accounted for?

No, nothing done in this area.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.