LukeChannings/moviematch

error trying to connect: tcp connect error: Connection refused (os error 111) [Bug]

TiboGabriels opened this issue · 20 comments

Describe the bug
Container stops with exit code 1, gives this log:

INFO Listening on port 8080

error: Uncaught (in promise) TypeError: error sending request for url (https://:32400/library/sections?X-Plex-Token=): error trying to connect: tcp connect error: Connection refused (os error 111)

at processResponse (deno:core/core.js:223:11)
at Object.jsonOpAsync (deno:core/core.js:240:12)
at async fetch (deno:op_crates/fetch/26_fetch.js:1278:29)
at async getSections (plex.ts:33:15)
at async plex.ts:77:20

To Reproduce
Steps to reproduce the behavior:

  1. deploy container using docker-compose
  2. view logs

Expected behavior
The container starts

Server:

  • OS: Open-Media-Vault 5.6.0
  • Docker: OMV-extras

Hey @TiboGabriels

This looks like a networking issue with your server. The error means that the Plex server isn't accessible from MovieMatch.
Can you try finding an IP address route to the Plex server and using that instead? e.g. http://192.168.1.10:32400

Is Plex accessible from other containers using the same name?

Closing due to inactivity. Comment back with more info to re-open

I had tried that before, but when using the internal IP, I get this error:
error trying to connect: invalid dnsname

When using the external IP with the internal port, I get the same TCP error, when using the external port Plex uses I get the DNS error again

At the moment I don't have any other containers that need to reach plex

If you can SSH into the server, you could try following the debugging steps I've posted in #52?

I just tried using the external port with the domain name and got this error:
error trying to connect: invalid certificate: CertNotValidForName

I'll have a look at the instructions you linked

In the instructions you want me to exec into the container, the thing is that I've never seen the container running, it's always on stopped and when looking in the lights I get the aforementioned errors. I'm using portainer for the bulk of it btw

error trying to connect: invalid certificate: CertNotValidForName

Are you using a valid TLS certificate for your Plex domain?

In the instructions you want me to exec into the container, the thing is that I've never seen the container running, it's always on stopped and when looking in the lights I get the aforementioned errors. I'm using portainer for the bulk of it btw

Can you run docker run --rm -u 0 -it --entrypoint="/bin/bash" lukechannings/moviematch and follow the instructions for installing curl from #52?

Are you using a valid TLS certificate for your Plex domain?

I have a self signed SSL certificate if thats good enough

Can you run docker run --rm -u 0 -it --entrypoint="/bin/bash" lukechannings/moviematch and follow the instructions for installing curl from #52?

I'll try it now but bear with me, I'm on mobile :p

Screenshot_20210223-212035
I managed to get into the Interactive shell and executed the command as you specified, here's the output, or atleas the last bit of it. I apologise for the medium, as I said I'm on mobile

Can you try running curl <plex url>/sections/all?x-plex-token=<plex token>?

If that fails, try running it with curl -k <plex url>/sections/all?x-plex-token=<plex token> (disables TLS cert check)

I will

This is the result, i assume that means the token would be wrong? I'll see if the token changed

<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>root@5da344229635:/app#

just pulled the token from the xml but got the same result: 401
Am i supposed to get the token elsewhere?

after in plex, setting secure connection to dissabled instead of preferred, i got this as output:
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to omv-server-gabriels.duckdns.org:21415

This is the result, i assume that means the token would be wrong? I'll see if the token changed

<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>root@5da344229635:/app#

Yep, that's an invalid (or missing) token. You can follow these instructions to find your token.

after in plex, setting secure connection to dissabled instead of preferred, i got this as output:
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to omv-server-gabriels.duckdns.org:21415

You should set "secure connection" to preferred, this way you can use http:// or https://.
You might need to use http:// for MovieMatch if you're using a self-signed certificate.

I'm using self signed so i'll use http then, let's see

It worked! now i just need to figure out how to deploy the stack without it instantly stopping

error: Uncaught (in promise) DenoStdInternalError: "Films, Series" did not match any available library names: Documentaires, Films, Series, Muziek, Photos, Comedy, Home-Videos

throw new DenoStdInternalError(msg);

      ^

at assert (assert.ts:13:11)

at getSelectedLibraryTitles (plex.ts:66:3)

at plex.ts:79:33

i fixed it, it was because i used quotes, thank you!

Sweet! I'm glad you got it working.