mirror of
https://github.com/asapach/peerflix-server.git
synced 2026-04-25 06:35:48 +03:00
[GH-ISSUE #9] Can't stream torrents who are in subfolders #221
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zobrak on GitHub (Oct 8, 2014).
Original GitHub issue: https://github.com/asapach/peerflix-server/issues/9
Hi !
When I try to stream a torrent wich is mad by a floder and the video is in a subfolder I gt a 404 error:
Not Found
The requested URL /torrents/24ee2e7b82eaba379377557aad92830ccd328173/files/torrent.name/torrent.name.avi was not found on this server.
At the same time the status bar is in progress but there's not any data abouts speed or peers, all is at 0.
The datas are under
/tmp/torrent-stream/24ee2e7b82eaba379377557aad92830ccd328173/torrent.name/
When I fetch a torrent where the file is not in a subfolder, the streaming works.
What can I do ?
@asapach commented on GitHub (Oct 8, 2014):
@zobrak, it should work both ways. The only thing to keep in mind is that if you build the URL programmatically, you must urlencode the path, e.g.
/becomes%2F.Can you share the torrent/magnet link that is broken for you?
@zobrak commented on GitHub (Oct 9, 2014):
This one doesn't work for example
http://ppfr.it/2hsv@asapach commented on GitHub (Oct 9, 2014):
Works for me, e.g.:
http://localhost:9000/torrents/dbcc055d503485928e52f349acf179812b777c4f/files/%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR%2F%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR.avi@zobrak commented on GitHub (Oct 10, 2014):
I don't see what I can do...
@zobrak commented on GitHub (Oct 10, 2014):
Here is my apache log :
88.183.241.107 - - [10/Oct/2014:10:01:16 +0200] "GET /socket.io/1/xhr-polling/8h7Ei6JAy4AJw_W5CFLf?t=1412928078371 HTTP/1.1" 200 489 "https://stream.zobrak.net/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36"
XXX.XXX.XXX.XXX - - [10/Oct/2014:10:01:17 +0200] "GET /socket.io/1/xhr-polling/8h7Ei6JAy4AJw_W5CFLf?t=1412928079308 HTTP/1.1" 200 491 "https://stream.domain.tld/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36"
XXX.XXX.XXX.XXX - - [10/Oct/2014:10:01:18 +0200] "GET /torrents/dbcc055d503485928e52f349acf179812b777c4f/files/%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR%2F%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR.avi HTTP/1.1" 404 875 "https://stream.domain.tld/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36"
Here is console log :
GET / 200 15ms - 637b
GET /styles/df04649e.vendor.css 200 13ms - 97.08kb
GET /scripts/8d96e24b.vendor.js 200 56ms - 263.37kbGET /styles/8b6a747f.main.css 200 20ms - 1.71kbGET /scripts/fb0914cf.scripts.js 200 7ms - 1.67kbGET /views/main.html 200 7ms - 2.75kbinfo - handshake authorized 8h7Ei6JAy4AJw_W5CFLfGET /torrents 304 341mswarn - websocket connection invalidinfo - transport end (undefined)GET /bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff 304 81msGET /torrents 304 567msinfo - transport end (close timeout)info - transport end (close timeout)And here is my vhost :
<VirtualHost *:80>
ServerAdmin webmaster@domain.tld
ServerName stream.domain.tld
Redirect / https://stream.domain.tld
<VirtualHost *:443>
ProxyPass http://localhost:9000/ ProxyPassReverse http://localhost:9000/SSLEngine on
SSLProtocol all -SSLv2
SSLProxyEngine On
SSLProxyCheckPeerCN on
SSLProxyCheckPeerExpire on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /etc/ssl/certs/somecertfile.pem
SSLCertificateKeyFile /etc/ssl/private/somekeyfile.key
LogLevel warn
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
ServerAdmin webmaster@domain.tld
ServerName stream.domain.tld
... I don't know where else can I check. Maybe the torrents directory permissions ?
@asapach commented on GitHub (Oct 10, 2014):
Can you show me the console log matching this one from apache log:
XXX.XXX.XXX.XXX - - [10/Oct/2014:10:01:18 +0200] "GET /torrents/dbcc055d503485928e52f349acf179812b777c4f/files/%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR%2F%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR.avi HTTP/1.1" 404My guess is that apache doesn't proxy this request properly. Try doing this without apache and try other reverse proxies, e.g. nginx or haproxy.
@zobrak commented on GitHub (Oct 10, 2014):
Nothing happens in console while looking for the movie. By the way, files that are not in sub folders don't work no more today
@asapach commented on GitHub (Oct 10, 2014):
If nothing happens in the console, it means that the request doesn't get to peerflix-server.
@zobrak commented on GitHub (Oct 10, 2014):
Maybe i'm saying bullshit, but if it was a handling issue with apache, why can I get the home page ? and why requests to socket.io goes well ?
@asapach commented on GitHub (Oct 10, 2014):
No idea, maybe apache doesn't like the urlencoded path?
As for socket.io, you should set up apache to proxy websockets for it to work properly: http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html
@asapach commented on GitHub (Oct 12, 2014):
Here's an nginx config that seems to work for me:
@zobrak commented on GitHub (Oct 13, 2014):
Actually I've got a "Cannot GET / " message when trying to browse the peerflix server.
in the console there is :
GET / 404 163ms
GET /favicon.ico 404 23ms
GET /favicon.ico 404 20ms
I have tried with both apache and nginx and I have this message...
@asapach commented on GitHub (Oct 13, 2014):
Does it work without a reverse proxy? Can you try and re-install peerflix-server?
@zobrak commented on GitHub (Oct 13, 2014):
I have uninstalled peerflix-server with "npm uninstall -g peerflix-server" and then reinstalled it.
Now it works fine but only with nginx. But no more with apache and the same 404 message.
I tried to link apache with nginx and 404 still here with apache. It should be as you said earlier a trouble with the way apache use url encoding or a misconfiguration on my server.
Thanks for help