Subsonic install -- tomcat works, subsonic doesn't -- SOLVED

Need help? Post your questions here.

Moderator: moderators

Subsonic install -- tomcat works, subsonic doesn't -- SOLVED

Postby supra92 » Sun Nov 19, 2006 12:29 am

Here's the setup:

System: Dell PowerEdge 1400
OS: Fedora Core 5
Java: jre-1.5.0_09-fcs
Apache: 2.2.0-5.1.2
Tomcat: tomcat5-5.5.15-1jpp_6fc
Subsonic: 2.9 (stable)

I follow the instructions on the Subsonic download page, unzipping the Subsonic zip file and copying the subsonic.war file over to /var/lib/tomcat5/webapps/ directory. I also chown tomcat.tomcat that same .war file.

I then try to load it in a browser. Now, http://localhost:8080/ works fine, and I see the tomcat default homepage. So far so good.

But if I try to view http://localhost:8080/subsonic then the browser spins its wheels for a LONG time, nothing happening, it's like it's trying to load it but NOTHING is happening. Finally, after an eternity, it comes back with the subsonic 404 "requested resource (/subsonic) is not available" message.

I notice that the act of TRYING to load that page does, indeed, create a "subsonic" directory in the webapps directory that the .war file is in. So clearly it's getting somewhere.

I do note that /var/subsonic is NEVER made through the act of trying to load the site. I HAVE tried manually creating /var/subsonic, but I get the same result. And no log files are ever created in it.

Any ideas why subsonic is not working for me?
Last edited by supra92 on Tue Nov 21, 2006 6:29 am, edited 1 time in total.
User avatar
supra92
 
Posts: 137
Joined: Sun Nov 19, 2006 12:17 am
Location: Central Texas

Postby javacentric » Sun Nov 19, 2006 4:11 am

I'm not very sure, but try these:
- Check permission of /var/subsonic. Tomcat should be able write to this folder.
- Check tomcat's log - catalina.out for errors regarding security violations (catalina.policy)
javacentric
 
Posts: 4
Joined: Fri Nov 17, 2006 4:25 am

Postby supra92 » Sun Nov 19, 2006 4:39 am

thanks for the quick reply javacentric -- I tried your suggestions, but it is still not working, i'm sad to report :-(

I checked permissions on /var/subsonic (which I had to manually create).... and ensured that user 'tomcat' is both the owner and group owner, with 775 for the directory perms. That should cover any permissions issues for that particular dir, but no dice -- it still hangs when trying to load localhost:8080/subsonic in a browser....

As for the catalina logs, I'll paste in the interesting parts here. I shut tomcat5 down and then restarted it.


18-Nov-06 11:17:40 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime
Created MBeanServer with ID: [UID: 291168,1163910003264,-32768]:mozart.hurstwood.com:1
18-Nov-06 11:20:07 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on
the java.library.path: /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/i386
18-Nov-06 11:20:07 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
18-Nov-06 11:20:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3606 ms
18-Nov-06 11:20:08 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
18-Nov-06 11:20:08 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.15
18-Nov-06 11:20:09 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
18-Nov-06 11:20:13 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive subsonic.war
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.
18-Nov-06 11:21:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
18-Nov-06 11:21:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/subsonic] startup failed due to previous errors
18-Nov-06 11:21:33 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
18-Nov-06 11:21:33 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
18-Nov-06 11:21:39 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apac
he.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.we
bapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect U
RL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apac
he.org]]


So, I do see a subsonic startup failure in there, but not really making out WHY it's failing.... but at least it appears the error is being pinpointed.

Does this help clarify what's going on?
User avatar
supra92
 
Posts: 137
Joined: Sun Nov 19, 2006 12:17 am
Location: Central Texas

Postby sindre_mehus » Mon Nov 20, 2006 1:01 pm

If you haven't tried it already, please do the following:

1. Stop Tomcat
2. Delete <TOMCAT>/webapps/subsonic
3. Delete <TOMCAT>/work
4. Start Tomcat

Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby supra92 » Mon Nov 20, 2006 4:11 pm

Hi Sindre,

Well I tried what you suggested, removing the /webapps/subsonic and /work directories... but could not find the /work directory! I figured it didn't exist. I have been working under the assumption that /var/lib/tomcat5 is the place I should be looking at.

However, i went to look at the "other location" where the symlinks are (/usr/share/tomcat5), and saw the work directory in there. I saw the symlink there (it was not under /var/lib) and deleted it. I stopped and restarted tomcat5.

The problem now is that even http://localhost:8080 doesn't work anymore :-( Whereas before I'd get the tomcat5 startup page, now it just hangs. If I try to hit http://localhost:8080/subsonic, it also hangs and dies, but I get a browser 404 error, not the nicer tomcat 404 error.

Two things of note:

1. The /webapps/subsonic directory was successfully recreated when i tried to hit http://localhost:8080/subsonic, but I also note that the "work" directory was created under /usr/share/tomcat5, but as an actual directory, not as a symlink pointing to a different location. So when I'm in /usr/share/tomcat5, the "bin" and "work" directories are actual directories, while all the rest are symlinks.

2. I noticed that while the actual directories all the symlinks pointed to had tomcat.tomcat ownership, the symlinks themselves were root.root. So i used the "chown -h" command to change the owner of the actual symlinks themselves, in hopes that it was a symlink permissions issue. Unfortunately that is not the case.

So, it still doesn't work yet, and now the tomcat5 homepage won't come up either..... :roll: What do you think?


I still get the following errors in Catalina.out, too:

20-Nov-06 10:51:00 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive subsonic.war
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.
20-Nov-06 10:52:07 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
20-Nov-06 10:52:07 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/subsonic] startup failed due to previous errors
20-Nov-06 10:52:16 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
20-Nov-06 10:52:16 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
20-Nov-06 10:52:22 AM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apac
he.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.we
bapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect U
RL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apac
he.org]]

Cheers,
Brian
User avatar
supra92
 
Posts: 137
Joined: Sun Nov 19, 2006 12:17 am
Location: Central Texas

Postby supra92 » Mon Nov 20, 2006 4:27 pm

Correction to the above post -- http://localhost:8080 DOES still result in the tomcat default page --- it apparently took a couple of minutes to start tomcat5 up, per my logs. So the tomcat5 startup page does still work.

But I do continue to get the tomcat5 404 error (page not found) when i try to hit http://localhost:8080/subsonic.

Sorry for the confusion....

Brian
User avatar
supra92
 
Posts: 137
Joined: Sun Nov 19, 2006 12:17 am
Location: Central Texas

Postby javacentric » Mon Nov 20, 2006 5:50 pm

Is your tomcat setup using JDK 1.5? It appears to me that its pointing to an older version of java. Can you check JAVA_HOME?
javacentric
 
Posts: 4
Joined: Fri Nov 17, 2006 4:25 am

Postby Jof » Mon Nov 20, 2006 7:26 pm

It seems that you are using gcj instead of jdk:

INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on
the java.library.path: /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/i386

Check your JAVA_HOME setting.
Jof
 
Posts: 10
Joined: Mon Oct 16, 2006 6:20 pm

Postby supra92 » Tue Nov 21, 2006 1:36 am

Jof and javacentric, you hit the nail on the head, that was exactly it.

So, my JAVA_HOME in tomcat5.conf pointed to: "/usr/lib/jvm/java" -- I had checked that directory to ensure it existed and had java installed in it, and it did. Then I did an "rpm -q jre" and it shot back with the correct 1.5 Java jre, so i assumed all was well. But apparently that /usr/lib/jvm/java path is something else, some older java.

Because when i did "rpm -ql jre" to list all the installed files for JRE, everything was under "/usr/java/jre1.5.0_09"

So I changed the JAVA_HOME in the tomcat5.conf file to point to "/usr/java/jre1.5.0_09", and presto!! I get the Subsonic login page -- yeah! :D

Fantastic, I'm excited! I did notice the following errors when I started up tomcat5 service, so I'm not sure whether there's cause for concern here or not:

service tomcat5 start
Starting tomcat5: /usr/bin/rebuild-jar-repository: error: Could not find jdbc-stdext Java extension for this JVM
/usr/bin/rebuild-jar-repository: error: Could not find jndi Java extension for this JVM
/usr/bin/rebuild-jar-repository: error: Some detected jars were not found for this jvm
/usr/bin/rebuild-jar-repository: error: Could not find jaas Java extension for this JVM
/usr/bin/rebuild-jar-repository: error: Some detected jars were not found for this jvm

However, it doesn't seem to be a problem because I logged into Subsonic with "admin/admin", and the main Subsonic page loads perfectly.

Let me know if there's some modifications I need to make to eliminate the above error messages whilst starting tomcat --- otherwise, it looks like all is well!

Thanks again for the help, you guys pinpointed it exactly.

Cheers,
Brian
User avatar
supra92
 
Posts: 137
Joined: Sun Nov 19, 2006 12:17 am
Location: Central Texas


Return to Help

Who is online

Users browsing this forum: No registered users and 15 guests