Page 1 of 1
subsonic.properties is cleared during reboot

Posted:
Wed Jul 14, 2010 1:19 pm
by sofisten
Hi,
I've been running Subsonic a couple of years on Windows, but have now installed it on a QNAP TS509, with Java and Apache Tomcat. I then deployed the war-package, with reboot between each component. The installation went fine, and I configured Subsonic.
When I reboot the QNAP the subsonic.properties, located in the \var\subsonic folder gets cleared. This means that all config is lost. I've tried to change security properties on the \var\subsonic folder. These proberties also get's reverted during reboot.
I'm not to good on linux and apache, and would really appreciate some help, please.
Regards, Stig

Posted:
Wed Jul 14, 2010 2:06 pm
by delcypher
Are you sure that 'subsonic.properties' is ever successfully written to?
You need to make sure that the files in /var/subsonic/ have the correct file permissions else subsonic won't be able to write to it.
If you're new to file permissions it's likely that the owner and group of the /var/subsonic folder is root. You should make the owner and group that of the user that runs subsonic.
You can check the current permissions by running
- Code: Select all
ls -l /var/subsonic/
- Code: Select all
ls -ld /var/subsonic
If you wish to change the ownership of the /var/subsonic directory and all its contents then run the following as root.
- Code: Select all
chown -R username: /var/subsonic
A quick'n' dirty guide to file permissions can be found here
http://www.linuxquestions.org/linux/answers/Security/Quick_and_Dirty_Guide_to_Linux_File_Permissions
I've not used Apache Tomcat but you probably need to make the /var/subsonic owner and group the user & group used by Apache Tomcat. See
http://www.mulesoft.com/tomcat-linux
I hope this helps a little?

Posted:
Wed Jul 14, 2010 2:31 pm
by sofisten
Hi, thanks for the quick reply!
I installed Java and Apache Tomcat from the QNAP Management GUI, and deployed the war package from Tomcat Management GUI. During installation QNAP creates a tomcat user and group on the NAS.
When I look into the NAS with WinSCP (Secure FTP Client) the owner of all files and folders under /var/subsonic is "tomcat" and group "tomcat", with properties "644". I would suppose that "tomcat" is the user that's running the subsonic service on the NAS.
When i configure subsonic I open the subsonic.properties, and can see that changes are written in the file, and it has a new time-stamp.
Could it be an option to move the /var/subsonic folder to anoter location, if so how can i do this?
// Stig
Is it possible to move the /var/subsonic folder?

Posted:
Wed Jul 21, 2010 8:28 am
by sofisten
Is it possible to move the /var/subsonic folder to another location? Then I can move the subsonic.properties, db- and transcode files to a location which is not cleared during reboot?
Any tips on how to move the /var/subsonic to anoter location?
// Stig

Posted:
Wed Jul 21, 2010 3:47 pm
by mgrant
set subsonic.home.
If you're running the standalone (as I am), you can simply modify subsonic.sh or run it with --home=/some/other/path
If you're running the Debian/Ubuntu version, edit the SUBSONIC_ARGS variable in /etc/default/subsonic
If you're running it under tomcat, modify the JAVA_OPTS variable in /etc/default/tomcat to include "-Dsubsonic.home=/some/other/path". Or you modify /etc/tomcat6/catalina.properties and add a line "subsonic.home=/some/other/path"
-mg

Posted:
Wed Jul 21, 2010 7:37 pm
by jrh.koenig
Hi,
I am a QNAP User too. The problem is that /var is lying on a ramdisk.
So I create a directory subsonic under /share/MD0_DATA, where the physical disk are mounted. Then I create a Link /var/subsonic to /share/MD0_DATA/subsonic. This will happen by a little script subsonic.sh
#!/bin/sh
if [ ! -d /var/subsonic ]; then
ln -s /share/MD0_DATA/subsonic /var/subsonic
fi
This Script will call by the Startscript from tomcat.
/etc/init.d/tomcat.sh
...
/share/MD0_DATA/subsonic/subsonic.sh &
LC_ALL=en_US.UTF-8
export LC_ALL
The LC_ALL is needed if you have bands, songs with german umlaute like Mötorhead or Mötley Crüe.
I hope it helps.
Johannes
QNAP TS-239

Posted:
Sat Oct 02, 2010 4:40 pm
by zekebgaf@gmail.com
<<EDIT: Problem is sorted out. I had created the link to \share\HDA_DATA\subsonic\var\subsonic instead of to \share\HDA_DATA\subsonic>>
I've got a QNAP TS-239 Pro-II and have been trying to use sofisten's advice.
However, when I try to start Subsonic in Tomcat Manager I get:
"FAIL - Application at context path /subsonic could not be started"
I have a soft link set up for var/subsonic
to
/share/HDA_DATA/subsonic <<corrected>>
and have placed the files originally found in /var/subsonic in that folder.
I have also edited the /share/HDA_DATA/.qpkg/Tomcat/tomcat.sh as suggested and have also added the subsonic.sh script to /share/HDA_DATA/subsonic directory.
Any thoughts? Is there a log file I can look at? Any help greatly appreciated!
-Zeke
How to move the subsonic.properties file

Posted:
Sat Nov 06, 2010 8:03 am
by sofisten
I added a comment to this in the QNAP Turtorial November 06 2010.
http://forum.subsonic.org/forum/viewtopic.php?t=1851&highlight=