Page 1 of 1

Windows Service shuts down after about 30 seconds

PostPosted: Wed Feb 25, 2015 11:55 am
by chit112
Hi All,

I am a happy long time user of Serviio Pro, but after the recent upgrade to 1.5.1 on my Windows Home Server 2008 box, I am experiencing that the Serviio service shuts down shortly after being started automatically at boot, and the same happens when I try to start it manually. The log shows the following:

2015-02-25 12:48:34,828 INFO [MediaServer] ------------------------------------------------------------------------
2015-02-25 12:48:34,843 INFO [MediaServer] Serviio DLNA media streaming server v 1.5.1 (rev. 9d3f18af690f)
2015-02-25 12:48:34,843 INFO [MediaServer] Petr Nejedly 2009-2015
2015-02-25 12:48:34,843 INFO [MediaServer] http://www.serviio.org
2015-02-25 12:48:34,843 INFO [MediaServer]
2015-02-25 12:48:34,843 INFO [MediaServer] Java 1.8.0_31-Oracle Corporation x86
2015-02-25 12:48:34,843 INFO [MediaServer] OS Windows 2003 5.2
2015-02-25 12:48:34,843 INFO [MediaServer] File encoding: windows-1252
2015-02-25 12:48:34,859 INFO [MediaServer] Headless mode enabled: true
2015-02-25 12:48:34,859 INFO [MediaServer] User: SYSTEM
2015-02-25 12:48:34,859 INFO [MediaServer] User home dir: C:\WINDOWS\system32\config\systemprofile
2015-02-25 12:48:34,859 INFO [MediaServer] Temp dir: C:\WINDOWS\TEMP\
2015-02-25 12:48:34,859 INFO [MediaServer] ------------------------------------------------------------------------
2015-02-25 12:48:36,671 INFO [WebServer] Socket buffer set to 65535 bytes
2015-02-25 12:48:36,687 INFO [RestletServer] Starting Restlet server (/rest) exposed on port 23423
2015-02-25 12:48:38,265 INFO [RestletServer] Starting Restlet server (/cds) exposed on port 23424
2015-02-25 12:48:38,265 INFO [RestletServer] Starting Restlet server (/mediabrowser) exposed on port 23424
2015-02-25 12:48:38,406 INFO [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2015-02-25 12:48:38,531 INFO [DatabaseManager] Using DERBY database language
2015-02-25 12:48:42,765 WARN [DBConnectionPool] Can't create a new connection for jdbc:derby:db;create=true
java.sql.SQLException: Failed to start database 'db' with class loader sun.misc.Launcher$AppClassLoader@387f44, see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at org.serviio.db.DBConnectionPool.newConnection(DBConnetionPool.java:186)
at org.serviio.db.DBConnectionPool.getConnection(DBConnetionPool.java:123)
at org.serviio.db.DBConnectionPool.getConnection(DBConnetionPool.java:149)
at org.serviio.db.DatabaseManager.getConnection(DatabaseManager.java:71)
at org.serviio.db.DatabaseManager.getConnection(DatabaseManager.java:64)
at org.serviio.update.dao.DBLogDAOImpl.isScriptPresent(DBLogDAOImpl.java:49)
at org.serviio.update.DBSchemaUpdateExecutor.updateDBSchema(DBSchemaUpdateExecutor.java:77)
at org.serviio.MediaServer.main(MediaServer.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher$2.run(Unknown Source)
Caused by: ERROR XJ040: Failed to start database 'db' with class loader sun.misc.Launcher$AppClassLoader@387f44, see the next exception for details.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 25 more
Caused by: ERROR XSLAO: Recovery failed unexpected problem: Log record is Not first but transaction is not in transaction table : 747213675.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.store.raw.log.FileLogger.redo(Unknown Source)
at org.apache.derby.impl.store.raw.log.LogToFile.recover(Unknown Source)
at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
... 22 more
2015-02-25 12:48:45,015 ERROR [MediaServer] An unexpected error occured. Ending the application. Message: null
java.lang.NullPointerException
at org.serviio.update.dao.DBLogDAOImpl.isScriptPresent(DBLogDAOImpl.java:50)
at org.serviio.update.DBSchemaUpdateExecutor.updateDBSchema(DBSchemaUpdateExecutor.java:77)
at org.serviio.MediaServer.main(MediaServer.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher$2.run(Unknown Source)


I really have no idea what could be causing this, so I hope someone on this forum might be able to point me in the right direction.

Re: Windows Service shuts down after about 30 seconds

PostPosted: Wed Feb 25, 2015 1:25 pm
by atc98092
It appears there's something wrong with the database. Serviio can't make a connection, so shuts down. This can happen for unknown reasons (with any sort of DB, not just what Serviio uses), and it's usually difficult to fix without detailed database knowledge.

I'm running 1.5.1 with no issues, so I recommend you uninstall then reinstall Serviio. If you have custom profile edits save the profile file first, and if you're using plug-ins make sure you save them as well (or grab the latest versions).