Giter VIP home page Giter VIP logo

Comments (20)

iBaa avatar iBaa commented on August 20, 2024

What is client "19"? Why is it requesting "get_log.cgi"? Do you have some other server processes running? Other clients in the network that might get confused?

from plexconnect.

mmccurdy avatar mmccurdy commented on August 20, 2024

"Client 19" is secret code for "Client 192.168.0.123" with a line break inserted after 80 characters ;)

from plexconnect.

iBaa avatar iBaa commented on August 20, 2024

Ha. That is cool. Somehow the \n made my brain reset. :-D
So 192.168.0.123 is your aTV? I wonder why it requests those strange paths...

from plexconnect.

tiaanv avatar tiaanv commented on August 20, 2024

no... My ATV is is not 192.168.0.123.. it infact it is my XBMC box... which in theory has nothing to do with this. the XBMC box is the one serving the content SMB share.

I have no clue why it would be probing the plex server box.

Why would it cause plexconnect to stop working. Is there more info I can give you guys?

from plexconnect.

iBaa avatar iBaa commented on August 20, 2024

Don't know... this issue was reported ealier in the Plex forums.
So far we were unable to figure out the root cause.
Your setup - with XBMC box - might give some hints... once my brain get's up and running again :-)

from plexconnect.

tiaanv avatar tiaanv commented on August 20, 2024

LOL. I'll see what other clues I can give you....

It's either the fact that the media for my plex server instance does not reside on the local machine, or my xbmc box is doing something funny,

I've restarted plexconnect and not made any requests form my ATV, and the XBMC box .123 has not made any strange calls.

So I think it must have something to do with my plex media files not residing in the same server...

anyways.... 'll fool around a bit..

PS... this thin you have created here is revolutionary for people with ATV3 !!! My hat is off!!

from plexconnect.

tiaanv avatar tiaanv commented on August 20, 2024

I've looked into this a little further...

I don't think the crash has anything to do with the random requests from my xbmc box.

I am running the plex server from my laptop (it's just for testing at the moment). It is only connected to the rest via wireless 802.11n. I am sure the crash comes after connection is lost (network disconnect or something). Even though plexconnect and plex media server is on the same machine. plexconnect detects the media server on 192.168.0.6 (the IP for my laptop). This is correct, but the arp/routing table will change the moment the wireless disconnects.

I have two questions and some suggestions.

  1. Does plexconnect keep an open socket connction to the plex server, or does it connect upon each request?
  2. Is there some re-connect funtionality should it loose conection?

So my suggestions would be as follows.

  1. First test if plex media server can be reached via 127.0.0.1 this would bypass any dependency on network.
  2. Dont try and keep any sockets open for long period of time. They wont stay there..rather connect, do, disconnect. or verify the socket is still valid on each request, and gracefully handle disconnects.

That's my two cents worth.

Regards

from plexconnect.

iBaa avatar iBaa commented on August 20, 2024

Port to PMS is re-newed everytime it is needed, I guess. Handled in WebServer/XMLConverter.
DNS Port (incoming) is always open and the same. We don't want to loose requests.
DNS Port (outgoing) for forwarding is also open all the time. I did try to open it only on demand, but it didn't solve those DNS issues either.

from plexconnect.

brettchiltonjones-zz avatar brettchiltonjones-zz commented on August 20, 2024

What about changing the following in DNSServer.py on line no. 208 / 209

change from:
except socket.timeout:
pass

change to:
except socket.error:
pass

At least then the DNS server will continue to run rather than shutting down when [Errno 10054] is thrown?

from plexconnect.

iBaa avatar iBaa commented on August 20, 2024

yes, we could do something like that - though I would print at least a "warning" when there were a buffer overrun. On the other hand, that only hides - not solves the issue...

from plexconnect.

tiaanv avatar tiaanv commented on August 20, 2024

Hi guys. Just a stupid question. Is it the dns server(plexconnect) throwing the error or the connection to the upstream dns?

from plexconnect.

iBaa avatar iBaa commented on August 20, 2024

first msg:
)) File "C:\plexconnect\DNSServer.py", line 166, in Run
)) data, addr = DNS.recvfrom(1024)
This seems to be the aTV request into PlexConnect/DNSServer.

from plexconnect.

tiaanv avatar tiaanv commented on August 20, 2024

Looking at the code in DNSServer.py.

I agree that the
except socket.timeout: should change. I have changed it in mine for testing purposes.

At least this will capture the error. and stop it from crashing... Will it also catch any timeout errors?

will test.

from plexconnect.

tiaanv avatar tiaanv commented on August 20, 2024

put these lines in... Think this is the best option right now.
except socket.timeout:
pass
except socket.error as e:
dprint(name, 1, "WARNING! DNS error({0}): {1}".format(e.errno, e.strerror))

from plexconnect.

tiaanv avatar tiaanv commented on August 20, 2024

never coded in Python before...sorry...hope it is right.

from plexconnect.

elan avatar elan commented on August 20, 2024

It seems right to me to catch the error. You can use nice formatting in these comments if you want:

except socket.timeout:
    pass
except socket.error as e:
    dprint(__name__, 1, "WARNING! DNS error({0}): {1}".format(e.errno, e.strerror))

from plexconnect.

brettchiltonjones-zz avatar brettchiltonjones-zz commented on August 20, 2024

@elan - That would work nicely.

Catching the error resolved the problem locally for me.

from plexconnect.

tiaanv avatar tiaanv commented on August 20, 2024

Will make the comments pretty next time!

Implemented the catch and seems to be working. No crash.

from plexconnect.

iBaa avatar iBaa commented on August 20, 2024

)) except socket.timeout: should change
the timeout is by design - at least on the aTV incoming side. It will stay there without action ('pass').
I will add the except socket error + warning...

from plexconnect.

iBaa avatar iBaa commented on August 20, 2024

done.

from plexconnect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.