Jeeaaasus / youtube-dl

Automated yt-dlp Docker image
https://hub.docker.com/r/jeeaaasustest/youtube-dl/
MIT License
258 stars 33 forks source link

unRAID update caused DNS issues - Stopped downloading #79

Closed CasaPas closed 1 year ago

CasaPas commented 1 year ago

Just updated to 6.11.1

Absolutely nothing changed with config etc & permissions are ok. Version updated to most recent.

Everything was working perfectly for months, now I am having an issue where I am getting several errors;

[youtube:tab] XXXXXXXXXXXX: Downloading API parameters API JSON WARNING: [youtube:tab] <urlopen error [Errno -2] Name or service not known>. Retrying (1/3)...

[info] Unable to connect to thumbnail 0 URL 'https://static-3.bitchute.com/live/cover_images/OAx0XCP2TC4a/flXa7oVMnntQ_640x360.jpg' - <urlopen error [Errno -2] Name or service not known>. Skipping... ERROR: [BitChute] XXXXXXXXXX: Requested format is not available. Use --list-formats for a list of available formats

I fixed the Error 13 (Permissions error) as per the advice on here (Cache directory & home directory mapping), but now essentially, nothing downloads. Any ideas?

Also, now the webui does not work (Standard 8013 port, there are no conflicts)? This is not a deal breaker, but I can't understand why it suddenly stopped working.

It almost looks like there is an issue connecting to Youtube.

Jeeaaasus commented 1 year ago

Hey man, sorry about the issues, if I understand you correctly you are having problems after updating unRAID? I don't use unRAID and basically cannot help you at all in that regard, I also did not create the template that's popular for my image.

What I can say is that there is no reason why it shouldn't work on the newer version of unRAID, this it almost certainly an isolated issue with your current setup. My best advice is to remove/reinstall, and it should work. From the logs it sounds like the container has no networking any longer, maybe try changing docker network or what ever. And for why you can't access the webui anymore, that is also super weird and is another indication that the container has no networking capabilities for some reason.

Hopefully you can get it working again. :)

CasaPas commented 1 year ago

OK, that's at least gives me an idea of where to look.

I'll come back if I manage to figure it out.

CasaPas commented 1 year ago

So just put this error down to weird.

I completely nuked the container & app data folder. Then re-installed from virgin container, then made all my previous adjustments (I took a screenshot) and now it's back working. No change to setting etc. GUI is back too.

It did throw a few [ERROR -2] at the start, but seems to be working away again now.

Maybe it was an internet issue? I don't know, baffled.

Jeeaaasus commented 1 year ago

yeah weirdness with unRAID is indeed weird ..

Great to hear it worked out in the end :)

CasaPas commented 1 year ago

So I eventually figured this out...

​After updating to Unraid 6.11 I began to have issues with yt-dlp based containers (YouTube-DL & TubeArchivist).In case any one else started to get the [errno -2] issue after updating, I found after a lot of hair pulling and tweaking that Docker was not resolving the DNS properly to the containers (in Bridge Mode), and they were thus unable to resolve URL's.

Manually editing the /etc/docker/daemon.json file to include the following line of code allows the containers to again resolve URL's. You need to restart Docker after this edit for it to take effect.

"dns": ["8.8.8.8","8.8.4.4","1.1.1.1"]

The contents of my daemon.json looks like this for context;

{
    "runtimes": {"nvidia": {"path": "/usr/bin/nvidia-container-runtime","runtimeArgs": []}},
    "dns": ["8.8.8.8","8.8.4.4","1.1.1.1"]
}

I also managed to automate the code insertion due to the lack of persistence of config files in the OS, by adding the following line to my go file in the /config folder on the USB. This line should be at the start of the go file so it is executed BEFORE docker launches.

# Fix the docker DNS issue
sed -i '0,/{/a\    "dns": ["8.8.8.8","8.8.4.4","1.1.1.1"],' /etc/docker/daemon.json 

My entire go file looks like this for context;

#!/bin/bash

# Fix the docker DNS issue
sed -i '0,/{/a\    "dns": ["8.8.8.8","8.8.4.4","1.1.1.1"],' /etc/docker/daemon.json

# Start the Management Utility
/usr/local/sbin/emhttp &

# Chip drivers
modprobe jc42
modprobe k10temp
modprobe w83627ehf
modprobe fam15h_power

# Enlarge the LOG partition (because Dynamix System Stats needs at least 186Mb, default LOG is 128Mb)
mount -o remount,size=384m /var/log

# Binhex (Container update)
# curl -o '/usr/bin/runc' -L 'https://github.com/binhex/arch-packages/raw/master/static/x86-64/runc' && chmod +x '/usr/bin/runc'

Hope that helps somebody.​

Jeeaaasus commented 1 year ago

hahah 🤣 unRAID is something special .. Interesting read, I appreciate the post mortem. 🙂

CasaPas commented 1 year ago

No problem at all. You sent me on the right track re local network issue...

I believe it's important to share solutions rather than just ask for help, fix your problem, then disappear without any feedback or thanks.

If the same or similar issue pops up, anyone searching [Errno -2] will hopefully land here and get some form of help.

A big thank you for your app, time & efforts.

Jeeaaasus commented 1 year ago

Hey @CasaPas more people should be like you. You are awesome 😎 A big thank you to you too! And thanks for the kind words ❤️

CasaPas commented 1 year ago

Ha. I'm just from a certain age bracket of Irish, the age bracket that cares about others!!!

I like the name "Jeeaasus" I say this quite regularly.. Did you ever visit Ireland to pick that up?

Jeeaaasus commented 1 year ago

Nope hah, but I'd love to visit one day :)