Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error importing video after disk enlargement #2591

Closed
Alterak opened this issue Apr 1, 2020 · 7 comments
Closed

Error importing video after disk enlargement #2591

Alterak opened this issue Apr 1, 2020 · 7 comments

Comments

@Alterak
Copy link
Contributor

Alterak commented Apr 1, 2020

I have a disk mounted in the folder /var/www/peertube/storage/ it was Originally 100GB in size. I decided to increase the disk size to 300GB. After that, the ability to import videos from youtube disappeared and the torrent download stopped working. Errors are returned. But downloading local videos works fine. Rights to the folder /var/www/peertube/storage/ peertube:peertube 775. I showed you more details in the video. Why did this happen and how can I fix it?

https://peervideo.ru/videos/watch/4b70aeb9-1163-4dfb-b7de-9bbf6431e95c

Here is the result of the log file at the time of import

{"message":"192.168.1.5 - - [01/Apr/2020:08:33:20 +0000] "GET /tracker/socket HTTP/1.1" 200 3624 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0"\n","level":"info","label":"peervideo.ru:443","timestamp":"2020-04-01T08:33:20.342Z"}
{"level":"info","message":"Cannot fetch information from import for URL https://youtu.be/zlDtPTwNm8Q.","label":"peervideo.ru:443","err":{"stack":"Error: Command failed with exit code 1: /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl -i --dump-json -f best -j --flat-playlist https://youtu.be/zlDtPTwNm8Q\n at makeError (/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/node_modules/execa/lib/error.js:56:11)\n at handlePromise (/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/node_modules/execa/index.js:114:26)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:97:5)","message":"Command failed with exit code 1: /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl -i --dump-json -f best -j --flat-playlist https://youtu.be/zlDtPTwNm8Q","command":"/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl -i --dump-json -f best -j --flat-playlist https://youtu.be/zlDtPTwNm8Q","exitCode":1,"stdout":"","stderr":" File "/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl", line 2\nSyntaxError: Non-ASCII character '\x97' in file /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl on line 3, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details","failed":true,"timedOut":false,"isCanceled":false,"killed":false},"timestamp":"2020-04-01T08:33:34.471Z"}

@Chocobozzz
Copy link
Owner

Please login on your server and run the youtube-dl command to see if it's a youtube-dl bug or a peertube bug

@Chocobozzz Chocobozzz added the Status: Waiting for answer Waiting issue author answer label Apr 2, 2020
@Alterak
Copy link
Contributor Author

Alterak commented Apr 2, 2020

Please login on your server and run the youtube-dl command to see if it's a youtube-dl bug or a peertube bug

peertube@peervideo:~$ youtube-dl https://www.youtube.com/watch?v=Hhl4XP8MxIA
-bash: youtube-dl: command not found
peertube@peervideo:~$ sudo youtube-dl https://www.youtube.com/watch?v=Hhl4XP8MxIA
[sudo] пароль для peertube:
sudo: youtube-dl: command not found
peertube@peervideo:~$

I will try to delete the directory /var/www/peertube/versions/peertube-v2.1.1 and reinstall

@Findus23
Copy link
Contributor

Findus23 commented Apr 2, 2020

@Alterak you have to use the complete path to your youtube-dl as in the error message (/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl)

@Alterak
Copy link
Contributor Author

Alterak commented Apr 2, 2020

At the moment, everything is restored. I tried to restore the backup from the 31st and from the 2nd of the day. On the 31st, the import worked fine, but on the 2nd of the 2nd, after increasing the disk, everything stopped working. I recorded the video in detail.
Earlier and now if you run youtube-dl, then an error appears

peertube@peervideo:~$ sudo youtube-dl https://www.youtube.com/watch?v=wcEe5P9QVoc
[sudo] пароль для peertube:
sudo: youtube-dl: command not found

He also recorded a video of all the details.
https://peervideo.ru/videos/watch/26764ee2-8e8f-4c8a-8ee3-a8749c922744

Later I saw your message about the full path and ran it on the current instance with an error. Result:

peertube@peervideo:~$ /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl https://www.youtube.com/watch?v=wcEe5P9QVoc
  File "/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl", line 2
SyntaxError: Non-ASCII character '\x97' in file /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl on line 3, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
peertube@peervideo:~$

I also checked the paython version on the system.

peertube@peervideo:~$ python --version
Python 2.7.16
peertube@peervideo:~$ python3 --version
Python 3.7.3
peertube@peervideo:~$

It is very strange that this worked before expanding the disk. I don’t see any connection yet. In any case, the problem is relevant. I ask for your help!

@Chocobozzz
Copy link
Owner

Drop and reinstall node_modules and retry the youtube-dl command please. Maybe it's a corrupted youtube-dl issue. If it does not fix your issue, what is the output of sudo -u peertube /usr/bin/env python --version?

@Alterak
Copy link
Contributor Author

Alterak commented Apr 3, 2020

Drop and reinstall node_modules and retry the youtube-dl command please. Maybe it's a corrupted youtube-dl issue. If it does not fix your issue, what is the output of sudo -u peertube /usr/bin/env python --version?

peertube@peervideo:~$ sudo -u peertube /usr/bin/env python --version
Python 2.7.16
peertube@peervideo:~$

The problem is resolved.
I downloaded the youtube-dl file here https://github.com/ytdl-org/youtube-dl/releases/download/2020.03.24/youtube-dl
and replaced it in the /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin folder
And everything began to work fine. Why the failure occurred precisely after expanding the storage disk I do not know. Many thanks to all for your advice and your help.

Now there is a problem with torrent files.

This torrent file is not supported or too large. Please, make sure it is of the following type: .torrent

How can this problem be solved?

@Chocobozzz
Copy link
Owner

Please create another issue and fill the template with server logs, client request and torrent file.

@Chocobozzz Chocobozzz removed the Status: Waiting for answer Waiting issue author answer label Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants