WWBN / AVideo-Storage

Storage Server for AVideo Platform Open-Source
26 stars 37 forks source link

Can't move HLS video #10

Closed akhilleusuggo closed 4 years ago

akhilleusuggo commented 4 years ago

Only HLS videos can't get transferred . The zips are created , but nothing happens . They're stuck on the streamer site . image

On the Storage site :

image

Under Status Done : image

Logs :

Site Response {"error":true,"msg":"The filesize in the storage is smaller then 1 Mb ","aVideoStorageURL":"https:\/\/example.com\/","filename":"\/var\/www\/html\/AVideo-Storage\/videos\/_ID65.07571854.tgz"}
Finished
The filesize in the storage is smaller then 1 Mb
DanielnetoDotCom commented 4 years ago

yes, the files were not transferred to the destination server, I can see they are 0b files.

can you check if the file were correct created on the source server location NOT 0b? If was created please check the log files during the transfer process.

akhilleusuggo commented 4 years ago

The file does exist , and is not empty : image

logs ( a lot of them repeating , but this is what I get at the last )

YPTStorage::getUsageFromFilename: start /var/www/html/YouPHPTube/videos/EmptyTitleon05Oct19005930_YPTuniqid_qsdqsdqsdq.84035194
[28-Jun-2020 12:42:39 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage::getUsageFromFilename: /var/www/html/YouPHPTube/videos/EmptyTitleon05Oct19005930_YPTuniqid_sdqsdqsdqsdq.84035194 is Dir
[28-Jun-2020 12:42:39 Europe/Helsinki] AVideoLog::DEBUG: getDirSize: start /var/www/html/YouPHPTube/videos/EmptyTitleon05Oct19005930_YPTuniqid_dsqdqsdqs.84035194
[28-Jun-2020 12:42:39 Europe/Helsinki] AVideoLog::DEBUG: getDirSize: found 104640022 from - 104640022   /var/www/html/YouPHPTube/videos/EmptyTitleon05Oct19005930_YPTuniqid_dqsdqsdqs.84035194
[28-Jun-2020 12:42:39 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage::getFileSize(113, ) = 104640022 (EmptyTitleon05Oct19005930_YPTuniqid_dqsdqsdqs.84035194) Local
[28-Jun-2020 12:42:39 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage getFileInfo start
[28-Jun-2020 12:42:39 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage getFileInfo from https://example.com/fileinfo.json.php?secret=dsqdqsdqsdq&filename=EmptyTitleon05Oct19005930_YPTuniqid_dqsdqsdq.84035194
[28-Jun-2020 12:42:39 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage getFileInfo end {"error":false,"filename":"EmptyTitleon05Oct19005930_YPTuniqid_dqsdqsdqsdq.84035194","size":0,"msg":""}
[28-Jun-2020 12:42:39 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage::getFileSize(113, 1) = 0 (EmptyTitleon05Oct19005930_YPTuniqid_dsqdqsdqsdq.84035194) Remote
[28-Jun-2020 12:42:39 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage:movingInfo {"time":1593337277,"videos_id":113,"current_sites_id":null,"sites_id":1,"initial_current_size":104640022,"initial_size":0,"initial_current_sizeHuman":"99.79MB","initial_sizeHuman":"0 bytes","howLong":82,"current_size":104640022,"size":0,"progress":0,"ETA":0,"current_sizeHuman":"99.79MB","sizeHuman":"0 bytes","howLongHuman":"1 minute 22 seconds","progressHuman":"0.0%","ETAHuman":"1 second","human":"0.0% ETA: 1 second"}
[28-Jun-2020 12:42:40 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage: log(113): Site Response {"error":true,"msg":"The filesize in the storage is smaller then 1 Mb ","aVideoStorageURL":"https:\/\/example.com\/","filename":"\/var\/www\/html\/AVideo-Storage\/videos\/EmptyTitleon05Oct19005930_YPTuniqid_qdsqsdqsdqsdq.tgz"}
[28-Jun-2020 12:42:40 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage: log(113): Finished
[28-Jun-2020 12:42:40 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage: log(113): The filesize in the storage is smaller then 1 Mb

Storage site :

image

DanielnetoDotCom commented 4 years ago

What do you have on the destination storage at this time? 28-Jun-2020 12:42:XX

[28-Jun-2020 12:42:40 Europe/Helsinki] AVideoLog::DEBUG: YPTStorage: log(113): Site Response {"error":true,"msg":"The filesize in the storage is smaller then 1 Mb ","aVideoStorageURL":"https:\/\/example.com\/","filename":"\/var\/www\/html\/AVideo-Storage\/videos\/EmptyTitleon05Oct19005930_YPTuniqid_qdsqsdqsdqsdq.tgz"}

for some reason, it was not transferred let's check on the storage for some clue

akhilleusuggo commented 4 years ago

What do you mean ? I can't see any log file on storage script .

What you see here is what I have at that time . ( it's 9:42 and not 12:42 due to server time difference )

image

DanielnetoDotCom commented 4 years ago

the log file for the storage is the same as the apache log

On my site, the log is on /var/log/apache2/error.log

akhilleusuggo commented 4 years ago
[Mon Jun 29 15:00:52.664074 2020] [:error] [pid 29269] [client IP:PORT] FILESIZE GET file not found
[Mon Jun 29 15:00:52.699989 2020] [:error] [pid 10734] [client IP:PORT] getUsageFromFilename: start /var/www/html/AVideo-Storage/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993
[Mon Jun 29 15:00:52.846758 2020] [:error] [pid 6850] [client IP:PORT] FILESIZE GET file not found
[Mon Jun 29 15:00:52.892123 2020] [:error] [pid 28485] [client IP:PORT] getUsageFromFilename: start /var/www/html/AVideo-Storage/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993
[Mon Jun 29 15:01:47.141841 2020] [:error] [pid 10733] [client IP:PORT] Storage xsendfile https://www.example.com/plugin/YPTStorage/canWatchVideo.json.php?token=0&filename=_5ef852e370b841.68237251_Low => {"authorization":true,"msg":"SecureVideosDirectory NOT enabled"}
[Mon Jun 29 15:01:47.587458 2020] [:error] [pid 28482] [client IP:PORT] Storage xsendfile https://www.example.com/plugin/YPTStorage/canWatchVideo.json.php?token=0&filename=_5ef852e370b841.68237251_Low => {"authorization":true,"msg":"SecureVideosDirectory NOT enabled"}

[Mon Jun 29 15:02:26.075805 2020] [:error] [pid 28485] [client IP:PORT] post.json.php: response {"error":true,"msg":"Empty Video URL","aVideoStorageURL":"https:\\/\\/storage.example.com\\/","filename":""}
[Mon Jun 29 15:02:26.115025 2020] [:error] [pid 28481] [client IP:PORT] PHP Warning:  file_put_contents(/var/www/html/AVideo-Storage/videos/lock_http://www.example.com/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993.tgz.lock): failed to open stream: No such file or directory in /var/www/html/AVideo-Storage/functions.php on line 304
[Mon Jun 29 15:02:26.115145 2020] [:error] [pid 28481] [client IP:PORT] post.json.php: request extension tgz on URL http://www.example.com/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993.tgz
[Mon Jun 29 15:02:26.115189 2020] [:error] [pid 28481] [client IP:PORT] post.json.php: Download HLS /var/www/html/AVideo-Storage/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993.tgz
[Mon Jun 29 15:02:26.115429 2020] [:error] [pid 28481] [client IP:PORT] PHP Warning:  file_put_contents(/var/www/html/AVideo-Storage/videos/lock_http://www.example.com/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993.tgz.lock): failed to open stream: No such file or directory in /var/www/html/AVideo-Storage/functions.php on line 304
[Mon Jun 29 15:02:26.115515 2020] [:error] [pid 28481] [client IP:PORT] wget Start (wget http://www.example.com/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993.tgz -O /var/www/html/AVideo-Storage/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993.tgz) 
--2020-06-29 15:02:26--  http://www.example.com/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993.tgz
Resolving www.example.com (www.example.com)... 2606:4700:3038::681f:1a3, 2606:4700:3038::681f:a3, 104.34.121.163, ...
Connecting to www.example.com (www.example.com)|2606:4700:3038::681f:1a3|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.example.com/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993.tgz [following]
--2020-06-29 15:02:26--  http://www.example.com/videos/EmptyTitleon06Oct19142131_YPTuniqid_5d99dd2d284433.60729993.tgz
Reusing existing connection to [www.example.com]:80.
HTTP request sent, awaiting response... 301 Moved Permanently

I have found the issue , but I don't know why it's happening . The issue is that , trying to download the file from port 80 , but I have a redirect to port 443 ( SSL ) , tried manually and worked . But I don't know why is requesting HTTP instead of HTTPS .

PS: Fixed by forcing HTTPS on configuration.php ( on streamer site )