Installing Subsonic on unRAID


Recommended Posts

First off excellent tutorial.

 

I have Subsonic running on my Unraid box though I do have one issue that I hope someone can help me figure out. The problem I'm having is setting the Music folder directories. I have my music in shares which spread over two drives. My share is called "iTunes" and lives on disk5 and disk4. I've tried /shares/Itunes, /iTunes, /disk4, /disk5 and can't seem to get the list to populate. How would I add the share to subsonic's settings?

Link to comment
  • Replies 194
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I have my music in shares which spread over two drives. My share is called "iTunes" and lives on disk5 and disk4. I've tried /shares/Itunes, /iTunes, /disk4, /disk5 and can't seem to get the list to populate. How would I add the share to subsonic's settings?

 

Try /mnt/user/iTunes   

 

Link to comment

would it be possible to host that transcode.zip file somewhere else?

 

I keep getting "Sorry, there are currently no free download slots available on this server. Please try again later, or you can upgrade to FileFactory Premium below for instant access." from FileFactory..

Link to comment

This is almost working for me, but not quite.  After rebooting, none of my subsonic settings were saved.  This is the email from the cron job that ran the night before (before the reboot):

 

### Removing Subsonic Thumbs ###
### Copy Subsonic From Memory ###
cp: cannot stat `/var/subsonic/data/db/*': No such file or directory
cp: omitting directory `/var/subsonic/data/db'
cp: omitting directory `/var/subsonic/data/transcode'
### Copy Subsonic tmp Cache ###
`/tmp/subsonic/ehcache/chatCache.data' -> `/boot/subsonic/tmp-subsonic-ehcache/chatCache.data'
`/tmp/subsonic/ehcache/chatCache.index' -> `/boot/subsonic/tmp-subsonic-ehcache/chatCache.index'
`/tmp/subsonic/ehcache/musicFolderCache.data' -> `/boot/subsonic/tmp-subsonic-ehcache/musicFolderCache.data'
`/tmp/subsonic/ehcache/musicFolderCache.index' -> `/boot/subsonic/tmp-subsonic-ehcache/musicFolderCache.index'

 

Looking into it, there are no files in /var/subsonic/data/db.  The database files are in /var/subsonic/db.  Likewise, my flac files wouldn't play until I moved the files from /var/subsonic/data/transcode to /var/subsonic/transcode.  Your scripts expect the data directory, but my subsonic isn't using it for some reason.

 

I am using subsonic version 3.9 (build 1335) – February 9, 2010.

 

I'm trying to go through and change the scripts, but I keep getting lost in the logic.  Not sure why my installation is not using the data directory.  It doesn't seem to be a problem for others.

 

Thanks

 

Link to comment

hi  me unraid server dont start the subsonic when boot

me go file is like this  waht have I dont do right ?

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

# JAVA Runtime

installpkg /boot/packages_custom/jre-6u6-i586-3.tgz

 

# Run Subsonic and add Backup Job.

/boot/scripts/subsonic_start.sh

/boot/scripts/cron_subsonic_copy_from_memory.sh

 

Link to comment
  • 3 weeks later...

This is almost working for me, but not quite.  After rebooting, none of my subsonic settings were saved.  This is the email from the cron job that ran the night before (before the reboot):

 

### Removing Subsonic Thumbs ###
### Copy Subsonic From Memory ###
cp: cannot stat `/var/subsonic/data/db/*': No such file or directory
cp: omitting directory `/var/subsonic/data/db'
cp: omitting directory `/var/subsonic/data/transcode'
### Copy Subsonic tmp Cache ###
`/tmp/subsonic/ehcache/chatCache.data' -> `/boot/subsonic/tmp-subsonic-ehcache/chatCache.data'
`/tmp/subsonic/ehcache/chatCache.index' -> `/boot/subsonic/tmp-subsonic-ehcache/chatCache.index'
`/tmp/subsonic/ehcache/musicFolderCache.data' -> `/boot/subsonic/tmp-subsonic-ehcache/musicFolderCache.data'
`/tmp/subsonic/ehcache/musicFolderCache.index' -> `/boot/subsonic/tmp-subsonic-ehcache/musicFolderCache.index'

 

Looking into it, there are no files in /var/subsonic/data/db.  The database files are in /var/subsonic/db.  Likewise, my flac files wouldn't play until I moved the files from /var/subsonic/data/transcode to /var/subsonic/transcode.  Your scripts expect the data directory, but my subsonic isn't using it for some reason.

 

I am using subsonic version 3.9 (build 1335) – February 9, 2010.

 

I'm trying to go through and change the scripts, but I keep getting lost in the logic.  Not sure why my installation is not using the data directory.  It doesn't seem to be a problem for others.

 

Thanks

 

 

Sorry I missed your post. Were you able to get it working?

 

When you modified the subsonic.sh file and saved it as subsonic_RAM.sh (Step #5), make sure you have the line that tells where subsonic should save the DB correct...

SUBSONIC_HOME=/var/subsonic/data

This will also fix having to move the transcode folder too.

Link to comment

Sorry I missed your post. Were you able to get it working?

 

When you modified the subsonic.sh file and saved it as subsonic_RAM.sh (Step #5), make sure you have the line that tells where subsonic should save the DB correct...

SUBSONIC_HOME=/var/subsonic/data

This will also fix having to move the transcode folder too.

 

I did get it working, but I rewrote your scripts to work with the directory structure I had.  I guess I missed the bit about changing the SUBSONIC_HOME variable, mine is /var/subsonic.  That would've been a lot easier.  Oh well, it's working and it's awesome.  Thanks for posting the how-to.

 

 

Link to comment
  • 2 weeks later...
  • 2 weeks later...

kapperz: Thanks for a great tutorial. Thanks to you I have a nice music streaming application both on my computer and on my iPhone.  I donated 20€  :)

 

1# question: Can you stop and start Subsonic with some command(telnet/PuTTY)?

 

[EDIT]2# question: In the log of unraid I find 19:00:16 Tower crond[19824]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null is there something to do about the unable to exec...?

Link to comment

kapperz: Thanks for a great tutorial. Thanks to you I have a nice music streaming application both on my computer and on my iPhone.  I donated 20€  :)

 

1# question: Can you stop and start Subsonic with some command(telnet/PuTTY)?

 

[EDIT]2# question: In the log of unraid I find 19:00:16 Tower crond[19824]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null is there something to do about the unable to exec...?

 

If you have the DS_Store package installed with the option to send mail then that is why you are getting that message.  Cron needs a way to send mail out and if it can't then you get the message you are seeing.

Link to comment

kapperz: Thanks for a great tutorial. Thanks to you I have a nice music streaming application both on my computer and on my iPhone.  I donated 20€  :)

 

1# question: Can you stop and start Subsonic with some command(telnet/PuTTY)?

 

[EDIT]2# question: In the log of unraid I find 19:00:16 Tower crond[19824]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null is there something to do about the unable to exec...?

Apparently one of your processes is attempting to send mail outbound

(Actually, every cron process sends mail upon completion if there is anything sent to stdout or stderr output).

 

Install the ssmtp package with the package-manager built into unMENU.  It installs /usr/sbin/sendmail

Then, you'll get the mail (assuming it is mailing it to you).

 

 

 

Link to comment

Hogwind,

 

#1 You can stop subsonic by killing the process that looks like below.

/usr/lib/java/bin/java -Xmx256m -Dsubsonic.home=/var/subsonic/data...

I also included subsonic_stop.sh script which reads the SUBSONIC_PIDFILE=/boot/subsonic/PID.txt path that was set in step #5 (file subsonic_RAM.sh).

 

#2 There is my one the cron_subsonic_copy_from_memory.sh file which is set in step #7. As Joe L said, I'm 99% sure I'm not sending anything to to stdout or stderr output. The script just adds a job line to the crontabs for the current user.

 

Glad you like the setup. I wish I was advanced enough to make a install package for this process.

Link to comment

#2 There is my one the cron_subsonic_copy_from_memory.sh file which is set in step #7. As Joe L said, I'm 99% sure I'm not sending anything to to stdout or stderr output. The script just adds a job line to the crontabs for the current user.

Unless you specifically redirected both stdout and stderr in the line in your cron script I think it will attempt to send you mail.

 

you want something like this

1 2 * * * script_name.sh >/dev/null 2>&1

Link to comment
  • 3 weeks later...

Thanks kapperz!  These instructions are great.  Got this working on my unraid server 4.4.2.

 

I had some trouble with lame and faad transcoding apple lossless files, so I compiled ffmpeg (with help from your great instructions again) and followed instructions I found here:

 

http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=1498&highlight=m4a

 

Basically, it has instructions to use a shell script to call ffmpeg and transcode to mp3.

 

#!/bin/bash

song=$1

bitrate=$2

 

/var/subsonic/transcode/ffmpeg -i "$song" -f mp3 -ab $bitrate - 2>/dev/null

 

FFMPEG seems to do much better at decoding for these types of files.  It might work well for other problematic file types too.  I didn't have to copy any additional library files - just the compiled ffmpeg.

 

Again - thank you!  It's nice to not have to store music on my mobile devices and at work.

 

Link to comment

Sorry for the late answer...

 

kapperz: Thanks for a great tutorial. Thanks to you I have a nice music streaming application both on my computer and on my iPhone.  I donated 20€  :)

 

1# question: Can you stop and start Subsonic with some command(telnet/PuTTY)?

 

[EDIT]2# question: In the log of unraid I find 19:00:16 Tower crond[19824]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null is there something to do about the unable to exec...?

 

If you have the DS_Store package installed with the option to send mail then that is why you are getting that message.  Cron needs a way to send mail out and if it can't then you get the message you are seeing.

I have the notify script installed. So that is probably why cron is trying to send some email.

 

 

Hogwind,

 

#1 You can stop subsonic by killing the process that looks like below.

/usr/lib/java/bin/java -Xmx256m -Dsubsonic.home=/var/subsonic/data...

I also included subsonic_stop.sh script which reads the SUBSONIC_PIDFILE=/boot/subsonic/PID.txt path that was set in step #5 (file subsonic_RAM.sh).

 

#2 There is my one the cron_subsonic_copy_from_memory.sh file which is set in step #7. As Joe L said, I'm 99% sure I'm not sending anything to to stdout or stderr output. The script just adds a job line to the crontabs for the current user.

 

Glad you like the setup. I wish I was advanced enough to make a install package for this process.

I want to be able to restart Subsonic without restarting unRAID. Because as it is now Subsonic doesn't add new music to the artist menu or to the iPhone app. I can only find new music under Home -> Newest after a search index update.

 

The subsonic_stop.sh script doesn't work. I think it's because the PID.txt isn't correct.

 

My PID.txt file just contains the numbers 5404.

 

What should I do to make the stop/start script work?

Link to comment
  • 2 weeks later...
  • 1 month later...

I've been enjoying streaming music to my Android phone since this tutorial was first posted.  A BIG Thanks to you kapperz.

 

I did donate and I have a license key.  Is there any way to pass license key during startup so that I don't have to log in and install the key everytime my server is restarted?

Link to comment

I had trouble starting v4.1 on my unraid.

 

I had to change the subsonic_RAM.sh script (got this from another site)

:

 

Delete or comment out the following lines:

 

cd $(dirname $0) 
if [ -e /bin/readlink ] || [ -e /usr/bin/readlink ]; then 
cd $(dirname $(readlink -f $0)) 
fi 

 

Replace above with:

 

cd `dirname $0`

 

Note the that above is a " ` " not a " ' "

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.