Videoclub/Storage/Http issue

507 views
Skip to first unread message

Greg Kennedy

unread,
Jan 1, 2017, 10:54:23 PM1/1/17
to Stalker Middleware
I just recently installed the lastest version of stalker to use with the mag250 stb. I have live channels working on. Now i am trying to get vod/Video club working via http rather than custom as i wish to use ads.

When i request to watch a video in video club, i see the link get made under /media/raid0/mac/00:1A:79:3E:7F:F2/9.mp4

when i try to play it, it just skips ahead to the next video episode for some reason. I look in the logs and i see a 410 error for the request:

GET /media/bb3/00:1A:79:3E:7F:F2/9.mp4?st=fj_DPzCNgPLKjqdM1plK8A&e=1483306620 HTTP/1.1" 410 167 "-" "Lavf53.32.100"


based on the error code im guessing its not generating the secure_link token correctly. I have searched the list and no one else really seems to complain about it. 

Here is my nginx default conf:

server {
    listen       80;
    server_name  example.com;

    location / {
        proxy_pass http://127.0.0.1:88/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }

    location ~* \.(mpg|mpeg|avi|ts|mkv|mp4|mov|m2ts|flv|m4v|srt|sub|ass)$ {
        secure_link $arg_st,$arg_e;
        secure_link_md5 "supersecret$uri$remote_addr$arg_e"; # you can change secret "supersecret" in the portal config - nginx_secure_link_secret

        if ($secure_link = "") {
            return 405;
        }

        if ($secure_link = "0") {
            return 410;
        }

        send_timeout 6h;
        root /var/www/;
    }
}



My config.ini under storage on the storage server:

<?php

define('VIDEO_STORAGE_DIR', '/media/raid0/storage/');
define('KARAOKE_STORAGE_DIR', '/media/raid0/karaoke/');
define('RECORDS_DIR', '/media/raid0/records/');
define('NFS_HOME_PATH', '/media/raid0/mac/');
// Use login and password from the configuration file. (api_auth_login and api_auth_password in server/custom.ini)
//define('API_URL', 'http://login:pass...@xx.xx.xx.xx5/stalker_portal/api/');
define('PORTAL_URL', 'http://xx.xx.xx.xx/stalker_portal/');
define('STORAGE_NAME', 'bb3');
define('ASTRA_RECORDER', false);
define('DUMPSTREAM_BUFFERING', 1); // set -1 for system default


and my nginx conf part from server/config.ini
nginx_secure_link_secret = supersecret
nginx_secure_link_ttl = 5
; the possible parameters for generating md5-hash "$secret", "$uri", "$secure_link_expires", "$remote_addr"
; example "$secure_link_expires$uri$remote_addr $secret"
nginx_secure_link_order = "$secret$uri$remote_addr$secure_link_expires"


I have verified that its not a permission issue as i though it was at first, by placing a text file in the mac folder, and i can access it via browser just fine.

I have been trying to sort this out for the better part of 2 days now.

Anyone have any ideas as to what it could be that i am doing wrong??



Stefan Makedonski

unread,
Jan 2, 2017, 10:08:20 AM1/2/17
to Stalker Middleware
I guess you did wrote the IP address in the storage config?

Greg Kennedy

unread,
Jan 2, 2017, 12:43:00 PM1/2/17
to Stalker Middleware
Yes Storage config has the correct ip address. Like i said above the link is being made between the media file and the mac address folder of the device. also if i change the port and point to the apache port 88 with same url, i can view the file in browser as there is no link security that way. So i know the file permissions and everything else is good. I think the secure link code in the nginx conf is bad, or its bad in the server/config.ini 

Greg Kennedy

unread,
Jan 4, 2017, 8:57:29 PM1/4/17
to Stalker Middleware
Anyone else have some ideas about this?

Richard Lines

unread,
Jan 4, 2017, 9:47:14 PM1/4/17
to Stalker Middleware on behalf of Greg Kennedy
In this section of storage config have you put the stalker apache port number too?

server/custom.ini)
//define('API_URL', 'http://login:pass...@xx.xx.xx.xx5/stalker_portal/api/');
define('PORTAL_URL', 'http://xx.xx.xx.xx/stalker_portal/');


I.e. Http://xx.xx..xx5:88/stalker_portal wherever the address is stated?



--

Вы получили это сообщение, поскольку подписаны на группу "Stalker Middleware".

Чтобы отменить подписку на эту группу и больше не получать от нее сообщения, отправьте письмо на электронный адрес stalker-middlew...@googlegroups.com.

Чтобы отправлять сообщения в эту группу, отправьте письмо на электронный адрес stalker-m...@googlegroups.com.

Чтобы посмотреть обсуждение на веб-странице, перейдите по ссылке https://groups.google.com/d/msgid/stalker-middleware/169efd1b-5d76-42f4-8d83-d9e5269d7e7b%40googlegroups.com.

Чтобы настроить другие параметры, перейдите по ссылке https://groups.google.com/d/optout.

Greg Kennedy

unread,
Jan 5, 2017, 2:13:24 AM1/5/17
to Stalker Middleware
I made a custom.ini on the storage server and copied the nginx_secure_link line from the main server and restarted it. Seems to have solved the issue.


On Wednesday, 4 January 2017 18:47:14 UTC-8, Richard Lines wrote:
In this section of storage config have you put the stalker apache port number too?

server/custom.ini)
//define('API_URL', 'http://login:pass...@xx.xx.xx.xx5/stalker_portal/api/');
define('PORTAL_URL', 'http://xx.xx.xx.xx/stalker_portal/');


I.e. Http://xx.xx..xx5:88/stalker_portal wherever the address is stated?



On Thu, 5 Jan 2017 at 01:57, Greg Kennedy, Stalker Middleware <stalker-middleware+APn2wQdbMwBmDBz_aDWOeYBiB1En4_TjFy7PE3uEoa4xT@googlegroups.com> wrote:
Anyone else have some ideas about this?


On Monday, 2 January 2017 09:43:00 UTC-8, Greg Kennedy wrote:
Yes Storage config has the correct ip address. Like i said above the link is being made between the media file and the mac address folder of the device. also if i change the port and point to the apache port 88 with same url, i can view the file in browser as there is no link security that way. So i know the file permissions and everything else is good. I think the secure link code in the nginx conf is bad, or its bad in the server/config.ini 






--

Вы получили это сообщение, поскольку подписаны на группу "Stalker Middleware".

Чтобы отменить подписку на эту группу и больше не получать от нее сообщения, отправьте письмо на электронный адрес stalker-middleware+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages