Page 1 of 1

ReadyNAS

PostPosted: Mon Jun 06, 2011 12:24 pm
by kc1
Hi - I'm trying to install on a ReadyNas NVX (x86), when I run either .sh file this is what I get

NVX:/c/webroot/serviio/bin# sh serviio.sh
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


Not being very linux technical, I have no idea what this means. Could somebody give me some clues?

Thanks

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 12:40 pm
by zip
I assume you have a wrong Java version, probably 1.5. You need 1.6.

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 1:15 pm
by kc1
zip wrote:I assume you have a wrong Java version, probably 1.5. You need 1.6.


OK I updated the java runtime (using apt-get) to java 1.6.0_20

...but now when I try to run the console I get:

NVX:/webroot/serviio/bin# sh serviio-console.sh
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getGTKStyleFactory(GTKLookAndFeel.java:1530)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1494)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1361)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:536)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:581)
at org.serviio.ui.view.swing.SwingHelper.initSwing(SwingHelper.java:51)
at org.serviio.console.ServiioConsole.main(ServiioConsole.java:90)
Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
at com.sun.java.swing.plaf.gtk.PangoFonts.<clinit>(PangoFonts.java:43)
... 7 more
NVX:/webroot/serviio/bin#


If I try to run serviio.sh it just stops at the cursor until I Ctrl-C

What could be going wrong?

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 1:55 pm
by zip
edit the sh script and add

  Code:
-Djava.awt.headless=true


anong the other -D parameters

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 2:31 pm
by kc1
zip wrote:edit the sh script and add

  Code:
-Djava.awt.headless=true


anong the other -D parameters


Thanks, but not sure what you mean by "edit the sh script" (I'm not a unix person) Does this mean a script / batch command that I need to create to launch serviio.sh or edit serviio.sh itself?

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 2:41 pm
by kc1
OK, so in serviio-console.sh ...

I replaced:

JAVA_OPTS="-Dserviio.home=$SERVIIO_CONSOLE_HOME -Djava.net.preferIPv4Stack=true"

...with:

JAVA_OPTS="-Dserviio.home=$SERVIIO_CONSOLE_HOME -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true"

Is that what you meant?

...but now running serviio-console.sh produces:

NVX:/webroot/serviio/bin# sh serviio-console.sh
: command not found line 7:
: command not found line 10:
: command not found line 12:
: command not found line 13:
: command not found line 14:
'erviio-console.sh: line 15: syntax error near unexpected token `in
'erviio-console.sh: line 15: `case "`uname`" in

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 2:43 pm
by zip
no, revert the change in serviio-console.sh and do the same in serviio.sh instead. This tells Java not to use any UI code, which is not needed in the server component, but it is necessary for the console obviously.

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 3:31 pm
by kc1
I don't seem to be making any more progress.
The line in servio,sh now reads:
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Djava.awt.headless=true"

But trying to run it (i.e. type sh serviio.sh and then hit Enter), the cursor just flashes at the linux command prompt until I hit CTRL-C

Trying to run servio-console.sh, I get:

NVX:/webroot/serviio/bin# sh serviio-console.sh
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getGTKStyleFactory(GTKLookAndFeel.java:1530)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1494)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1361)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:536)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:581)
at org.serviio.ui.view.swing.SwingHelper.initSwing(SwingHelper.java:51)
at org.serviio.console.ServiioConsole.main(ServiioConsole.java:90)
Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
at com.sun.java.swing.plaf.gtk.PangoFonts.<clinit>(PangoFonts.java:43)
... 7 more

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 4:07 pm
by zip
Does the NAs have a GUI? If not you won't be able to run the console there, only the server. When you run serviio.sh it blocks the terminal, it's ok, as it's running process. To make it run in the background try

  Code:
./serviio.sh &

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 5:06 pm
by kc1
For the server...
zip wrote:To make it run in the background try
  Code:
./serviio.sh &

...this is what I get:
NVX:/webroot/serviio/bin# ./serviio.sh &
[3] 11621
NVX:/webroot/serviio/bin# -bash: ./serviio.sh: Permission denied


For the console...
zip wrote:Does the NAs have a GUI?

...Yes it does - called FrontView on Netgear ReadyNAS kit. There is a simulator here, and an explanation of how things can be installed into it here, but that is well beyond my competence.

Can the server be configured remotely (web) or from a windows pc on the LAN?

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 5:31 pm
by zip
NVX:/webroot/serviio/bin# -bash: ./serviio.sh: Permission denied


the user cannot execute the file, you need to change the owner or group as per usual on Linux


...Yes it does - called FrontView on Netgear ReadyNAS kit. There is a simulator here, and an explanation of how things can be installed into it here, but that is well beyond my competence.


That won't work

Can the server be configured remotely (web) or from a windows pc on the LAN?

Yes, look at the FAQ for remote console or search the forum.

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 6:05 pm
by kc1
zip wrote:
NVX:/webroot/serviio/bin# -bash: ./serviio.sh: Permission denied


the user cannot execute the file, you need to change the owner or group as per usual on Linux


I don't know which user you're referring to. The SSH console user is "root", with admin privileges. I don't know how to change this in Linux - could you give me an example?

Thanks

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 6:44 pm
by kc1
Can the server be configured remotely (web) or from a windows pc on the LAN?

Yes, look at the FAQ for remote console or search the forum.


Really struggling with this. I can't seem to get the PHP GUI to run.

Having searched a few threads for remote console access, it seems the idea is to add the server IP address to the JAVA_OPTS= line in serviio.sh using -Dserviio.remoteHost=192.168.x.x, and the same to the ServiioConsole.exe.vmoptions in the Windows Console installation.

I've done that, so the line in my serviio.sh now reads:
  Code:
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Djava.awt.headless=true -Dffmpeg.location=/usr/local/bin/ffmpeg -Dserviio.remoteHost=192.168.1.222"

...and my ServiioConsole.exe.vmoptions file is empty except for -Dserviio.remoteHost=192.168.1.222

But launching the windows console I get a pop-up that says: Cannot connect to Serviio server, it does not seem to be running. Exiting...

And running the server, I'm back to:
  Code:
NVX:/c/webroot/serviio/bin# sh serviio.sh
: command not found
: command not found:
: command not found:
: command not found:
: command not found:
'erviio.sh: line 15: syntax error near unexpected token `in
'erviio.sh: line 15: `case "`uname`" in



What am I doing wrong?

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 7:10 pm
by kc1
Doh, for the server, it turns out I had some line returns in the edited script.

Editing it again with vi seems to allow me to run it, but what do the warnings mean?:
  Code:
NVX:/c/webroot/serviio/bin# sh serviio.sh
log4j:WARN No appenders could be found for logger (org.serviio.ApplicationInstanceManager).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.


To fix this...
  Code:
NVX:/webroot/serviio/bin# -bash: ./serviio.sh: Permission denied
...I did chmod +x serviio.sh which seems to have allowed me to run it as you suggested:
  Code:
NVX:/c/webroot/serviio/bin# ./serviio.sh &
[6] 29726
[5]   Exit 127                ./script.sh
,,,but what do the numbers mean?




In any case I still can't get the windows console to run.

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 7:28 pm
by zip
The warnings - it seems to me there is something wrong with serviio.sh still, like it cannot find the proper classpath. Did you check serviio.log?

The console setup looks ok, obviously it won't connect if the server itself is not running properly so you have to get that working first.

Re: ReadyNAS

PostPosted: Mon Jun 06, 2011 10:14 pm
by kc1
It looks like the NAS just needed a reboot.

By adding the -Dserviio.remoteHost=192.168.1.222 to the windows .bat file I can now connect. I've just started adding media folders.

Thank you for your patience.

Re: ReadyNAS

PostPosted: Tue Jun 07, 2011 9:05 am
by kc1
I spoke too soon. The terminal window now shows:
  Code:
[Fatal Error] c28da8e6-a429-4e8e-ab5c-c2e1219fe169:1:1: Content is not allowed in prolog.
[Fatal Error] 02d90274-638b-468d-bab2-49e4056c1eb6:1:1: Content is not allowed in prolog.
[Fatal Error] 15a637c6-64ca-4cc6-ac2a-1d1f54f602eb:1:1: Content is not allowed in prolog.
[Fatal Error] a974d8fc-80db-42af-8552-9c7ac08ff7e1:1:1: Content is not allowed in prolog.
[Fatal Error] 237172c2-9253-4d42-ba54-698bc6b0d64d:1:1: Content is not allowed in prolog.
[Fatal Error] 7bf6f2f3-86d9-471a-9db9-eb69eb5c6b69:1:1: Content is not allowed in prolog.
[Fatal Error] 6f1d6f0d-c82b-4b47-9f90-fac36ff407cf:1:1: Content is not allowed in prolog.
[Fatal Error] bc07f1d7-50a5-423e-90d2-72c37aa8a735:1:1: Content is not allowed in prolog.


and the last part of the server log shows:
  Code:
2011-06-07 00:09:56,506 INFO  [LibraryUpdatesCheckerThread] Updated 'Harry Potter and the Sorcerer's Stone' (/media/films/kids/Harry Potter/Harry Potter And The Philosopher's Stone [2001]/Harry Potter 1 Philosopher's Stone [2001].avi) in Library
2011-06-07 01:46:07,399 INFO  [LibraryAdditionsCheckerThread] Finished looking for newly added files
2011-06-07 01:46:07,593 INFO  [WebServer] WebServer shutting down
2011-06-07 01:46:07,595 INFO  [DiscoveryAdvertisementNotifier] Leaving DiscoveryAdvertisementNotifier
2011-06-07 01:46:07,595 INFO  [EventSubscriptionExpirationChecker] Leaving EventSubscriptionExpirationChecker, removing all event subscriptions
2011-06-07 01:46:07,596 INFO  [EventDispatcher] Leaving EventDispatcher
2011-06-07 01:46:07,607 INFO  [DiscoverySSDPMessageListener] Leaving DiscoverySSDPMessageListener
2011-06-07 01:46:07,612 INFO  [DatabaseManager] Shutting down database
2011-06-07 01:46:09,281 INFO  [AbstractTranscodingDeliveryEngine] Cleaning transcode engine and its data


Any idea what is going on?

Re: ReadyNAS

PostPosted: Tue Jun 07, 2011 9:09 am
by zip
It should not shut down. It was discussed here: viewtopic.php?f=14&t=186&p=5220&hilit=Shutting+down+database#p9005

Re: ReadyNAS

PostPosted: Tue Jun 07, 2011 9:23 am
by kc1
zip wrote:It should not shut down. It was discussed here: viewtopic.php?f=14&t=186&p=5220&hilit=Shutting+down+database#p9005

I think this is telling me to use the ./serviio.sh & command.

What might have caused the 'fatal' errors and shut the server?

Re: ReadyNAS

PostPosted: Sat Oct 26, 2013 2:57 am
by chrisleblancorg
I just wanted to point out for error 15, I got the same issue when I edited serviio.sh in wordpad.

I instead used vi through putty. There is a difference with carriage returns in windows over linux.