pannal / Kitana

A responsive Plex plugin web frontend
Other
496 stars 25 forks source link

500 Internal Server Error #45

Closed davidgut1982 closed 3 years ago

davidgut1982 commented 4 years ago

I keep having this error. It happens for some entries. That means it loads Kitana, but some entries don't work, some do. No matter what, either installed on a VM or via docker. Local IP doesn't work at all. Internet IP works, but errors on some entries. Relay IP is slow, works, but errors on some entries. I am at a loss what to do.

This is the local IP error


500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/dist-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fc3246530b8>: Failed to establish a new connection: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/dist-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192-168-10-3.62045059492a46b3af67b97bfc547e0e.plex.direct', port=32400): Max retries exceeded with url: /servers (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fc3246530b8>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/cherrypy/_cprequest.py", line 638, in respond
    self._do_respond(path_info)
  File "/usr/local/lib/python3.7/dist-packages/cherrypy/_cprequest.py", line 697, in _do_respond
    response.body = self.handler()
  File "/usr/local/lib/python3.7/dist-packages/cherrypy/lib/encoding.py", line 219, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/opt/Kitana/kitana.py", line 489, in servers
    servers = self.discover_pms(server_name=server_name, server_addr=server_addr)
  File "/opt/Kitana/kitana.py", line 453, in discover_pms
    self.session.get(self.server_addr + "servers", headers=self.full_headers, **self.req_defaults)
  File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192-168-10-3.62045059492a46b3af67b97bfc547e0e.plex.direct', port=32400): Max retries exceeded with url: /servers (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fc3246530b8>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))

Powered by CherryPy 18.5.0

This is the public IP

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/opt/Kitana/kitana.py", line 632, in default
    return self.render_plugin(path)
  File "/opt/Kitana/kitana.py", line 174, in render_plugin
    content = self.plex_dispatch(path)
  File "/opt/Kitana/kitana.py", line 159, in plex_dispatch
    r = self._dispatch(path)
  File "/opt/Kitana/kitana.py", line 155, in _dispatch
    r.raise_for_status()
  File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://64-44-140-202.62045059492a46b3af67b97bfc547e0e.plex.direct:32400/video/subzero/item/20807/actions?item_title=Law%20&%20Order:%20Special%20Victims%20Unit%20S06E09,%20Weak&title=Items%20On%20Deck%20%3E%20Law%20&%20Order:%20Special%20Victims%20Unit%20S06E09,%20Weak

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/dist-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fc324619080>: Failed to establish a new connection: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/dist-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192-168-10-3.62045059492a46b3af67b97bfc547e0e.plex.direct', port=32400): Max retries exceeded with url: /servers (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fc324619080>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/cherrypy/_cprequest.py", line 638, in respond
    self._do_respond(path_info)
  File "/usr/local/lib/python3.7/dist-packages/cherrypy/_cprequest.py", line 697, in _do_respond
    response.body = self.handler()
  File "/usr/local/lib/python3.7/dist-packages/cherrypy/lib/encoding.py", line 219, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/opt/Kitana/kitana.py", line 652, in default
    return self.discover_pms(self.server_name)
  File "/opt/Kitana/kitana.py", line 453, in discover_pms
    self.session.get(self.server_addr + "servers", headers=self.full_headers, **self.req_defaults)
  File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192-168-10-3.62045059492a46b3af67b97bfc547e0e.plex.direct', port=32400): Max retries exceeded with url: /servers (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fc324619080>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))

Powered by CherryPy 18.5.0 
dramirvf commented 4 years ago

I have a similar issue. I have installed Kitana today for the first time. I installed it through Docker in my Synology NAS. After giving Plex Media Server IP with Kitana Port, it asked for Plex Credentials. After filling user/pass, I chose the local server address. It worked without any issues on the first run. After working for few hours, due to a weird issue with SubZero, I needed to restart my Synology NAS (Where I have my Plex Media Server and Docker). After restarting and filling Plex user/pass it showed the server list (like the first run), but after choosing the same server, it keeps giving the following error:

500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/urllib3/connection.py", line 157, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/lib/python3.5/site-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.5/socket.py", line 733, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.5/site-packages/urllib3/connection.py", line 300, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.5/site-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f50b858fd30>: Failed to establish a new connection: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.5/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192-168-50-26.bdac880401d3402ba5754ef55fe747a1.plex.direct', port=32400): Max retries exceeded with url: /servers (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f50b858fd30>: Failed to establish a new connection: [Errno -5] No address associated with hostname',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/cherrypy/_cprequest.py", line 638, in respond
    self._do_respond(path_info)
  File "/usr/local/lib/python3.5/site-packages/cherrypy/_cprequest.py", line 697, in _do_respond
    response.body = self.handler()
  File "/usr/local/lib/python3.5/site-packages/cherrypy/lib/encoding.py", line 219, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "kitana.py", line 489, in servers
    servers = self.discover_pms(server_name=server_name, server_addr=server_addr)
  File "kitana.py", line 453, in discover_pms
    self.session.get(self.server_addr + "servers", headers=self.full_headers, **self.req_defaults)
  File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192-168-50-26.bdac880401d3402ba5754ef55fe747a1.plex.direct', port=32400): Max retries exceeded with url: /servers (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f50b858fd30>: Failed to establish a new connection: [Errno -5] No address associated with hostname',))
Nemesis77swe commented 3 years ago

me to, now I'm trying to find a way to remove everything..

pannal commented 3 years ago

Hmm, this doesn't look like something Kitana can actually influence. How are you running the container? Can you access the local network from within the container?

Edit: This might actually also be a DNS problem; Can you try running Kitana manually without docker to see if that fixes the issue?