Created 10-04-2018 11:32 PM
while starting hst server i'm getting following error.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px} span.s1 {font-variant-ligatures: no-common-ligatures}
root@xxxx:~# hst start
Upgrading database...
SmartSense Server is not running
Failed to upgrade server.Please try again or for more details refer tofile /var/log/hst/hst-server.out
root@xxx:~# vim /var/log/hst/hst-server.out
Thu Oct 04 15:43:07 PDT 2018 Thread[main,5,main] java.io.FileNotFoundException: derby.log (Permission denied)
Thu Oct 04 15:43:07 PDT 2018 Thread[main,5,main] Cleanup action starting
java.sql.SQLException: Failed to start database '/var/lib/smartsense/hst-server/hstDB' with class loader sun.misc.Launcher$AppClassLoader@7291c18f, see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(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.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(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 com.hortonworks.support.tools.server.upgrade.orm.DBAccessorImpl.newConnection(DBAccessorImpl.java:73)
at com.hortonworks.support.tools.server.upgrade.orm.DBAccessorImpl.connect(DBAccessorImpl.java:92)
at com.hortonworks.support.tools.server.upgrade.UpgradeManager.initDatabase(UpgradeManager.java:83)
at com.hortonworks.support.tools.server.upgrade.UpgradeManager.run(UpgradeManager.java:47)
at com.hortonworks.support.tools.server.upgrade.UpgradeManager.main(UpgradeManager.java:219)
Caused by: java.sql.SQLException: Failed to start database '/var/lib/smartsense/hst-server/hstDB' with class loader sun.misc.Launcher$AppClassLoader@7291c18f, see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 17 more
Caused by: java.sql.SQLException: Another instance of Derby may have already booted the database /var/lib/smartsense/hst-server/hstDB.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
... 14 more
Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database /var/lib/smartsense/hst-server/hstDB.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSLockOnDB(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockOnDB(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.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.iapi.services.monitor.Monitor.bootServiceModule(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.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.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)
Created 10-04-2018 11:41 PM
As we see the error:
Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database /var/lib/smartsense/hst-server/hstDB.
.
Which can happen sometimes if the previously running HST process is not stopped properly and we are still trying to start HST.
So please try running the following command to findout if the HST instance is actually down?
# ps -ef | grep hst
If you see that any PID is being shown in the output of the above command then kill it. Then try to start the HST again.
# kill -9 $PID_FROM_ABOVE_COMMAND # hst start
.