Page 1 of 1

Old serviio issues and now new serviio issues

PostPosted: Mon Mar 25, 2013 8:13 pm
by Tangerine
Hi

I was running serviio 0.6 on FreeBSD 9.1, aside from the limitations imposed by my TV it was working a treat, watched a movie last night with no issues. Today I wanted to stream something and was greeted by "playback not available". After trying the obvious restarting serviio and then the server neither of which solved the issues, I decided to update to 1.2 as this was now in the ports tree.

I can stream music with no problems but not a single video will play.

When starting serviio on the server I am getting after a few seconds
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:900)
at net.padlocksoftware.padlock.validator.history.FileHistory.setEarliestRun(FileHistory.java:79)
at net.padlocksoftware.padlock.validator.plugins.ExpiredPlugin.getFirstRun(ExpiredPlugin.java:170)
at net.padlocksoftware.padlock.validator.plugins.ExpiredPlugin.validate(ExpiredPlugin.java:76)
at net.padlocksoftware.padlock.validator.Validator.validate(Validator.java:343)
at net.padlocksoftware.padlock.validator.Validator.validate(Validator.java:298)
at org.serviio.licensing.LicenseValidator.validateLicense(LicenseValidator.java:105)
at org.serviio.licensing.LicenseValidator.validateBundledLicense(LicenseValidator.java:124)
at org.serviio.licensing.LicenseValidator.getCurrentLicense(LicenseValidator.java:74)
at org.serviio.licensing.LicensingManager.updateLicense(LicensingManager.java:128)
at org.serviio.licensing.LicensingManager.<init>(LicensingManager.java:103)
at org.serviio.licensing.LicensingManager.getInstance(LicensingManager.java:113)
at org.serviio.MediaServer.printLicenseInformation(MediaServer.java:262)
at org.serviio.MediaServer.main(MediaServer.java:115)
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:900)
at net.padlocksoftware.padlock.validator.history.FileHistory.setEarliestRun(FileHistory.java:79)
at net.padlocksoftware.padlock.validator.plugins.ExpiredPlugin.getTimeRemaining(ExpiredPlugin.java:133)
at net.padlocksoftware.padlock.validator.Validator.getTimeRemaining(Validator.java:367)
at org.serviio.licensing.LicenseValidator.validateLicense(LicenseValidator.java:106)
at org.serviio.licensing.LicenseValidator.validateBundledLicense(LicenseValidator.java:124)
at org.serviio.licensing.LicenseValidator.getCurrentLicense(LicenseValidator.java:74)
at org.serviio.licensing.LicensingManager.updateLicense(LicensingManager.java:128)
at org.serviio.licensing.LicensingManager.<init>(LicensingManager.java:103)
at org.serviio.licensing.LicensingManager.getInstance(LicensingManager.java:113)
at org.serviio.MediaServer.printLicenseInformation(MediaServer.java:262)
at org.serviio.MediaServer.main(MediaServer.java:115)

and the last few lines of the serviio.log file are

2013-03-25 20:12:08,161 DEBUG [RepositoryDAOImpl] Marking Repository 6 as scanned with current timestamp
2013-03-25 20:12:08,165 DEBUG [MediaItemDAOImpl] Reading dirty MediaItems for Repository (id = 7)
2013-03-25 20:12:08,205 DEBUG [RepositoryDAOImpl] Marking Repository 7 as scanned with current timestamp
2013-03-25 20:12:24,611 WARN [prefs] Could not lock User prefs. Unix error code 2.
2013-03-25 20:12:24,611 WARN [prefs] Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
2013-03-25 20:12:53,449 DEBUG [FeedUpdaterThread] Checking for new and expired online resources
2013-03-25 20:12:53,449 DEBUG [OnlineRepositoryDAOImpl] Reading all OnlineRepositories
2013-03-25 20:12:54,612 WARN [prefs] Could not lock User prefs. Unix error code 2.
2013-03-25 20:12:54,612 WARN [prefs] Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
2013-03-25 20:13:05,756 DEBUG [WebServer] I/O error: Connection reset


Any clues would be much appreciated.

Re: Old serviio issues and now new serviio issues

PostPosted: Mon Mar 25, 2013 9:06 pm
by will
Create a home directory for the user you run serviio under. Although that shouldn't affect playback, which is probably because Serviio now requires a recent version of ffmpeg which is probably newer than what you have, which version do you have?

Re: Old serviio issues and now new serviio issues

PostPosted: Mon Mar 25, 2013 10:56 pm
by Tangerine
Created a folder called dlna in /usr/home and I still get the exceptions when starting serviio.

I am pretty sure that the new port of serviio updated ffmpeg as well, it is showing from pkg_info as ffmpeg1-1.0.5 Realtime audio/video encoder/converter and streaming server

Serviio.log still shows

2013-03-25 22:56:17,898 WARN [prefs] Could not lock User prefs. Unix error code 2.
2013-03-25 22:56:17,898 WARN [prefs] Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
2013-03-25 22:56:46,756 DEBUG [FeedUpdaterThread] Checking for new and expired online resources
2013-03-25 22:56:46,756 DEBUG [OnlineRepositoryDAOImpl] Reading all OnlineRepositories
2013-03-25 22:56:47,899 WARN [prefs] Could not lock User prefs. Unix error code 2.
2013-03-25 22:56:47,899 WARN [prefs] Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

Re: Old serviio issues and now new serviio issues

PostPosted: Tue Mar 26, 2013 12:52 am
by zip
does the process have write access to the home folder?

Re: Old serviio issues and now new serviio issues

PostPosted: Tue Mar 26, 2013 7:46 am
by Tangerine
I believe it does,

drwxr-xr-x 2 dlna dlna 512 Mar 25 22:53 dlna

it has the same perms and settings as other user folders

Re: Old serviio issues and now new serviio issues

PostPosted: Tue Mar 26, 2013 1:33 pm
by zip
I'm not sure how that works in Linux, it you can just create a dlna folder under /home and it's automatically considered user's home dir, or if you have to create the user with a home dir initially.

The cause is the user running serviio has no writeable home dir.

Re: Old serviio issues and now new serviio issues

PostPosted: Tue Mar 26, 2013 6:29 pm
by Tangerine
Well the the user already exists as it is created by Serviio when its compiled. I am not that fussed about that error unless that is related somehow to the fact that Serviio will not play an video files.

The user running Serviio is 7660 dlna 47 20 0 887M 176M uwait 0 8:30 0.00% java

I have made sure that all the video files have been set to dlna:dlna just incase as if I copy something to the server it will go with me being the user and not dlna

Re: Old serviio issues and now new serviio issues

PostPosted: Tue Mar 26, 2013 11:06 pm
by zip
what is your FFmpeg version?

Re: Old serviio issues and now new serviio issues

PostPosted: Tue Mar 26, 2013 11:37 pm
by Tangerine
ffmpeg1-1.0.5

Re: Old serviio issues and now new serviio issues

PostPosted: Tue Mar 26, 2013 11:52 pm
by zip
post output of
  Code:
ffmpeg -version

Re: Old serviio issues and now new serviio issues

PostPosted: Wed Mar 27, 2013 10:25 am
by Tangerine
Ok there seems to be two ffmpegs hanging about the system, now I cannot be 100% sure but I think I saw ffmpeg1 flash past when I was installing the port of serviio.

there was no actual ffmpeg on the system, but I have installed that now and its version is eris# ffmpeg -version
ffmpeg version 0.7.15, Copyright (c) 2000-2013 the FFmpeg developers

There is also eris# ffmpeg1 -version
ffmpeg version 1.0.5

The serviiod script points to ffmpeg1

JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=/var/db/serviio -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=/usr/local/bin/ffmpeg1"

I have tried changing that to ffmpeg and restarting serviio, with either it will browse media fine but the TV always shows playback not available when trying to watch something, which is the same problem that serviio started giving before the upgrade.

Re: Old serviio issues and now new serviio issues

PostPosted: Wed Mar 27, 2013 1:42 pm
by zip
0.7 is too old
the 1.0.5 looks weird. You should build ffmpeg from the sources, as described on the wiki

Re: Old serviio issues and now new serviio issues

PostPosted: Sat Mar 30, 2013 10:46 pm
by Tangerine
Tried following the wiki but it is more geared towards Linux and I did try but could not get the sources to build for that version of FFmpeg at all. But given the problem of "playback unavailable" had just started literally overnight, I did wonder if it was something else on the system causing the issue. So I have done a completely fresh install of FreeBSD and Serviio and the problem still exists the TV will browse media and will play MP3 but not any form of video file, when the system was working you would occasionally get a video file which would not play but the system would at least make an attempt, you would get a spinning wait icon in the corner of the screen, this error occurs the instant you press play.

Re: Old serviio issues and now new serviio issues

PostPosted: Sat Mar 30, 2013 11:20 pm
by Tangerine
I just tried Serviio for windows on Server 2008R2 and got the same results on the TV, which made me start to suspect it was not FFmpeg or BSD ... etc. I had a look for a firmware update for the Sony TV but I am on the latest version .... as a last result I did a factory reset of the system and it is now playing media again, so I am not sure what had happened to it or why it happened but it is now fixed. I guess should have considered that as an option earlier. Cheers for all the suggestion and help offered.

Re: Old serviio issues and now new serviio issues

PostPosted: Thu Jun 27, 2013 1:20 am
by jshg46
I am having this same exact problem on Freebsd 9.1 as we speak. The updated ports had a compile error in openjdk for me. I went to ports/java/openjdk6 and ran make install clean and it installed. I cannot find a way around these errors. When you compile serviio in ports why doesnt it have a prefs folder?