Page 1 of 1
Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 1:42 am
by Vladizlav
Hi! I have Synology DS211j. I had been trying to run Serviio 0.6.0 with no significant success (it worked for sometime, but then started saying that serviio server did not seem to be running), so I hoped to get my problems fixed with the latest update.
I noticed that Java 7 for Embedded 7 may have been updated too, removed it and installed it again. The same has been done for Serviio. Now Serviio does not even show that it works. It apparently starts when I click Run, but after a minute or so it is stopped again. Java for Embedded 7 seems always stopped, and I do not see a link to run it. Any advice?
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 2:58 am
by moltra
Can you post your serviio.log file.
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 10:58 pm
by ntangle
Had the same problem DSM 4.0 Beta, DS110j and new Serviio package 6.1
Ran /volume1/@appstore/Serviio/bin/serviio-wrapper.sh from the shell
Following error:
/volume1/@appstore/Serviio/bin/serviio-wrapper.sh: line 56: syntax error: Mem: 118848 85996 32852 0 2672 47252/1024
Line 56:
RAM=$((`free | grep Mem: | sed -e "s/^ Mem: *\([0-9]*\).*$/\1/"`/1024))
if [ $RAM -le 128 ]; then
JAVA_MAX_HEAP=80M
elif [ $RAM -le 256 ]; then
JAVA_MAX_HEAP=192M
elif [ $RAM -gt 256 ]; then
JAVA_MAX_HEAP=384M
fi
So I removed all the above apart from the JAVA_MAX_HEAP=80M (being a 110j less than or equal to 128)
Running fine now. Not using grep from the box, have the ipkg grep package.
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 11:10 pm
by patters
Interesting. I'd say that your version of sed is more likely to be the problem. Can you try running that bit again, but using the sed from DSM:
- Code:
RAM=$((`free | grep Mem: | /bin/sed -e "s/^ Mem: *\([0-9]*\).*$/\1/"`/1024))
echo $RAM
The thing is, I introduced this RAM checking routine with my Minecraft package, and my NAS was bootstrapped on 3.2 at the time (and therefore would have had the ipkg version of sed). Now it's non-bootstrapped on 4.0beta. I haven't run into that, and I've not had that issue reported on my blog yet either.
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 11:17 pm
by patters
Hang on. I'm not sure what you've done, but you're missing a space in that code line just before the 'Mem', hence the problem. You have:
- Code:
RAM=$((`free | grep Mem: | sed -e "s/^ Mem: *\([0-9]*\).*$/\1/"`/1024))
It should be:
- Code:
RAM=$((`free | grep Mem: | sed -e "s/^ Mem: *\([0-9]*\).*$/\1/"`/1024))
Did you perhaps open the script in nano to read it and saved a change by accident?
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 11:18 pm
by ntangle
DiskStation> RAM=$((`free | grep Mem: | /bin/sed -e "s/^ Mem: *\([0-9]*\).*$/\1/"`/1024))
-ash: syntax error: Mem: 118848 110576 8272 0 584 16232/1024
DiskStation> echo $RAM
DiskStation>
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 11:21 pm
by ntangle
and with the extra space, syntax error too :/
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 11:22 pm
by patters
Can you post the output from running the 'free' command (in a [code] block so I can see the spacing?). Thanks.
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 11:25 pm
by ntangle
Removed the spaces as Mem: is against the left margin, works fine now
DiskStation> free -V
Unknown HZ value! (93) Assume 100.
procps version 3.2.8
DiskStation> which sed
/opt/bin/sed
DiskStation> sed --version
GNU sed version 4.2.1
- Code:
DiskStation> free
Unknown HZ value! (93) Assume 100.
total used free shared buffers cached
Mem: 118848 103524 15324 0 944 15684
-/+ buffers/cache: 86896 31952
Swap: 2097144 81832 2015312
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 11:29 pm
by patters
Hmm, maybe you've somehow got a different version of free. I'm on DSM 4.0beta and mine isn't like yours.
Can you do the same but using /bin/free
Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 11:34 pm
by ntangle
/usr/bin/free: (/bin/free not found)
- Code:
DiskStation> /usr/bin/free
total used free shared buffers
Mem: 118848 106908 11940 0 3100
Swap: 2097144 47392 2049752
Total: 2215992 154300 2061692
Using absolute paths, your code now works

Re: Synology DS211j: Serviio does not start

Posted:
Thu Feb 02, 2012 11:37 pm
by patters
Thanks, I'll either make that explicit, or make the matching a little less rigid in the next version of the package (0.6.2).
Re: Synology DS211j: Serviio does not start

Posted:
Fri Feb 03, 2012 2:22 am
by Vladizlav
I got serviio log file, but it is empty.