#Unable to connect to Plex Server post reinstall

1 messages · Page 1 of 1 (latest)

dawn plumeBOT
#

Thanks for opening a support thread!
Please include the following so we can help:

Required Information

• Tracearr version
• Environment (Docker, LXC, Unraid, etc.)
• Docker compose file
• Logs (pastebin.com) or screenshots

Describe The Issue

• Expected behavior
• Actual behavior
• Steps to reproduce

Read The Docs

Docs · Logs · FAQ

gleaming cobalt
torpid dock
#

can you provide your compose file please

gleaming cobalt
torpid dock
#

have you tried logging out and back into tracearr?

gleaming cobalt
torpid dock
#

looks like a networking issue

#

do you have split dns on your lan?

gleaming cobalt
#

The server is hosted on hetzner and the same resolves to the plex server ip.

#

I did go through some basic troubleshooting since I thought it would be dns.

torpid dock
#

can you show me the output of this? docker exec -it tracearr wget -O - https://athena.odysseypx.com

#

i'm just unsure right now whether its an actual http connection issue or if the invalid plex token is causing the same exception throw

#

the wget should tell us

gleaming cobalt
torpid dock
#

let me dig through some code, one moment

#

what about this? docker exec -it tracearr node -e "fetch('https://athena.odysseypx.com').catch(e => console.log(e.cause ?? e))"

gleaming cobalt
# torpid dock what about this? `docker exec -it tracearr node -e "fetch('https://athena.odysse...
docker exec -it tracearr node -e "fetch('https://athena.odysseypx.com').catch(e => console.log(e.cause ?? e))"
AggregateError [ETIMEDOUT]: 
    at internalConnectMultiple (node:net:1134:18)
    at internalConnectMultiple (node:net:1210:5)
    at Timeout.internalConnectMultipleTimeout (node:net:1742:5)
    at listOnTimeout (node:internal/timers:607:11)
    at process.processTimers (node:internal/timers:541:7) {
  code: 'ETIMEDOUT',
  [errors]: [
    Error: connect ETIMEDOUT 5.9.71.80:443
        at createConnectionError (node:net:1678:14)
        at Timeout.internalConnectMultipleTimeout (node:net:1737:38)
        at listOnTimeout (node:internal/timers:607:11)
        at process.processTimers (node:internal/timers:541:7) {
      errno: -110,
      code: 'ETIMEDOUT',
      syscall: 'connect',
      address: '5.9.71.80',
      port: 443
    },
    Error: connect ENETUNREACH 2a01:4f8:161:814e::2:443 - Local (:::0)
        at internalConnectMultiple (node:net:1206:16)
        at Timeout.internalConnectMultipleTimeout (node:net:1742:5)
        at listOnTimeout (node:internal/timers:607:11)
        at process.processTimers (node:internal/timers:541:7) {
      errno: -101,
      code: 'ENETUNREACH',
      syscall: 'connect',
      address: '2a01:4f8:161:814e::2',
      port: 443
    }
  ]
torpid dock
#

bingo

#

tracearr (node) cant connect to your plex server, but wget could.. weird

gleaming cobalt
#

It was working fine on the same version before, the only difference is I was using the supervised image from the older docs since it was an installation form a month or so ago

#

I kept updating it throughout till the server reinstall when I saw the docs again and it was changed

torpid dock
#

can we try this: docker exec -it tracearr node -e "const s = require('net').connect(443, '5.9.71.80', () => { console.log('connected'); s.destroy(); }); s.on('error', e => console.log(e))"

gleaming cobalt
torpid dock
#

ok getting somewhere, now try docker exec -it tracearr node -e "const tls = require('tls'); const s = tls.connect(443, '5.9.71.80', {servername: 'athena.odysseypx.com'}, () => { console.log('connected', s.getProtocol()); s.destroy(); }); s.on('error', e => console.log(e))"

#

i'm stepping through the layers of node networking here..

gleaming cobalt
torpid dock
#

and now docker exec -it tracearr node -e "const https = require('https'); https.get('https://athena.odysseypx.com', r => { console.log(r.statusCode); r.resume(); }).on('error', e => console.log(e))"

gleaming cobalt
# torpid dock and now `docker exec -it tracearr node -e "const https = require('https'); https...
docker exec -it tracearr node -e "const https = require('https'); https.get('https://athena.odysseypx.com', r => { console.log(r.statusCode); r.resume(); }).on('error', e => console.log(e))"
AggregateError [ETIMEDOUT]: 
    at internalConnectMultiple (node:net:1134:18)
    at internalConnectMultiple (node:net:1210:5)
    at Timeout.internalConnectMultipleTimeout (node:net:1742:5)
    at listOnTimeout (node:internal/timers:607:11)
    at process.processTimers (node:internal/timers:541:7) {
  code: 'ETIMEDOUT',
  [errors]: [
    Error: connect ETIMEDOUT 5.9.71.80:443
        at createConnectionError (node:net:1678:14)
        at Timeout.internalConnectMultipleTimeout (node:net:1737:38)
        at listOnTimeout (node:internal/timers:607:11)
        at process.processTimers (node:internal/timers:541:7) {
      errno: -110,
      code: 'ETIMEDOUT',
      syscall: 'connect',
      address: '5.9.71.80',
      port: 443
    },
    Error: connect ENETUNREACH 2a01:4f8:161:814e::2:443 - Local (:::0)
        at internalConnectMultiple (node:net:1206:16)
        at Timeout.internalConnectMultipleTimeout (node:net:1742:5)
        at listOnTimeout (node:internal/timers:607:11)
        at process.processTimers (node:internal/timers:541:7) {
      errno: -101,
      code: 'ENETUNREACH',
      syscall: 'connect',
      address: '2a01:4f8:161:814e::2',
      port: 443
    }
  ]
}
torpid dock
#

right

#

have you tried restarting the tracearr container?

gleaming cobalt
torpid dock
#

no thats ok

#

can you add this line to your environment: section of the tracearr container in your compose file:

- NODE_OPTIONS=--dns-result-order=ipv4first

and then do a docker compose -f your.compose.file down and docker compose -f your.compose.file up -d

#

or actually, can you try this first: docker exec -it tracearr node -e "const https = require('https'); https.get('https://athena.odysseypx.com', {autoSelectFamily: false}, r => { console.log(r.statusCode); r.resume(); }).on('error', e => console.log(e))" if its not too late

#

just trying to rule out ipv6

gleaming cobalt
torpid dock
#

if it is ipv6, we can disable that in your compose file

#

right

#

bingo

gleaming cobalt
#

Hadn't done the env change yet

torpid dock
#

ok dont do the above NODE_OPTIONS, lets disable ipv6 in the container

#

modify your compose file to put enable_ipv6: false under your tracearr_network, so it should look like this:

networks:
  tracearr-network:
    driver: bridge
    enable_ipv6: false
#

to the existing networks block down the bottom

#

and then the down and up commands from my earlier message

torpid dock
#

docker compose -f your.compose.file down and docker compose -f your.compose.file up -d to restart the stack

#

after it comes back, the docker exec -it tracearr node -e "fetch('https://athena.odysseypx.com').catch(e => console.log(e.cause ?? e))" should succeed

#

if it does, you can try the web ui again

gleaming cobalt
#

hahaha

#

Sorry

#

but same error again

torpid dock
#

aw geez

gleaming cobalt
# torpid dock aw geez
 docker exec -it tracearr node -e "fetch('https://athena.odysseypx.com').catch(e => console.log(e.cause ?? e))"
AggregateError [ETIMEDOUT]: 
    at internalConnectMultiple (node:net:1134:18)
    at internalConnectMultiple (node:net:1210:5)
    at Timeout.internalConnectMultipleTimeout (node:net:1742:5)
    at listOnTimeout (node:internal/timers:607:11)
    at process.processTimers (node:internal/timers:541:7) {
  code: 'ETIMEDOUT',
  [errors]: [
    Error: connect ETIMEDOUT 5.9.71.80:443
        at createConnectionError (node:net:1678:14)
        at Timeout.internalConnectMultipleTimeout (node:net:1737:38)
        at listOnTimeout (node:internal/timers:607:11)
        at process.processTimers (node:internal/timers:541:7) {
      errno: -110,
      code: 'ETIMEDOUT',
      syscall: 'connect',
      address: '5.9.71.80',
      port: 443
    },
    Error: connect ENETUNREACH 2a01:4f8:161:814e::2:443 - Local (:::0)
        at internalConnectMultiple (node:net:1206:16)
        at Timeout.internalConnectMultipleTimeout (node:net:1742:5)
        at listOnTimeout (node:internal/timers:607:11)
        at process.processTimers (node:internal/timers:541:7) {
      errno: -101,
      code: 'ENETUNREACH',
      syscall: 'connect',
      address: '2a01:4f8:161:814e::2',
      port: 443
    }
  ]
}
torpid dock
#

can you try the NODE_OPTIONS thing i mentioned before

gleaming cobalt
#

Sure

torpid dock
#

if that fails i still have a few tricks up my sleeve

#

i dont know if your technical or not, but even though ipv4 connect is also failing in that output, there is some known jank with nodes implementation of the happy eyeballs thing where a returning ipv6 result can poison the ipv4 attempt. so we are trying to tell node to completely ignore ipv6

#

the fact that the connections not using node are succeeding make me suspect this case

gleaming cobalt
#

I did add the env var, it still failed with the same error above

torpid dock
#

ok, lets try this: docker exec -it tracearr node -e "const https = require('https'); https.get('https://5.9.71.80/', {servername: 'athena.odysseypx.com'}, r => { console.log(r.statusCode); r.resume(); }).on('error', e => console.log(e))"

#

this bypasses the dns lookup so we wont get ipv6 result at all

gleaming cobalt
torpid dock
#

right, this confirms it is the ipv6

#

can you show me your modified compose file?

gleaming cobalt
torpid dock
#

and just to confirm (sorry i have to ask), you are bring down the compose stack and starting it again ?

#

not just restarting the container

gleaming cobalt
torpid dock
#

im not sure disabling ipv6 on the host will fix it, because its the dns result thats hinting at ipv6.

#

try this: docker exec -it tracearr node -e "const https = require('https'); https.get('https://athena.odysseypx.com', {autoSelectFamily: false}, r => { console.log(r.statusCode); r.resume(); }).on('error', e => console.log(e))"

gleaming cobalt
#

Results in a 401

torpid dock
#
sudo iptables -L DOCKER -n
docker network inspect tracearr_network | grep -i mtu
torpid dock
gleaming cobalt
# torpid dock ```sudo ufw status sudo iptables -L DOCKER -n docker network inspect tracearr_ne...
ubuntu@zeus:~/Tracearr$ sudo ufw status
sudo iptables -L DOCKER -n
docker network inspect tracearr_network | grep -i mtu
[sudo] password for ubuntu: 
Status: inactive
Chain DOCKER (2 references)
target     prot opt source               destination         
ACCEPT     6    --  0.0.0.0/0            172.18.0.4           tcp dpt:3000
DROP       0    --  0.0.0.0/0            0.0.0.0/0           
DROP       0    --  0.0.0.0/0            0.0.0.0/0           
Error response from daemon: network tracearr_network not found
torpid dock
#

ack sorry that should be tracearr-network not an underscore

gleaming cobalt
#
sudo ufw status
sudo iptables -L DOCKER -n
docker network inspect tracearr_tracearr-network | grep -i mtu
Status: inactive
Chain DOCKER (2 references)
target     prot opt source               destination         
ACCEPT     6    --  0.0.0.0/0            172.18.0.4           tcp dpt:3000
DROP       0    --  0.0.0.0/0            0.0.0.0/0           
DROP       0    --  0.0.0.0/0            0.0.0.0/0 
torpid dock
#

uh docker might be calling it something weird, check with docker network ls

gleaming cobalt
# gleaming cobalt yep I did check
docker network ls
NETWORK ID     NAME                        DRIVER    SCOPE
7c35b41f0cf4   bridge                      bridge    local
49656ea58fa3   host                        host      local
204f3b7b51fb   none                        null      local
efc27e5ca830   tracearr_tracearr-network   bridge    local
torpid dock
#

right ok

#

lets try modifying the compose again, and lets merge this into what you have:```services:
tracearr:
sysctls:
- net.ipv6.conf.all.disable_ipv6=1

#

so we will add the last 2 lines

gleaming cobalt
torpid dock
#

and then restart the stack: docker compose -f your.compose.file down and docker compose -f your.compose.file up -d

gleaming cobalt
torpid dock
#

yes please

gleaming cobalt
#

no errors on this

torpid dock
#

fantastic

gleaming cobalt
#

let me try to login

torpid dock
#

yes

gleaming cobalt
#

yep, that worked

#

thanks a lot for the help

torpid dock
#

you should be fine to remove the NODE_OPTIONS and the disable_ipv6 stuff we added, and just keep that sysctl part.
and i will get this added to the docs FAQ for future issues

#

can you try removing those so i can confirm they arent needed?

gleaming cobalt
torpid dock
#

so we just keep this bit: sysctls: - net.ipv6.conf.all.disable_ipv6=1

gleaming cobalt
#

yep, works just with that

torpid dock
#

great

gleaming cobalt
#

Thank you @torpid dock , much appreciated ❤️

torpid dock
#

hope you enjoy tracearr ❤️

gleaming cobalt
#

now back to importing tautulli db again

torpid dock
#

haha goodluck that can be a pain

sharp nest
torpid dock
sharp nest
gleaming cobalt
#

btw @torpid dock , is there any way to cancel a library sync?

torpid dock
#

no

#

you could interrupt it by restarting the container, but it would just start syncing again when it starts up

gleaming cobalt
#

Hmm, alright ty.

#

Library sync for me always takes upto 4-5 hours sometimes more.

torpid dock
#

thats strange. do you have any errors in the log?

gleaming cobalt
#

I don't see anything at all

#

There's a tautulli import pending since it was interuppted but that's all

torpid dock
#

Gotta feed my cat, brb

#

ok back

#

can you browse to /debug and go to Tasks, do you have failed jobs?

torpid dock
#

I'm not clued up on the import tasks at all, we may need @sharp nest here

#

is the progress moving at all?

#

in the debug Overview page, can you show the counts on the top section of the page

gleaming cobalt
torpid dock
#

keep an eye on those figures, see if they change

#

you will need to refresh the page i think, they wont auto update

gleaming cobalt
torpid dock
#

Galla should be around in a while, he's the boss

#

the connection to your plex is going out over the internet yeah?

gleaming cobalt
#

I get around 150-200 Mbps to the server itself

torpid dock
#

can you see the network bandwidth graph over on the plex dashboard?

#

just to see if its actually doing something

gleaming cobalt
#

But there's 10 streams running right now too

torpid dock
#

yeah, so hard to tell if its media playback or the import

#

do you have some docker monitoring to show you the tracearr bandwidth?

gleaming cobalt
#

np, I'll keep an eye out.

iirc took a long time last time as well

gleaming cobalt
sharp nest
torpid dock
#

mmm beszel looks nice, new toy thank you

gleaming cobalt
sharp nest
#

I mean yeah that’s gonna take awhile for sure

#

It’s building a full historical snapshot of the new severs

torpid dock
#

i think as long as those numbers keep increasing on the overview page, its going

#

there are many factors contributing to the time. network, disk reads/writes, cpu.. and then apply that to both ends plex/tracearr

#

postgres is probably writing index updates like mad

#

(i imagine)

gleaming cobalt
#

17 mins between both screenshots

torpid dock
#

thats... slower than i would like

#

or i would expect rather

sharp nest
#

The daily ones def can be improved, but the first ones do a lot of different things to build out the historical timescale views

#

And then compact them, and then clean up the data used to make them

torpid dock
#

let us know when you get beszel on there, so we can see some perf stats on those containers

torpid dock
#

disk i/o ?

gleaming cobalt
#

That's been flat at 0 KB/s

torpid dock
#

which makes sense given it updates like 3 records in 30 minutes

#

so its a networking bottleneck ?

#

assuming cpu is low

gleaming cobalt
#

This is to the Plex server itself

#

There shouldn't be a networking bottleneck tbh

torpid dock
#

it remains a mystery, there must be a bottleneck somewhere. maybe disk io on plex pulling the data out?

#

or the API on tautulli

#

wherever the import is coming from

gleaming cobalt
#

Question, does Tracearr pull data from the library itself for library sync or from the Plex DB?

sharp nest
#

I mean we don’t have direct access to the plex database if that’s what you are asking

gleaming cobalt
#

Got it, had the thought that since the library is on gdrive, it might be an APi ban.
But just checked, no ban yet.

sharp nest
#

I’m sorry… what

#

Your library for plex is on Google Drive?

gleaming cobalt
#

Yes

torpid dock
sharp nest
#

Well, I don’t have an award to actually give you

gleaming cobalt
#

Not personal gdrive, but on an enterprise acc

sharp nest
#

But that’s definitely up there for one of the wonkiest setups

torpid dock
#

i'm going to go ahead and say that would be the cause of the slowness

#

tracearr talks to plex via api, plex then queries its internal DB, and if thats on gdrive, you are doing random reads on a large file on an internet storage device

sharp nest
#

Yeah you have decided to use bottlenecks as a future.

I’m sure all your media is 100% legal too so there is no exposure on your end either or TOS broken

gleaming cobalt
#

People did use to run that when google was lax on limits

torpid dock
#

its linux ISO's all the way down, of course we know that

sharp nest
#

But yes, you should expect bottlenecks

torpid dock
#

forget limits and legality. a database on an internet storage device is a world of pain. you cant fseek() to the middle of a file you have to read the contents of the whole thing until you reach the part you want

#

and you are now doing this thousands of times

#

because tracearr is asking plex to do it

gleaming cobalt
#

to be clear, the first time I let it run overnight 😛

sharp nest
#

I mean your results can and will probably vary

#

It’s an improper setup for a plex server

torpid dock
#

if your total is 564,519 and you currently up to 565,403, and you did 1 title in 30 minutes, that should give you an ETA

#

wait, no ignore that

#

your library has grown since haha

gleaming cobalt
#

ye that's a week old screenshot

torpid dock
#

well i think we know why its going slowly, so all you can do is wait

gleaming cobalt
#

it finished finally

#

Just these are pending now