Subsonic on OpenWrt

General discussions.

Moderator: moderators

Subsonic on OpenWrt

Postby daniel » Fri Jun 04, 2010 1:43 pm

hi all,

i just tried to get subsonic working on my OpenWrt-Router.
i installed the sable-vm and copied the .jar and the .sh files to the usb-stick, which is mounted. when i run the shellscript, subsonic starts and is visible when doing "ps ax | grep subsonic". but after a few seconds it dies and in the logfile:

Code: Select all
Warning: -Xmx100m option not implemented in java-sablevm wrapper.
   at java.lang.VMClassLoader.nativeDefineClass (
   at java.lang.VMClassLoader.defineClass (
   at java.lang.ClassLoader.defineClass (
   at (
   at (
   at java.lang.ClassLoader.loadClass (
   at java.lang.ClassLoader$1.loadClass (
   at java.lang.ClassLoader.loadClass (
   at java.lang.VirtualMachine.main (

any ideas what is needed to get it to run on my router?

thanks in advance,

Posts: 3
Joined: Fri Jan 23, 2009 1:07 pm

Postby Hobbit13 » Wed Jun 16, 2010 9:36 am

Besides whether it could/should work, I think your you'll have serious memory issues. Most routers have only 4 to 16mb ram, which is not enough for Subsonic.

With about 3 users the subsonic service consumes ca 400-500MB ram on my server.

On your specific problem: it looks like your JVM (SableVM) is not fully compatible with the Sun JVM 1.6 subsonic needs. You can try to install a Sun Java via 'apt-get install java-package' etc. But you'll run out of mem in that case aswell :-)
Posts: 9
Joined: Thu May 13, 2010 1:52 pm

Postby fr3d » Wed Jun 23, 2010 1:03 pm

I guess if your router was the sort that would allow you to use additional USB memory/storage you might be able to get over the memory problem. Might have to pick up that soldering iron to get it sorted.
Either way .. I love the idea. WRT Router and music server in one. Good luck with it.
It is we who live that the music may play.
Posts: 23
Joined: Fri Jun 04, 2010 8:04 am
Location: Ireland

Postby JMilesT » Tue Aug 31, 2010 4:12 pm

When Subsonic calls up LAME to transcode a music file, a lot of processor power is needed. I don't think most routers are up to the task.
Posts: 23
Joined: Mon Jun 14, 2010 4:54 am

Postby vividboarder » Wed Apr 06, 2011 9:27 pm

Modern Buffalo routers are definitely powerful enough. My new one has a 400Mhz processor in it which should be fine for transcoding a single audio file on the fly, or even just doing pass through.

But... I've got an issue with sablevm too... It's not finding java.lang.Object or something. I've tried specifying the classpath explicitly by modifying my java-sablevm script.

Basically, I went into that file and replaced every instance of /usr/* with /opt/usr/* (since my sablevm is installed in /opt). And then at the end, right before the execute statement I do

Code: Select all
OPTS="$OPTS -p sablevm.boot.class.path=$BOOTCLASSPATH"

To specify the classpath to the BOOTCLASSPATH. I put in the echo statement so I can see the command appears correct.

I'm trying to run Subsonic Server so here is the command...

Code: Select all
/opt/usr/bin/sablevm -Y -p java.library.path=:/opt/lib:/opt/usr/lib:/lib:/usr/lib:/opt/usr/local/lib:/opt/usr/lib --classpath=subsonic-booter-jar-with-dependencies.jar --property=subsonic.home=/mnt/data/subsonic --property=subsonic.port=5050 --property=subsonic.httpsPort=0 --property=subsonic.contextPath=/ --property=subsonic.defaultMusicFolder=/mnt/data/music --property=subsonic.defaultPodcastFolder=/mnt/data/music/Podcast --property=subsonic.defaultPlaylistFolder=/mnt/data/playlists --property=java.awt.headless=true net.sourceforge.subsonic.booter.Main -p sablevm.boot.class.path=/opt/usr/share/sablevm-classpath:/opt/usr/share/sablevm-classpath/libclasspath.jar:/opt/usr/share/sablevm-classpath/resources.jar

You can see the directories make no mention of /usr/share and only /opt/usr/share but still I get

Code: Select all

*** Fatal error: Unable to load essential class java/lang/Object.
*** Most probably it was not found on boot classpath:
*** /usr/share/sablevm-classpath:/usr/share/sablevm-classpath/libclasspath.jar:/usr/share/sablevm-classpath/resources.jar

This could be a static message that it gives me and be hardcoded to say /usr/share/sablevm-classpath regardless of the value being overwritten. If so I may be chasing my tail a bit on this.

Anyone have any ideas?
Posts: 18
Joined: Wed Sep 22, 2010 1:37 pm
Location: 223

Postby 3R3 » Wed Apr 06, 2011 11:05 pm

Hobbit13 wrote:On your specific problem: it looks like your JVM (SableVM) is not fully compatible with the Sun JVM 1.6 subsonic needs. You can try to install a Sun Java via 'apt-get install java-package' etc. But you'll run out of mem in that case aswell :-)

There is your answer. In a nutshell, sablevm cant even run subsonic because that would require java 1.6 min. You can use the jamVM though. I tried it on a NSLU and it started up...and filled 32mb of ram pretty fast :)
so I'd say use the latest version.

edit: sources for subsonic needing java 5, under "standalone installation" (
and for java/jamVM 1.5 being java 5 here (
User avatar
Posts: 332
Joined: Mon May 04, 2009 2:09 pm
Location: Germany

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests