Error 503 and 404 after update

Need help? Post your questions here.

Moderator: moderators

Error 503 and 404 after update

Postby Aethies » Thu Sep 16, 2010 3:54 pm

Already fixed this issue, but wanted to put this out there in case someone else ran into this problem.

I updated to 4.1 and somehow the database got corrupt. I didn't realize this until I was updating the nic with a gigabit card in the host server and when it came up, subsonic wouldn't. Logs didn't show anything, but after blowing away the /var/subsonic/db directory, it worked again. Tried to copy this directory back from a backup and it stopped running again.

The only thing I lost out of this was my users. Not sure where they are stored for backups, but I am back up and running again.

Anyway, take care and see ya on the flip side.
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 Kirk » Sun Sep 19, 2010 8:01 pm

I'd like to figure out why a few users have experienced this issue. Did you upgrade to the beta first, or straight up upgrade from 4.0.1 to 4.1?

Cheers,
Kirk
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Postby Aethies » Mon Sep 20, 2010 1:31 pm

Kirk wrote:I'd like to figure out why a few users have experienced this issue. Did you upgrade to the beta first, or straight up upgrade from 4.0.1 to 4.1?

Cheers,
Kirk


Well, here is something that I found out. What happened was this:
Was running 4.0.1 for a while. I then installed the 4.1beta, and never restarted the server. Then installed 4.1, and when the service came back up, said there was STILL a new version. Downloaded it again and re-installed it again. This time I had to restart the server to install a new NIC. When it came up, it wouldn't start up. Logs showed the database corruption.

In short, installing 4.1, removing the webapps/subsonic folder and re-applying the 4.1 seems to have caused the issue. Don't know how, don't know why. But for some reason, it happened.

I think in all of this, I may have inadvertently not stopped the tomcat6 service after the second time and applied the update WHILE the service was running, thus corrupting the database.

I don't think it is anything with the install process or subsonic.
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 yatzr » Tue Sep 21, 2010 1:31 am

I had this just happen to me. Thanks for the steps on fixing it.

Here's the error my log had when trying to start up subsonic. I don't think it holds the key as to why the database became corrupt though.

3250 [main] ERROR org.mortbay.log - Failed startup of context org.mortbay.jetty.webapp.WebAppContext@c08593{/,jar:file:/C:/Program%20Files/Subsonic/subsonic.war!/}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'podcastService' defined in ServletContext resource [/WEB-INF/applicationContext-service.xml]: Invocation of init method failed; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: error in script file line: 260 java.io.IOException: java.io.IOException: Unexpected end of command
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.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:217)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at net.sourceforge.subsonic.booter.deployer.SubsonicDeployer.deployWebApp(SubsonicDeployer.java:101)
at net.sourceforge.subsonic.booter.deployer.SubsonicDeployer.<init>(SubsonicDeployer.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
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.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at net.sourceforge.subsonic.booter.Main.<init>(Main.java:16)
at net.sourceforge.subsonic.booter.Main.main(Main.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher$1.run(Unknown Source)
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: error in script file line: 260 java.io.IOException: java.io.IOException: Unexpected end of command
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:58)
at net.sourceforge.subsonic.dao.PodcastDao.getAllChannels(PodcastDao.java:67)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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)
... 56 more
Caused by: java.sql.SQLException: error in script file line: 260 java.io.IOException: java.io.IOException: Unexpected end of command
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(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
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)
... 72 more
yatzr
 
Posts: 9
Joined: Tue Aug 17, 2010 4:33 pm

Postby yatzr » Tue Sep 21, 2010 1:41 pm

I should mention one thing I did right before my database became corrupt. I keep all my music on its own harddrive and I had booted up the computer without that harddrive connected a few times. Subsonic started automatically those times, but I never opened a client (I was troubleshooting a different harddrive which is why I had disconnected the music harddrive). Once I was done, I connected the music harddrive again. After I booted up, I tried accessing subsonic and I got a 503 due to the corrupt database.
yatzr
 
Posts: 9
Joined: Tue Aug 17, 2010 4:33 pm

Same trouble with 4.1 and java error

Postby ericnyoder » Wed Sep 22, 2010 3:22 pm

I tried to delete the directory, but it is not there on the machine. I have attempted the upgrade on 2 separate machines (mac mini running 10.5.8 - intel on both) - Neither has this directory /var/subsonic/db databse

Can you provide with a little more assistance. Thanks.
ericnyoder
 
Posts: 4
Joined: Wed Sep 22, 2010 3:19 pm

4.1 issue with Java

Postby ericnyoder » Thu Sep 23, 2010 11:49 am

BTW - I discovered this only happens with 4.1 - I went back to 4.0.1 and its working fine now. Strange. On mac 10.5.8 with newest Java installed.
ericnyoder
 
Posts: 4
Joined: Wed Sep 22, 2010 3:19 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 54 guests