Installing Subsonic on unRAID


Recommended Posts

kapperz,

 

Man I'm glad I tried this. This is awesome.

 

My music streams perfectly to my PC's as well as my video.

 

I installed the Subsonic app for my Samsung Vibrant and man the video doesn't look bad at all. Of course its not as high quality as it would normally appear on my phone if I played it directly, but I can live with it around the house. ;)

Link to comment
  • Replies 194
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I was on Subsonics website and they often talk about mods and I was looking at one of the paths they use, but well we don't seem to have it on our stand alone unRAID version.

 

/var/subsonic/jetty/1806/webapp/WEB-INF/jsp/left.jsp

 

Would be nice to run some of their mods, but I'm not sure if its something we just throw on the server or is it more complicated than that.

 

This is one example out of a few I've seen.

http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=4361

Link to comment
  • 2 weeks later...

Okay thanks, I think I understand now. Here's what I did to upgrade on unRAID for anyone else who may be in my shoes:

 

1. Stop Subsonic

/boot/scripts/shutdown_jobs.sh

 

2. Copy new standalone subsonic files to \\tower\flash\subsonic\standalone\

 

3. Copy subsonic to var directory

cp -R /boot/subsonic/* /var/subsonic/standalone/

 

4. Copy subsonic tmp files

cp -R /boot/subsonic/tmp-subsonic-ehcache/* /tmp/subsonic/ehcache/

 

5. I had to run this command:

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

 

6. Finally Start Subsonic:

/boot/scripts/subsonic_start.sh

 

Not sure if that's the way, but it got me upgraded to 4.4 and looks like everything is working well.

 

Thanks!

Link to comment

hi,

 

i tried this out today and followed the instructions step by step.

http://tower:22111/subsonic throws 404

 

i logged in via telnet and stoped /started subsonic

 

 

stop gives me this:

root@Tower:~# /boot/scripts/subsonic_stop.sh
### Killing Subsonic PID: 2757 ###
/boot/scripts/subsonic_stop.sh: line 12: kill: (2757) - No such process

 

start gives me this:

root@Tower:~# /boot/scripts/subsonic_start.sh
Started Subsonic [PID 3259, var/subsonic/data/subsonic_sh.log]
root@Tower:~# /var/subsonic/standalone/subsonic_RAM.sh: line 114: var/subsonic/data/subsonic_sh.log: No such file or directory

 

any idea?

 

i installed 4.4,

checked if the RAM file is unix formatted,

checked the var folder in midnight commander

 

midnight commander lets me find the following files on my server:

 

var/subsonic/standalone/subsonic.. (dependencies).jar

var/subsonic/standalone/subsonic.bat

var/subsonic/standalone/subsonic.sh

var/subsonic/standalone/subsonic.war

var/subsonic/standalone/subsonic_RAM.sh

 

boot/subsonic/data

boot/subsonic/standalone/  

boot/subsonic/standalone/*subsonic.. (dependencies).jar

boot/subsonic/standalone/*subsonic.bat

boot/subsonic/standalone/*subsonic.sh

boot/subsonic/standalone/*subsonic.war

boot/subsonic/standalone/*subsonic_RAM.sh

boot/subsonic/tmp-subs~ehcache/

boot/subsonic/*PID.txt

 

boot/scripts/  with your 9 userscripts

 

so far it lookes good to me. but i dont see any logfile like reported via telnet

here is my go file:

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &


cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

/boot/unmenu/uu
/boot/cache_dirs  -d  4  -m  3  -M  5  -w



# === subsonic === 
# 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

/boot/scripts/shutdown_jobs_add.sh
# ================= 

 

 

and this is the setup for my subsonic_RAM.sh

 

JAVA_HOME=/usr/lib/java
SUBSONIC_HOME=var/subsonic/data
SUBSONIC_HOST=0.0.0.0
SUBSONIC_PORT=22111
SUBSONIC_HTTPS_PORT=0
SUBSONIC_CONTEXT_PATH=/subsonic
SUBSONIC_MAX_MEMORY=512
SUBSONIC_PIDFILE=/boot/subsonic/PID.txt
SUBSONIC_DEFAULT_MUSIC_FOLDER=
SUBSONIC_DEFAULT_PODCAST_FOLDER=/boot/subsonic/Podcast
SUBSONIC_DEFAULT_PLAYLIST_FOLDER=/boot/subsonic/playlists

 

should I need to save the changes to the original subsonic.sh, too?

 

 

Link to comment

stop gives me this:

root@Tower:~# /boot/scripts/subsonic_stop.sh
### Killing Subsonic PID: 2757 ###
/boot/scripts/subsonic_stop.sh: line 12: kill: (2757) - No such process

That error means that subsonic was probably not running.

 

start gives me this:

root@Tower:~# /boot/scripts/subsonic_start.sh
Started Subsonic [PID 3259, var/subsonic/data/subsonic_sh.log]
root@Tower:~# /var/subsonic/standalone/subsonic_RAM.sh: line 114: var/subsonic/data/subsonic_sh.log: No such file or directory

As the error says there is no directory and or file that it was looking for.  Try doing this from the console:

mkdir -p /var/subsonic/data

Now start subsonic and see what happens.  If it still complains about "No such file or directory" then try this also:

touch /var/subsonic/data/subsonic_sh.log

 

 

NOTE: I have not installed this addon nor used it, so my directions might be slightly off.

Link to comment

I tried.

 

root@Tower:~#[b] mkdir -p /var/subsonic/data[/b]

root@Tower:~# /boot/scripts/subsonic_start.sh
Started Subsonic [PID 4414, var/subsonic/data/subsonic_sh.log]
root@Tower:~# /var/subsonic/standalone/subsonic_RAM.sh: line 114: var/subsonic/data/subsonic_sh.log: No such file or directory

root@Tower:~# [b]touch /var/subsonic/data/subsonic_sh.log[/b]

root@Tower:~# /boot/scripts/subsonic_start.sh
Started Subsonic [PID 4781, var/subsonic/data/subsonic_sh.log]
root@Tower:~# /var/subsonic/standalone/subsonic_RAM.sh: line 114: var/subsonic/data/subsonic_sh.log: No such file or directory

 

hum. strange.

 

I read the whole topic and realized some changes to the subsonic_RAM.sh file would be nesseccary?

the "dirname " issue looks like this in my subsonic_RAM.sh

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

 

i did not changed it, because my original subsonic.sh is from the subsonic 4.4 standalone, and i wasnt sure if it needs any change

Link to comment

root@Tower:~#[b] mkdir -p /var/subsonic/data[/b]

I'm not sure if you added them to you post or not but there are "bold" tags around the above line which would cause it to not work.

 

root@Tower:~# touch /var/subsonic/data/subsonic_sh.log

Again, this line above has "bold" tags around it which would have caused it to not work.

 

I read the whole topic and realized some changes to the subsonic_RAM.sh file would be nesseccary?

the "dirname " issue looks like this in my subsonic_RAM.sh

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

 

i did not changed it, because my original subsonic.sh is from the subsonic 4.4 standalone, and i wasnt sure if it needs any change

 

If it says earlier in this thread that it needs to be changed then I would try making that change and trying again.

Link to comment

still, I cannot figure out, why it won't start.

There must be some typo.

 

I now got it started and running by mistake.

Before, the start script always brought me:

root@Tower:~# /boot/scripts/subsonic_start.sh
Started Subsonic [PID 4781, var/subsonic/data/subsonic_sh.log]
root@Tower:~# /var/subsonic/standalone/subsonic_RAM.sh: line 114: var/subsonic/data/subsonic_sh.log: No such file or directory

 

my dirname issue at this moment is set to: cd `dirname $0`

 

I used midnight commander to look into. When I was in /var/subsonic/standalone/ I accidentially run the subsonic_RAM.sh manually.

It instantly created a new folder structure inside of this folder

/var/subsonic/standalone/var/subsonic

with data/db subfolders filled..

 

after this accident I was able to stop the process with the stopscript. (no more msg: "process not found", because now it was running)

and I could start the process again (this time without an error msg).

 

the URL now works, but I'm pretty sure it isnt ment to run inside /var/subsonic/standalone/var/subsonic, right?

 

 

Could please someone put me through this? I want to run it right ..

Link to comment

I have something weird going on and I can't figure it out myself.  Last night I accidentally unplugged my unraid server and when i started it back up I am no longer able to get to the subsonic web interface.

 

When I run the start script it is starting up and my normal address and port are responding but the web server is just responding with a directory browse listing showing WEB-INF and icons folders.

 

Part of my customization of subsonic was to copy some jsp and graphic files to/from the boot disk on shutdown/startup and so I'm wondering if that somehow screwed it up.  In general, it looks like the web server isn't deploying the normal subsonic war like it should.

 

Can anyone help me?

 

So nevermind all that - I noticed that I was running v4.3 anyway so I just used the new easy install to get the new v4.4 and everything went ALMOST perfectly.  When I rebooted my unraid server and checked the subsonic log it was saying java couldn't be found.  I took a second look at the first line of the go script and it is wrong I think.  Shouldn't it be installpkg /boot/packages_global/jre-6u20-i586-1.txz?

 

With that exception, it was SUPER-simple and everything seems to be humming along again - thank you for all the hard work that went into this.

Link to comment

flybynite,

 

Can you access subsonic from outside your network? If you can't, you need to forward port 22111 (default in ready to go package) on your router. Or go to subsonic -> settings -> network in your browser and check the box "Automatically configure your router to allow incoming connections..." to see if Subsonic can setup the port for you.

 

Did you put in the correct server address in the Android app? It's the same exact one you use to access subsonic from outside your network.

 

Nothing needs to be done on you server if subsonic is working in a browser.

Link to comment

flybynite,

 

Can you access subsonic from outside your network? If you can't, you need to forward port 22111 (default in ready to go package) on your router. Or go to subsonic -> settings -> network in your browser and check the box "Automatically configure your router to allow incoming connections..." to see if Subsonic can setup the port for you.

 

Did you put in the correct server address in the Android app? It's the same exact one you use to access subsonic from outside your network.

 

Nothing needs to be done on you server if subsonic is working in a browser.

 

Yes I can access my network from outside of my LAN.  Using this http://shawn.subsonic.org does not work.  So I tried my ddns that worked.  I had to put http://xxxxx.sytes.net:22111/subsonic.  And that worked like a charm.  I did notice in my router when I would choose auto setup port from Subsonic the forwarded ip address would be "127.0.0.1"  which is localhost, but it wasnt the port for my unRaid. 

Link to comment

No, this is not normal  ???

 

So you can get to the Subsonic login page, but you must login (as root) to unRaid to be able to get "into" subsonic? Or Subsonic isn't even being served until you login to unRaid?

 

How are you logging into unRaid? using telnet or keyboard directly on the server?

 

Did you setup some special users or file permissions? Anything in the unRaid system log?

Link to comment

No, this is not normal  ???

 

So you can get to the Subsonic login page, but you must login (as root) to unRaid to be able to get "into" subsonic? Or Subsonic isn't even being served until you login to unRaid?

 

How are you logging into unRaid? using telnet or keyboard directly on the server?

 

Did you setup some special users or file permissions? Anything in the unRaid system log?

 

I am logging into unRaid via keyboard directly connected to the server.  I just setup my unRaid several days ago (newbie).

 

Its even stranger as I experiment more.  I dont even need to login to unraid as long as I press enter a couple of time (without even logging in), then I am able to connect to subsonic.  Very strange.

 

I didnt setup any special file permissions either, I wouldn't know how to do that for linux.  Still learning.

Link to comment

Hrm, it can take a min or two for the subsonic WAR files to extract in ram depending on cpu/ram speed/thumb drive speed when the server first starts.

 

I didn't ask what version of unRaid you are using? I'm running unRaid 4.7. I have not tested subsonic on any of version 5.

 

Anything in the subsonic log (on the about page)? Anything in the server log where something is timing out trying to access some hardware?

Link to comment

Hrm, it can take a min or two for the subsonic WAR files to extract in ram depending on cpu/ram speed/thumb drive speed when the server first starts.

 

I didn't ask what version of unRaid you are using? I'm running unRaid 4.7. I have not tested subsonic on any of version 5.

 

Anything in the subsonic log (on the about page)? Anything in the server log where something is timing out trying to access some hardware?

 

I am using 4.7, now I can't connect through android at all.  But I can through web browser.  I have to login to unraid first though.

 

Link to comment

Ok I think I may have zoned in on the problem.  So before subsonic can be launched on my lan or my android phone I have to enter the "flash" folder through network on any of my Lan pc's.  Once I do that voila instantly I get access to subsonic from my phone and Lan.

 

I think some how my permission are set wrong.

Link to comment

I recently installed Subsonic,and working great (thanks!!), I currently use it to watch my movies online. Most of my movies are Blu Ray rips MKV files. ffmpeg transcode this into ASF if I'm correct. I was wondering if its possible to transcode into MP4 H264+AAC or MP3. Since MP4 gives better quality then ASF (Blocky @2000kbps) I'm still a bit new to unRAID and Linux in general so I had a few questions hoping someone can answer. ;)

 

Is it possible to install VLC Slackware editionhttp://www.videolan.org/vlc/download-slackware.html onto unRAID or any other VLC version to use for transcoding? I was reading the following thread on the Subsonic forum and was wondering if it can be used on unRAID with VLC http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=5541

 

if VLC is not an option,is it possible to use ffmpeg to convert to MP4 H264+AAC or MP3? would this indeed give better results then ASF?

Also would bitrate choosing and time seeking still be working with MP4? Thanks

Link to comment

Kapperz thanks for subsonic, I love it. 

Fixed my problem.  I think it had to do with permissions.

 

I used Joe L.'s script, added those lines to my go script and all is working fine now.

 

here are the content of his script, all I did was paste them.  Hope this helps someone with similar problems.  Here is a link to the original thread http://lime-technology.com/forum/index.php?action=;topic=3138.0

 

 

cat 70-unmenu_user_script_samba_mask

#define USER_SCRIPT_LABEL Set SAMBA File Permissions

#define USER_SCRIPT_DESCR Sets SAMBA file permissions to 0644 and directory permissions to 0755

echo "<pre>"

set -xv

sed -i -e "s/create mask = 0711/create mask = 0644/" /etc/samba/smb.shares

sed -i -e "s/directory mask = 0711/directory mask = 0755/" /etc/samba/smb.shares

smbcontrol smbd reload-config

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.