Subsonic install on Tomcat 5.5 running on Linux Debian 4.0

Need help? Post your questions here.

Moderator: moderators

Subsonic install on Tomcat 5.5 running on Linux Debian 4.0

Postby barretta » Fri Jan 01, 2010 5:35 am

After successfully grappling with a Tomcat install and java upgrade on a private Remote Server running on debian 4.0 (I'm used to Mac OS), I am now very close to getting subsonic to run off the .war file. There are still a few things completely baffling me:

1) I've created the subsonic directory in the var folder but I can't change the ownership. Everytime I run the command:

chown tomcat:tomcat /var/subsonic

I get:

chown: `tomcat:tomcat': invalid user

2)Is there a difference between moving the .war file into the webapps folder and uploading and deploying the .war file via the tomcat admin application (http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html)? I tried both options and neither work. (I also noticed that I have a tomcat5.5-webapps directory outside my root and a TOMCAT_HOME/server/webapps folder, but not a TOMCAT_HOME/webapps folder. Where exactly should subsonic go?)

3) Why does the TOMCAT_HOME/work folder need to be removed before the subsonic install?

I get the feeling that there's some messy file permissions/confusions going on with my whole setup. I looked at the tomcat logs and they seem to show no record of any subsonic activity at all. Just lots of stops and restarts.

Any help here would very much appreciated!
barretta
 
Posts: 21
Joined: Thu Dec 31, 2009 2:02 am

Re: Subsonic install on Tomcat 5.5 running on Linux Debian 4

Postby Aethies » Fri Jan 01, 2010 4:10 pm

barretta wrote:1) I've created the subsonic directory in the var folder but I can't change the ownership. Everytime I run the command:

chown tomcat:tomcat /var/subsonic


I get:

chown: `tomcat:tomcat': invalid user




That is because the default user is tomcat5.5. What I have done is changed that folder to tomcat5.5:nogroup

Code: Select all
chown tomcat5.5:nogroup /var/subsonic


When I recently rebuilt my server, I had forgotten that tomcat will NOT create this folder and subsonic seems to not do anything, in the logs or otherwise, until that /var/subsonic is created with writable permissions for tomcat.

2)Is there a difference between moving the .war file into the webapps folder and uploading and deploying the .war file via the tomcat admin application (http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html)? I tried both options and neither work. (I also noticed that I have a tomcat5.5-webapps directory outside my root and a TOMCAT_HOME/server/webapps folder, but not a TOMCAT_HOME/webapps folder. Where exactly should subsonic go?)



Sorry.. Never tried that one. Will leave that question for someone else.

3) Why does the TOMCAT_HOME/work folder need to be removed before the subsonic install?


I would think it is working like a temp directory in windows and if there are residual files in there from previous versions, you don't want that getting in the way of any new versions.

Anyway, I hope this helps!
Aethies

Ubuntu Server 12.04
===================
3,281 artists
9,432 albums
113,608 songs
2636.09 GB (10,769 hours)
===================
User avatar
Aethies
 
Posts: 197
Joined: Fri Oct 24, 2008 4:33 pm

chown errors

Postby barretta » Sat Jan 02, 2010 4:22 pm

Hmm... I keep getting the same invalid user error, even when I try 'tomcat5.5:nogroup' and other combinations. Would it also work if I changed the permissions on the folder? How does it know whether the user I enter is invalid or not? Where is this being checked?
barretta
 
Posts: 21
Joined: Thu Dec 31, 2009 2:02 am

chown errors

Postby barretta » Sat Jan 02, 2010 4:41 pm

OK. for me the right incantation was 'tomcat55:nogroup.' I checked the list of valid users in /etc/passwd. :wink:
barretta
 
Posts: 21
Joined: Thu Dec 31, 2009 2:02 am

Postby barretta » Sat Jan 02, 2010 5:54 pm

But even with the ownership set I still cannot get subsonic to run. I tried dropping the .war file in each webapps folder and I still get no activity. also, nothing showing up on the logs either. wondering what else I should try...
barretta
 
Posts: 21
Joined: Thu Dec 31, 2009 2:02 am

Postby barretta » Sat Jan 02, 2010 6:39 pm

Ok found these errors in the logs:

INFO: Deploying web application archive subsonic.war
Jan 2, 2010 10:13:41 AM org.apache.commons.modeler.Registry registerComponent
SEVERE: Error registering Catalina:type=Valve,name=StandardContextValve,path=/subsonic,host=localhost
javax.management.MBeanException: Cannot instantiate ModelMBean of class org.apache.commons.modeler.BaseModelMBean


...

Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/subsonic/WEB-INF/classes/logging.properties read)


...

I'm also getting a lot more errors on tomcat startup and stop after deleting the TOMCAT_HOME/work folder
barretta
 
Posts: 21
Joined: Thu Dec 31, 2009 2:02 am

Postby Aethies » Sun Jan 03, 2010 8:33 pm

barretta wrote:Ok found these errors in the logs:

INFO: Deploying web application archive subsonic.war
Jan 2, 2010 10:13:41 AM org.apache.commons.modeler.Registry registerComponent
SEVERE: Error registering Catalina:type=Valve,name=StandardContextValve,path=/subsonic,host=localhost
javax.management.MBeanException: Cannot instantiate ModelMBean of class org.apache.commons.modeler.BaseModelMBean


...

Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/subsonic/WEB-INF/classes/logging.properties read)


...

I'm also getting a lot more errors on tomcat startup and stop after deleting the TOMCAT_HOME/work folder


Sorry for the delay in getting back to you. One thing I forgot to ask, what java did you install?

You need to make sure you install sun-java6-jre and sun-java6-jdk
Code: Select all
sudo apt-get install sun-java6-jdk sun-java6-jre


If you already did this, then I am not sure.

Should look over this link for more info:

http://ubuntuforums.org/showthread.php?t=920178
Aethies

Ubuntu Server 12.04
===================
3,281 artists
9,432 albums
113,608 songs
2636.09 GB (10,769 hours)
===================
User avatar
Aethies
 
Posts: 197
Joined: Fri Oct 24, 2008 4:33 pm

Postby barretta » Mon Jan 04, 2010 5:29 am

Thanks for the response! Wish I would have seen that thread a while back! One of the things that was confusing me was the tomcat5.5-webapps package that I had installed initially. I purge-removed all the tomcat packages and started fresh with just the main tomcat5.5 and admin packages. I took off the security settings, chown'ed the /var/subsonic directory and also had to modify the file “/etc/tomcat5.5/policy.d/04webapps.policy”:
(http://www.debianadmin.com/how-to-setup-apache-tomcat-55-on-debian-etch.html)

It was all a very nasty process but it works! In the end tho, I'm not too satisfied with how much resources the Tomcat servlet is using on my remote server - seems to be quite a bit of memory leakage. Oh well...maybe I should try tomcat6?
barretta
 
Posts: 21
Joined: Thu Dec 31, 2009 2:02 am

Tomcat problem

Postby ov3r0n » Sat Feb 13, 2010 3:26 pm

After fighting with the standalone version, i've moved to the war version, using tomcat6, ubuntu 9.10 and subsonic 3.9.

From the tomcat manager I upload the war file and subsonic app appears on the list of available apps.
When I try to start subsonic from tomcat manager, it sais:

FAILURE - Failed to start the application at context path /subsonic

Any ideas?

Thanks in advance!
ov3r0n
 
Posts: 3
Joined: Sat Feb 13, 2010 1:37 pm

[SOLVED] Tomcat problem

Postby ov3r0n » Sat Feb 13, 2010 3:39 pm

Changed TOMCAT_SECURITY from yes to no on /etc/init.d/tomcat6
and restarted tomcat.

That's all
ov3r0n
 
Posts: 3
Joined: Sat Feb 13, 2010 1:37 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 25 guests