Page 3 of 3

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Sun Mar 25, 2012 9:19 pm
by serviio-buddy
I changed serviio.conf to the following as suggested (with and without the "exec" command in front of the serviio.sh:

start on (started network-interface
or started network-manager
or started networking)
expect daemon
script
serviio-0.6.2/bin/serviio.sh
end script

Then I typed: ps aux | grep serviio

Results: no serviio running

Then I typed: status serviio
First it said: serviio stop/waiting
Next time I typed this it said: job failed to start

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Sun Mar 25, 2012 9:28 pm
by Capitrium
Can you edit your Upstart script so that it looks like this:
  Code:
start on (started network-interface
or started network-manager
or started networking)
expect daemon
script
exec 2>>/dev/.initramfs/serviio.log
set -x
serviio-0.6.2/bin/serviio.sh
end script
Save, then run 'sudo start serviio'. Then open the file '/dev/.initramfs/serviio.log' with the text editor of your choice and post whatever's in that file.

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Sun Mar 25, 2012 9:31 pm
by serviio-buddy
ok, will try it now and post the log results shortly.

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Sun Mar 25, 2012 9:38 pm
by serviio-buddy
After modifying the serviio.conf to:
  Code:
start on (started network-interface
or started network-manager
or started networking)
expect daemon
script
exec 2>>/dev/.initramfs/serviio.log
set -x
serviio-0.6.2/bin/serviio.sh
end script
I rebooted, then typed: status serviio, it said "serviio stop/waiting"
Typed: sudo start serviio, it said: start: Job failed to start

file: /dev/.initramfs/serviio.log says:
  Code:
* serviio-0.6.2/bin/serviio.sh
/proc/self/df/9: 1: serviio-0.6.2/bin/serviio.sh: not found
* serviio-0.6.2/bin/serviio.sh
/proc/self/df/9: 1: serviio-0.6.2/bin/serviio.sh: not found
* serviio-0.6.2/bin/serviio.sh
/proc/self/df/9: 1: serviio-0.6.2/bin/serviio.sh: not found
* serviio-0.6.2/bin/serviio.sh
/proc/self/df/9: 1: serviio-0.6.2/bin/serviio.sh: not found

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Sun Mar 25, 2012 9:47 pm
by Capitrium
Try going to the location of the serviio.sh script in a shell. When you are in that directory, type 'pwd'. It will print the full path of the directory you are in to the screen. Copy that path exactly into the Upstart script so that the relevant line looks like 'exec <result_of_pwd_command>/serviio.sh'. Then try running 'sudo start serviio' again.

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Sun Mar 25, 2012 10:02 pm
by serviio-buddy
OK. I went to the directory where serviio.sh is located and typed: pwd. It said: /home/customer/serviio-0.6.2/bin
I modified the serviio.conf as follows:
  Code:
start on (started network-interface
or started network-manager
or started networking)
expect daemon
script
exec 2>>/dev/.initramfs/serviio.log
set -x
exec /home/customer/serviio-0.6.2/bin/serviio.sh
end script


I rebooted, then typed status serviio and it said: serviio start/running, process 485. Waiting another minute, I typed: status serviio and it's still running!

Success!!!! Thank You for this fix.

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Sun Mar 25, 2012 10:06 pm
by Capitrium
Awesome! Glad I could help :D
FYI you can remove the 'exec 2>>...' and 'set -x' lines from the Upstart script now if you want, since they're only there for debugging purposes.

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Sun Mar 25, 2012 10:34 pm
by serviio-buddy
Yeah, I removed that code.

Also, I removed the "exec" command on the line calling serviio.sh, since it runs fine without it.

Serviio is now running on my Ubuntu 11.10 Server and I can see it from other machines on the network.

Can I run Serviio Console on the Ubuntu 11.10 Server (headless) or do I need to connect to it with a GUI OS like Windows or Ubuntu Desktop?

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Mon Mar 26, 2012 2:44 am
by Capitrium
Doesn't seem like the console will run on a headless installation. Here's the lines from the log files when I ran the script from a shell prompt:
  Code:
2012-03-:37:36,850 WARN  [SwingHelper] Can't change L&F: [GTK look and feel - com.sun.java.swing.plaf.gtk.GTKLookAndFeel] not supported on this platform
2012-03-25 23:37:36,860 INFO  [ServiioConsole] Connecting to Serviio REST on localhost:23423
2012-03-25 23:37:37,497 INFO  [Messages] Loaded console message bundle for locale: en
2012-03-25 23:37:37,917 ERROR [ServiioConsole] Unexpected exception occured: null
java.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
        at java.awt.Window.<init>(Window.java:476)
        at java.awt.Frame.<init>(Frame.java:419)
        at java.awt.Frame.<init>(Frame.java:384)
        at javax.swing.JFrame.<init>(JFrame.java:174)
        at org.serviio.ui.view.swing.JFrameView.<init>(JFrameView.java:28)
        at org.serviio.ui.view.swing.ServiioFrameView.<init>(ServiioFrameView.java:52)
        at org.serviio.console.ServiioConsole.main(ServiioConsole.java:112)
2012-03-25 23:37:37,923 INFO  [ServiioConsole] Leaving Serviio Console

I'll see about configuring it to be run remotely. I currently use the ServiiDroid android app to manage the server, and it works perfectly so I actually haven't needed to use a console up to this point :P

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Mon Mar 26, 2012 3:55 am
by Capitrium
You could also install the web-ui that was released for Serviio v0.6.1 as it's 100% compatible with Serviio v0.6.2; see this thread for details. Note that you'll have to edit the config.php file included in the .zip file and change the value of the $version_req variable from "0.6.1" to "0.6.2" or else it complains. You'll also need an Apache web server with PHP5 installed on your machine; there's plenty of guides available for that kind of thing, so I won't go into detail on this here.

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Mon Mar 26, 2012 4:31 am
by serviio-buddy
OK. Will try the Web UI, but first will load Apache Server and PHP 5 and read all about it with the link you posted. Thanks again for your help.

Re: Unable to get serviio to run on boot Ubuntu server 11.10

PostPosted: Fri Mar 30, 2012 11:48 pm
by xxChinasaurxx
I reinstalled Ubuntu server 11.10 and Serviio (all though this time I installed 0.6.01) and used the script by Capitrium, and all worked perfectly!
Thank you very much, serviio now works very well