FAQ  •  Register  •  Login

Please help.. errors and errors

<<

mercury00

Serviio newbie

Posts: 4

Joined: Sun Jun 10, 2012 9:37 am

Post Sun Jun 10, 2012 10:47 am

Please help.. errors and errors

First off, and most important, thanks for creating serviio, it looks nice and all the effort is much appreciated. Now for my troubles...

I've installed serviio 0.6.2 in ubuntu 11.10. I did this by:

I created a user named serviio. I downloaded and untarred the serviio 0.6.2 file. I chowned the files to serviio:serviio. I placed them in the serviio home folder (/usr/local/serviio). The serviio user is a system account, group and user id 999.

I downloaded and installed the latest java, java 1.7.0.40 or whatnot, and tested it (browser works, command line works, all report the version).

I wanted it to start on startup so (as this is ubuntu and we have upstart), I created the /etc/init/serviio.conf file like below:
  Code:
# serviio - DLNA Server
#

description     "Serviio DLNA server"

env ROOT_DIR=/usr/local/serviio
env USER=serviio
env SERVIIO_HOME=/usr/local/serviio
env JAVA_HOME=/usr/lib/jvm/java-7-oracle
env JVM_OPTIONS="-Xmx384M -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME"
env LOGPATH=/usr/local/serviio/log
env LOGFILE="$LOGPATH/startup.log"
env SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/serviio.jar:$SERVIIO_HOME/lib/derby.jar:$SERVIIO_HOME/lib/jcs.jar:$SERVIIO_HOME/lib/concurrent.jar:$SERVIIO_HOME/lib/freemarker.jar:$SERVIIO_HOME/lib/httpcore.jar:$SERVIIO_HOME/lib/jaudiotagger.jar:$SERVIIO_HOME/lib/jul-to-slf4j.jar:$SERVIIO_HOME/lib/jcl-over-slf4j.jar:$SERVIIO_HOME/lib/log4j.jar:$SERVIIO_HOME/lib/sanselan.jar:$SERVIIO_HOME/lib/slf4j-api.jar:$SERVIIO_HOME/lib/slf4j-log4j12.jar:$SERVIIO_HOME/lib/org.restlet.jar:$SERVIIO_HOME/lib/org.restlet.ext.xstream.jar:$SERVIIO_HOME/lib/xstream.jar:$SERVIIO_HOME/lib/rome.jar:$SERVIIO_HOME/lib/rome-modules.jar:$SERVIIO_HOME/lib/jdom.jar:$SERVIIO_HOME/lib/groovy-all.jar:$SERVIIO_HOME/lib/winp.jar:$SERVIIO_HOME/lib/org.restlet.ext.gson.jar:$SERVIIO_HOME/lib/gson.jar:$SERVIIO_HOME/config"

kill timeout 10

start on filesystem

stop on runlevel [016]

pre-start script
    mkdir -p $LOGPATH
    chown $USER:users $LOGPATH
end script

pre-stop script
     exec su -c  "$JAVA_HOME/bin/java $JVM_OPTIONS -classpath $SERVIIO_CLASS_PATH  org.serviio.MediaServer -stop > $LOGFILE 2>&1" $USER
end script

script
    exec su -c  "$JAVA_HOME/bin/java $JVM_OPTIONS -classpath $SERVIIO_CLASS_PATH  org.serviio.MediaServer > $LOGFILE 2>&1" $USER
end script



However, oddly, the documentation does not ask you to "update-rc.d serviio defaults", which seems strange, but as it was lacking I decided the documentation must know what it's talking about, I'll do as it says. Since the service doesn't just 'start', I issued a 'sudo service serviio start' and got a process id back.

I downloaded the 1.01 web UI (because I at first didn't understand that serviio-console.sh wasn't actually a console program, it was a UI, just confusingly named console, and that serviio has no /usr/share/applications/serviio.desktop file, which probably I should make and package in a .deb for the majority of all linux users who use ubuntu).

I placed the php files in /usr/local/serviio/serviio-web, then symlinked (ln -s) /var/www/serviio to that folder. I installed apache2 and php and curl, and configured the apache2 default site to just go to /var/www/serviio instead of just /var/www. The web UI seemed to 'appear' at this point.

However it gave me errors on doing anything. So, I looked in the serviio files to see what's up. And reading the wikis and install and readme files for the 7th time, trying to make sense of the spartan instrucitons, I realized that the brief reference to serviio-console implied that this was the 'client' and not some kind of interactive cli to the server, so I ran the program (as the serviio user... sudo su serviio).

So, my problem is that nothing I do in either the web UI or the serviio-console does anything. If I click on save, if I edit a field, it has no effect. I also can't close the serviio-console, as it just hangs.

I enabled the debug logging mode, but although I have two other 'log' files that seem to populate with nothing useful, the 'startup' log file remains empty (although it was created). I have been pounding my keyboard mouse and entertainment center with my fists trying to figure out whats breaking with this thing as it seems to clearly work so well for everyone else. Any ideas on what my next troubleshooting step should be?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Jun 10, 2012 11:17 am

Re: Please help.. errors and errors

mercury00 wrote:So, my problem is that nothing I do in either the web UI or the serviio-console does anything. If I click on save, if I edit a field, it has no effect. I also can't close the serviio-console, as it just hangs.

Might be more for some Linux guru, rather than me, but what do you mean no effect? Can you add folders to share, click Save? Do you see the server on your device?
<<

mercury00

Serviio newbie

Posts: 4

Joined: Sun Jun 10, 2012 9:37 am

Post Sun Jun 10, 2012 11:31 am

Re: Please help.. errors and errors

So, to clarify a few things:

When I run serviio-console, it opens the UI, and I can click on tabs. When I enter information in a field or change something, the greyed-out 'save' and 'restore' boxes become un-greyed-out (as it should I believe), but clicking them doesn't change their status, the buttons remain, as if I hadn't touched them or clicked on them, and the window will not close, and forcing the window to close or otherwise reopening the program shows me that none of my changes were saved.

No log files anywhere in the system report any problems (or that anything at all has happened). This is with the 'debug' option in the config file.

ATM, there's no output of the serviio "server", so I cannot see that it's ever really doing anything, other than the fact that the UI says the server is 'running'.

I think that maybe having java 1.7 is 'too new' for serviio, even though the install steps say to have "1.6.x... or greater"? So I'm trying with a downgraded java to see.

Also, it appears my serviio.conf in /etc/init is no longer similar to the serviio.sh way of doing it. Going to try changing serviio.conf to reflect the same command line that serviio.sh would have called.

Also, again, I'm grateful for all the work for this program and the help I might possibly receive, my real frustration is not for the program but the generic difficulty of linux and my inexperience. And if I can get things working I'd like to provide the steps I took for the community if not a .deb installer.
<<

mercury00

Serviio newbie

Posts: 4

Joined: Sun Jun 10, 2012 9:37 am

Post Sun Jun 10, 2012 11:37 am

Re: Please help.. errors and errors

Downgraded java + running ./serviio.sh (from sudo) seems to be working so far, but not running from upstart, so I'll poke into upstart and see why it's not working there.

Web UI and serviio-console are happy with java-6-sun afaikt. They seem very grumpy with java-7-oracle.

I'll see what I can do with upstart and update this post.
<<

mercury00

Serviio newbie

Posts: 4

Joined: Sun Jun 10, 2012 9:37 am

Post Sun Jun 10, 2012 10:12 pm

Re: Please help.. errors and errors

So, I've updated the /etc/init/serviio.conf file to look like this after reading the serviio.sh file:

  Code:
# serviio - DLNA Server
#

description     "Serviio DLNA server"

env ROOT_DIR=/usr/local/serviio
env USER=serviio
env SERVIIO_HOME=/usr/local/serviio
env JAVA_HOME=/usr/lib/jvm/java-6-sun
env JAVA=$JAVA_HOME/bin/java
env JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME"
env LOGPATH=/usr/local/serviio/log
env LOGFILE="$LOGPATH/startup.log"
env SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config"

kill timeout 10

start on filesystem

stop on runlevel [016]

pre-start script
    mkdir -p $LOGPATH
    chown $USER:$USER $LOGPATH
end script

pre-stop script
    exec su -c  "$JAVA -Xmx384M -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath $SERVIIO_CLASS_PATH org.serviio.MediaServer -stop > $LOGFILE 2>&1" $USER
end script

script
    exec su -c  "$JAVA -Xmx384M -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath $SERVIIO_CLASS_PATH org.serviio.MediaServer > $LOGFILE 2>&1" $USER
end script



But I get this startup.log

  Code:
Shutting down due to severe error.
Exception in thread "Thread-19" java.lang.NullPointerException
   at org.serviio.renderer.dao.RendererDAOImpl.findByIPAddress(RendererDAOImpl.java:141)
   at org.serviio.renderer.RendererManager.getStoredRendererByIPAddress(RendererManager.java:222)
   at org.serviio.renderer.RendererManager.rendererAvailable(RendererManager.java:171)
   at org.serviio.upnp.webserver.DeviceDescriptionRequestHandler.handleRequest(DeviceDescriptionRequestHandler.java:68)
   at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:54)
   at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
   at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:58)
   at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
   at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:187)
Exception in thread "Thread-20" java.lang.NullPointerException
   at org.serviio.renderer.dao.RendererDAOImpl.findByIPAddress(RendererDAOImpl.java:141)
   at org.serviio.renderer.RendererManager.getStoredRendererByIPAddress(RendererManager.java:222)
   at org.serviio.renderer.RendererManager.rendererAvailable(RendererManager.java:171)
   at org.serviio.upnp.webserver.DeviceDescriptionRequestHandler.handleRequest(DeviceDescriptionRequestHandler.java:68)
   at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:54)
   at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
   at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:58)
   at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
   at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:187)
Exception in thread "Thread-21" java.lang.NullPointerException
   at org.serviio.renderer.dao.RendererDAOImpl.findByIPAddress(RendererDAOImpl.java:141)
   at org.serviio.renderer.RendererManager.getStoredRendererByIPAddress(RendererManager.java:222)
   at org.serviio.renderer.RendererManager.rendererAvailable(RendererManager.java:171)
   at org.serviio.upnp.webserver.DeviceDescriptionRequestHandler.handleRequest(DeviceDescriptionRequestHandler.java:68)
   at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:54)
   at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
   at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:58)
   at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
   at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:187)
Exception in thread "Thread-22" java.lang.NullPointerException
   at org.serviio.renderer.dao.RendererDAOImpl.findByIPAddress(RendererDAOImpl.java:141)
   at org.serviio.renderer.RendererManager.getStoredRendererByIPAddress(RendererManager.java:222)
   at org.serviio.renderer.RendererManager.rendererAvailable(RendererManager.java:171)
   at org.serviio.upnp.webserver.DeviceDescriptionRequestHandler.handleRequest(DeviceDescriptionRequestHandler.java:68)
   at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:54)
   at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
   at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:58)
   at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
   at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:187)


Going to keep poking at upstart and see why, and see if I can track down a similar issue with using java-7-oracle as I don't know why there would be a problem using the latest available java.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Jun 11, 2012 3:16 pm

Re: Please help.. errors and errors

Java 7 should be ok. The exception seems to be related to DB connection. Are there any other errors before this?

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 92 guests

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