Installing Subsonic on unRAID


Recommended Posts

  • Replies 194
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Kryspy, you created or edited the file on a Windows system. You need to use a unix-friendly editor. One that does not put in stray "^M" (dos style carriage returns).

 

UNIX uses newline, DOS/Windows uses newline + carriage return.

 

To fix this script, you can use:

 

fromdos < /boot/scripts/subsonic_start.sh > /boot/scripts/subsonic_start.fixed
mv /boot/scripts/subsonic_start.fixed /boot/scripts/subsonic_start.sh

 

 

 

Link to comment

Okay so now I redid the setup and just replaced the subsonic/standalone drirectory and re-edited the file using metapad and made sure it saved as a UNIX style code.    Now I get this error.   By the way how come I can't see a /var directory on  my flash.   Am I missing something or is because I am looking at it in Windows?   I am going to Ubuntu 10.10 tomorrow.

 

 

Kryspy

new_error.png.64a65cc8c120af5c40595b0cd1610654.png

Link to comment

I didn't edit the file.   I simply used the stock one supplied by the person who got this set up for unRAID

 

 

Here is the script:

 

#!/bin/bash

##########################

# /var/subsonic/data

##########################

DIRFROM="/boot/subsonic/data"

DIRTO="/var/subsonic/data"

 

if [ ! -d $DIRTO ]

then

echo "### Create Subsonic Data Directory ###"

mkdir -p $DIRTO

 

echo "### Clear Flash thumbs ###"

rm -R -f $DIRFROM/thumbs/*

 

echo "### Copy Subsonic Data files ###"

cp -R $DIRFROM/* $DIRTO/

 

echo "### Create Encoder Symlinks ###"

LIBS="/var/subsonic/data/transcode/usr-lib/"

for i in $LIBS*

do

echo $i

ln -s -f $i -t "/usr/lib"

done

 

sleep 3

fi

 

 

##########################

# /var/subsonic/standalone

##########################

DIRFROM="/boot/subsonic/standalone"

DIRTO="/var/subsonic/standalone"

 

if [ ! -d $DIRTO ]

then

echo "### Create Subsonic Data Directory ###"

mkdir -p $DIRTO

 

echo "### Copy Subsonic Standalone files ###"

cp -R $DIRFROM/* $DIRTO/

 

sleep 3

fi

 

##########################

# /tmp/subsonic

##########################

DIRFROM="/boot/subsonic/tmp-subsonic-ehcache"

DIRTO="/tmp/subsonic/ehcache"

 

if [ ! -d $DIRTO ]

then

echo "### Create Subsonic tmp Directory ###"

mkdir -p $DIRTO

 

echo "### Copy Subsonic ehcache files ###"

cp -R $DIRFROM/* $DIRTO/

 

sleep 3

fi

 

##########################

# Run Subsonic - RAM.

##########################

cp /boot/scripts/subsonic_delete_thumbs_ram.sh /etc/cron.hourly/

/var/subsonic/standalone/subsonic_RAM.sh

 

 

 

 

Kryspy

Link to comment

Any chance of having a package for unmenu by Wednesday?

 

Highly doubtful, unless he has already started creating one.  A package of that size takes a while to make and just as long (if not longer) to test.  I have been working on a Transmission package for the better part of 2 weeks now.  Granted I have been busy and not dedicating all my time to it, but I am hoping to have it done come next week.

 

On a side note: They are not that hard to create if there are already instructions to follow.  You can try creating one yourself.  Just look through the other unmenu.conf packages for an idea of what they are doing and if you have questions send a PM off to someone (I will try to answer as best I can and in a timely manner... can't promise anything though).

Link to comment

Any chance of having a package for unmenu by Wednesday?

Very slim chance.  (almost zero actually)

 

I started on a package the other night.  It has none of the extra features needed to make it friendly.  It just downloads and does the basic install.   It does not yet download the additional codecs.

 

When I tried it on my older server it quickly used up all available memory and basically crashed my server.  It only has 512Meg of ram.    I never got to where it could see its web-page.

 

Here is what I had gotten to so far.

Create a file named

subsonic-unmenu-package.conf

put it in your /boot/packages directory.

 

In it put these lines.  use an editor that does not add carriage returns to the ends of the lines:

PACKAGE_NAME SubSonic
PACKAGE_DESCR <u>Audio Streaming</u><br/>

# the Subsonic standalone server files
PACKAGE_URL http://prdownloads.sourceforge.net/subsonic/subsonic-4.1-standalone.tar.gz
PACKAGE_FILE subsonic-4.1-standalone.tar.gz
PACKAGE_MD5 02691c54d914cefb4a43c159be432871

# the Java run-time environment
PACKAGE_EXTRA_URL http://slackware.cs.utah.edu/pub/slackware/slackware-12.2/slackware/l/jre-6u11-i586-1.tgz
PACKAGE_EXTRA_FILE jre-6u11-i586-1.tgz
PACKAGE_EXTRA_MD5 ec548608da146865a8a86dbdc209c587

PACKAGE_INSTALLED /var/log/subsonic
PACKAGE_DEPENDENCIES Java Run-time and additional plugin modules for encoding

PACKAGE_INSTALLATION gunzip subsonic-4.1-standalone.tar.gz
PACKAGE_INSTALLATION mkdir -p /var/subsonic/standalone
PACKAGE_INSTALLATION tar -C /var/subsonic/standalone -xvf subsonic-4.1-standalone.tar
PACKAGE_INSTALLATION echo "Version: 4.1" >/var/log/subsonic
# If Java Run-Time is not already installed, install it.
PACKAGE_INSTALLATION test ! -f /usr/lib/java/bin/java && installpkg "${PACKAGE_DIRECTORY}"/jre-6u11-i586-1.tgz

PACKAGE_VERSION_TEST grep "Version:" /var/log/subsonic | awk '{print $2}'
PACKAGE_VERSION_STRING 4.1
PACKAGE_MEMORY_USAGE Heavy

 

Link to comment

I recently installed subsonic 3.9 on my unRaid 4.5.6 by following your great tutorial. Unfortunately, I'm running into some problems trying to get FLAC transcoding to work. Originally subsonic wouldn't even try to play the flac files with transcoding on or off. When I switched the max-bitrate off of No-limit I then started to hear static when playing FLAC files. Looking in the log files I see tons of errors similiar to what you see below. Do you have any ideas?

 

WARN EntaggedParser - Error when parsing tags in SOMEFLACFILE.flac

entagged.audioformats.exceptions.CannotReadException: "SOMEFLACFILE" :entagged.audioformats.exceptions.CannotReadException: fLaC Header not found

at entagged.audioformats.generic.AudioFileReader.read(Unknown Source)

at entagged.audioformats.AudioFileIO.readFile(Unknown Source)

at entagged.audioformats.AudioFileIO.read(Unknown Source)

at net.sourceforge.subsonic.domain.EntaggedParser.getRawMetaData(EntaggedParser.java:61)

at net.sourceforge.subsonic.domain.MetaDataParser.getMetaData(MetaDataParser.java:42)

at net.sourceforge.subsonic.domain.MusicFile.getMetaData(MusicFile.java:230)

at net.sourceforge.subsonic.domain.MusicFile$MusicFileSorter.compare(MusicFile.java:613)

at net.sourceforge.subsonic.domain.MusicFile$MusicFileSorter.compare(MusicFile.java:597)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.mergeSort(Unknown Source)

at java.util.Arrays.sort(Unknown Source)

at java.util.Collections.sort(Unknown Source)

at net.sourceforge.subsonic.domain.MusicFile.getChildren(MusicFile.java:292)

at net.sourceforge.subsonic.controller.MainController.handleRequestInternal(MainController.java:82)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)

at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)

at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)

at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:313)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

Caused by: entagged.audioformats.exceptions.CannotReadException: fLaC Header not found

at entagged.audioformats.flac.util.FlacInfoReader.read(Unknown Source)

at entagged.audioformats.flac.FlacFileReader.getEncodingInfo(Unknown Source)

... 75 more

Link to comment
  • 2 weeks later...

Okay, so I have 4.1 working now. 

 

To solve the  dirname: missing operand

                  Try `dirname --help' for more information.

 

 

Solved it by:

 

cd $(dirname $0)

if [ -e /bin/readlink ] || [ -e /usr/bin/readlink ]; then

    cd $(dirname $(readlink -f $0))

fi

 

 

and reboot.

 

Kryspy

Link to comment

I had to do as Kryspy in order to get it to run as well.

 

Additionally I needed to edit the command that was starting it and add -Djava.awt.headless=true \ in order to get my album artwork to show up.

cd `dirname $0`

${JAVA} -Xmx${SUBSONIC_MAX_MEMORY}m \
  -Djava.awt.headless=true \
  -Dsubsonic.home=${SUBSONIC_HOME} \
  -Dsubsonic.host=${SUBSONIC_HOST} \
  -Dsubsonic.port=${SUBSONIC_PORT} \
  -Dsubsonic.contextPath=${SUBSONIC_CONTEXT_PATH} \
  -Dsubsonic.defaultMusicFolder=${SUBSONIC_DEFAULT_MUSIC_FOLDER} \
  -Dsubsonic.defaultPodcastFolder=${SUBSONIC_DEFAULT_PODCAST_FOLDER} \
  -Dsubsonic.defaultPlaylistFolder=${SUBSONIC_DEFAULT_PLAYLIST_FOLDER} \
  -jar subsonic-booter-jar-with-dependencies.jar > ${LOG} 2>&1 &

 

Link to comment

Hey, sorry I have not been keeping up on this thread. The tutorial is meant to be a guide when I was starting out learning unRaid/Linux. Subsonic was a MUST have and I looked into running it on unRaid even before ordering parts.

 

I'm glad everyone likes it. Let me know if I need to adjust anything in the instructions.

 

Kryspy, You can always run the the script to copy the subsonic DB to your persistent memory location (eg USB).

 

My Subsonic install is pretty much the same as the instructions except I moved a few tasks around. All is working well on SS v4.1 currently.

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.