Page 1 of 1

Ubuntu 10.04 help needed

PostPosted: Mon Mar 29, 2010 1:46 pm
by TuckLive
I'm testing Subsonic on 10.04 beta. I did the WAR installation on a fresh Ubuntu Server install. I was able to access subsonic and login after this.

After I did a reboot to the system I could not access Subsonic anymore. I get the 404 "The requested resource () is not available" error. I checked tomcat6 security and it is off now by default.

So I'm thinking I need a startup script? Can anybody tell me what you have done?

PostPosted: Mon Mar 29, 2010 9:16 pm
by ootuoyetahi
Could be a few things - Off the bat though I would guess Subsonic isnt running. You can check it with ps aux | grep subsonic

What is the output of that?

Yes, you will probably need a start up script. For that you should see this thread:

http://forum.subsonic.org/forum/viewtopic.php?t=1318

PostPosted: Tue Mar 30, 2010 9:41 am
by TuckLive
The outcome of ps aux | grep subsonic is

tucklive 857 0.0 0.1 3224 796 tty1 S+ 04:30 0:00 grep --color=auto subsonic

The thread you linked refers to the standalone which has a subsonic.sh script. I'm using the WAR installation, which does not have a subsonic.sh script under /var/subsonic.

When I was using Subsonic on Ubuntu 7.10 I had to enter the following after a reboot:

export JAVA_HOME=/usr/local/jrex.x.x
export PATH=$PATH:$JAVA_HOME/bin

Now with 10.04 which installs Tomcat if you choose during initial installation it appears in the tomcat6 init script to be already configured to the paths. This is why I'm confused.

PostPosted: Tue Mar 30, 2010 2:11 pm
by TuckLive
I don't have any error messages in subsonic.log, but here are the logs from catalina.out.

Mar 30, 2010 7:50:51 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-$
Mar 30, 2010 7:50:52 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 30, 2010 7:50:52 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1199 ms
Mar 30, 2010 7:50:52 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 30, 2010 7:50:52 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
Mar 30, 2010 7:50:52 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Mar 30, 2010 7:50:52 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Mar 30, 2010 7:50:52 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor examples.xml
Mar 30, 2010 7:50:52 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor docs.xml
Mar 30, 2010 7:50:52 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Mar 30, 2010 7:50:52 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive subsonic.war
Mar 30, 2010 7:50:54 AM net.sf.ehcache.Cache initialise
WARNING: Cache: musicFolderCache has a maxElementsInMemory of 0. It is strongly recommended to have a maximumSize of at least 1. Performance is halved by not using a M$
Mar 30, 2010 7:50:54 AM net.sf.ehcache.Cache initialise
WARNING: Cache: chatCache has a maxElementsInMemory of 0. It is strongly recommended to have a maximumSize of at least 1. Performance is halved by not using a MemorySt$
[2010-03-30 07:50:54,821] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'podcastService' defined in ServletContext resource [/WEB-INF/applicationContext$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: User not found: SA
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:577)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:710)
at net.sourceforge.subsonic.dao.AbstractDao.query(AbstractDao.java:40)
at net.sourceforge.subsonic.dao.PodcastDao.getAllChannels(PodcastDao.java:49)
at net.sourceforge.subsonic.service.PodcastService.getAllChannels(PodcastService.java:167)
at net.sourceforge.subsonic.service.PodcastService.init(PodcastService.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 39 more
Caused by: java.sql.SQLException: User not found: SA
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:620)
at java.sql.DriverManager.getConnection(DriverManager.java:169)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:174)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:165)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
... 55 more
Mar 30, 2010 7:50:54 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Mar 30, 2010 7:50:54 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/subsonic] startup failed due to previous errors
Mar 30, 2010 7:50:54 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: A web application registered the JBDC driver [org.hsqldb.jdbcDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak$
Mar 30, 2010 7:50:54 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [HSQLDB Timer @126d3df] but has failed to stop it. This is very likely to create a memory leak.
Mar 30, 2010 7:50:54 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
Mar 30, 2010 7:50:54 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [pool-1-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Mar 30, 2010 7:50:54 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [pool-1-thread-2] but has failed to stop it. This is very likely to create a memory leak.
Mar 30, 2010 7:50:54 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

PostPosted: Fri Apr 02, 2010 6:45 am
by sindre_mehus
To me it looks like the Subsonic database is broken. You could try to delete (or rename) /var/subsonic/db and see if that helps.

PostPosted: Fri Apr 02, 2010 1:48 pm
by TuckLive
Edited earlier post

I removed the db folder from /var/subsonic. I then restarted tomcat6 and Subsonic did come back up. I noticed though that Subsonic breaks whenever I shut the server down completely and not on a reboot like I first thought. So now I am wondering if this is a bug with Subsonic? I don't want to add my users back every time the server shuts down.

PostPosted: Sat Apr 03, 2010 8:08 pm
by sindre_mehus
I've never had this error reported before, so it's likely to be specific to your setup.

I would recommend trying the .deb installer. If that works when shutting down the server, the error is most likely related to the Tomcat installation.

PostPosted: Sun May 09, 2010 10:03 am
by serond
TuckLive wrote:Edited earlier post

I removed the db folder from /var/subsonic. I then restarted tomcat6 and Subsonic did come back up. I noticed though that Subsonic breaks whenever I shut the server down completely and not on a reboot like I first thought. So now I am wondering if this is a bug with Subsonic? I don't want to add my users back every time the server shuts down.


I had the same thing on ubuntu 10.4.

worked better when i deleted TOMCAT_HOME/work (everything in /var/cache/tomcat6/ on ubuntu).