FAQ  •  Register  •  Login

Going Crazy - AuthenticationException occured.

<<

WebClaw

Serviio newbie

Posts: 12

Joined: Thu Feb 19, 2015 6:43 am

Post Tue Jul 12, 2016 5:20 am

Going Crazy - AuthenticationException occured.

I am going crazy - been trying to read and solve this problem for a long time.

My internal network is 172.24.13.X - not sure if that matters as it's a private zone, but just the same (some applications don't respect the 172./12 allocation) - not sure if that even matters here.

When running ServiiGo I can play back a stream (as long as I don't seek) without any issues. (Andriod OnePlus X).

For example:
If when running ServiiGo (internal player) I start to play a movie, jump to time index 30 (minutes) the movie will play for a minute or so then "Cannot play this video" error message appears.

To confirm - the "Cannot play this video" message ONLY appears if I seek within something I am streaming.

So - by that logic you would assume my network is somehow stripping the token data right and /or the token is expiring Well how?
I run a Monowall router - LAN is */* to LAN. Besides how would a router screw up a GET / POST or session data? So, by this logic it can't be my router. Further I don't have any other issues on my LAN end (I we've got VPN tunnels, port forwards, etc. - but not on the 172 block)...

That leaves ServiiGo ? anyone else have these issues? Perhaps ServiiGo is not appending the GET data (I assume) to the requesting HTTP URL?

I am a PRO user.
I am running Serviio on Mint 17.1
I have compiled FFMpeg (many versions - even old backdated versions).
I have complied (from source) the FFmpeg version seen on the Serviio downloads page.
The problem doesn't seem to exist when using MediaBrowser (web) seeking.
No apache or other proxy is involved - 23424 simply points to LAN IP of my mediaserver.
I have used the Internal (ServiiGo Player) and BS Player - same result.
Tried flashing my phone (CM) same result. Using my Nexus Andriod Pad = same result.

Things DO work if I install BubbleUPNP on my phone both inside and outside my network (this has been my workaround thus far).

I have completely formatted my media server with a fresh install. I can reproduce on Serviio 1.5.X and 1.6.x. Both Ubuntu and Mint (yeah I know not a real big difference).

That said, when I first used Serviio - it worked flawlessly (but I can't remember what version I was on - I think 1.4.X) w/ServiiGo (but Windows)

What the heck is causing this issue? Can anyone help my sanity.

I am aware the new version of Serviio can remove the token auth checks (please correct me if I am wrong), but this is not a good idea for security reasons. Besides that's negating the problem not fixing it.


In my /tmp folder I see:
  Code:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXTINF:10.073044,
segment00000.ts
#EXTINF:10.051711,
segment00001.ts
#EXTINF:10.010000,
segment00002.ts
#EXTINF:10.176833,
segment00003.ts
#EXTINF:9.926578,
segment00004.ts
#EXTINF:10.010000,
segment00005.ts
#EXTINF:9.759756,
segment00006.ts
#EXTINF:10.010000,
segment00007.ts
#EXTINF:10.176833,
segment00008.ts
#EXTINF:9.926578,
segment00009.ts
#EXTINF:10.176833,
segment00010.ts
#EXTINF:10.176833,
segment00011.ts
#EXTINF:10.010000,
segment00012.ts
#EXTINF:9.968300,
segment00013.ts
#EXTINF:9.759756,
segment00014.ts
..
segment00288.ts
#EXT-X-ENDLIST


Here is the Serviio log

  Code:
2016-07-11 23:03:37,949 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "Bluray-1080p.mkv": HLS
2016-07-11 23:03:37,949 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "Bluray-1080p.mkv": HLS
2016-07-11 23:03:37,949 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 827 (local)
2016-07-11 23:03:37,949 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 827)
2016-07-11 23:03:37,949 DEBUG [VideoDAOImpl] Reading a Video (id = 827)
2016-07-11 23:03:37,949 DEBUG [VideoDeliveryEngine] Delivering item '827' for client 'Identifier=0fb0f56a3b564a04982fffc88796085f, Profile=ServiiGo (HLS)'
2016-07-11 23:03:37,949 DEBUG [VideoDeliveryEngine] Delivering file 'Bluray-1080p.mkv' using transcoding
2016-07-11 23:03:37,950 DEBUG [AbstractAVTranscodingDeliveryEngine] A suitable transcoding job already exists, re-use it for client 'Identifier=0fb0f56a3b564a04982fffc88796085f, Profile=ServiiGo ($
2016-07-11 23:03:37,950 DEBUG [FileBasedTranscodingDeliveryStrategy] Sending transcoding stream
2016-07-11 23:03:37,953 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "Bluray-1080p.mkv": HLS
2016-07-11 23:03:37,953 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "Bluray-1080p.mkv": HLS
2016-07-11 23:03:37,953 DEBUG [GETMethodProcessor] Entity will be consumed till the end
2016-07-11 23:03:37,953 DEBUG [GETMethodProcessor] Stream entity has length: -1
2016-07-11 23:03:37,992 WARN  [ServiioStatusService] AuthenticationException occured. Returning error code 401 to the REST layer. Message: No authentication token has been provided for a restricte$
2016-07-11 23:03:37,992 DEBUG [ServiioStatusService] Detailed exception:
org.serviio.restlet.AuthenticationException: No authentication token has been provided for a restricted resource.
        at org.serviio.upnp.service.contentdirectory.rest.resources.server.LoginServerResource.validateToken(LoginServerResource.java:66)
        at org.serviio.upnp.service.contentdirectory.rest.resources.server.AbstractRestrictedCDSServerResource.doConditionalHandle(AbstractRestrictedCDSServerResource.java:57)
        at org.restlet.resource.ServerResource.handle(ServerResource.java:1014)
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Jul 12, 2016 10:21 pm

Re: Going Crazy - AuthenticationException occured.

Maybe Will could confirm this (you could try in the ServiiGo thread).

Normally, the m3u8 file created in /tmp is further processed by Serviio on the GET request to add any other query parameters, one of them being the token. This should work (at least works for me when using MediaBrowser on iPad).

It would be good to check the detailed log a bit further up (well, try to play the file again) and there should be a GET request for the m3u8 file (probably with /MANIFEST/ in the URL). Find it and try to open the URL in a browser - post here what you get.

You can do this for
- when you start playing the file, and then
- when you seek in the file (the URL will change, just follow what is in new the log)
<<

WebClaw

Serviio newbie

Posts: 12

Joined: Thu Feb 19, 2015 6:43 am

Post Wed Jul 13, 2016 12:42 am

Re: Going Crazy - AuthenticationException occured.

Initial play (no seek) in my /tmp:
  Code:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXTINF:10.239878,
segment00000.ts
#EXTINF:10.051711,
segment00001.ts


Play (after seek) in my /tmp:

  Code:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXTINF:10.031333,
segment00000.ts
#EXTINF:10.010000,
segment00001.ts
#EXTINF:10.010000,
segment00002.ts
#EXTINF:10.468800,
segment00003.ts
#EXTINF:10.010011,


As you can see no difference (or sign of a URL / token).

I am using FFMpeg from Serviio download page:
  Code:
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul 12 2016 09:21:06 with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-librtmp --enable-libxvid --enable-libass
  libavutil      54. 14.100 / 54. 14.100
  libavcodec     56. 12.101 / 56. 12.101
  libavformat    56. 14.100 / 56. 14.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
<<

WebClaw

Serviio newbie

Posts: 12

Joined: Thu Feb 19, 2015 6:43 am

Post Wed Jul 13, 2016 1:48 am

Re: Going Crazy - AuthenticationException occured.

If grabbing via GET:
http://1.2.3.4:23424/cds/resource/644/M ... EDIUM.m3u8?
profile=serviigo_hls&authToken=9454bda32cba4ce7a1cadf7388719df8&clientId=0fb0f56a3b564a04982fffc88796085f&start=1676

It seems to have token data.
  Code:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXTINF:10.365000,
http://10.24.13.31:23424/cds/resource/644/SEGMENT/transcoding-temp-644-serviigo_hls-MEDIUM-1676.0-1080.0.stf/segment00000.ts?profile=serviigo_hls&authToken=95aae4bb29104093893b57dd5e50b8ca
#EXTINF:9.718044,


I think the issue is now related to the internal player? As I can see proper token data.
If I use the internal player (I can seek) if I use BS Player or MX Player seeking is not a option.

Return to Serviio Support & Help

Who is online

Users browsing this forum: Baidu [Spider] and 17 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.