on 2016 Dec 28 7:01 PM
I am trying to force kill the hybris server through a Jenkins pipeline. Below is the script that I am using:
node {
stage 'ServerStop'
echo 'Stop the server if previously running'
bat '''call D:\\path_to_hybris\\hybris\\bin\\platform\\hybrisserver.bat stop
EXIT /B 0'''
stage 'Checkout'
echo 'Checkout related script'
stage 'Build'
echo 'Build script here'
stage 'ServerStart'
bat '''start D:\\path_to_hybris\\hybris\\bin\\platform\\hybrisserver.bat
'''}
I have added the following command in the hybrisserver.bat to force kill hybris server:
.....
IF "%1"=="stop" (
for /f %%p in (D:\path_to_hybris\hybris\data\hybristomcat.lock) do taskkill /f /pid %%p
)
....
However, I get the below error. Pls suggest what is the problem and how i can get to start the server correctly:
SEVERE: Exception sending context initialized event to listener instance of class de.hybris.platform.spring.HybrisContextLoaderListener java.lang.RuntimeException: java.sql.SQLException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@65e9768f[file =D:\path_to_hybris\hybris\data\hsqldb\mydb.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2016-12-28 17:42:28 heartbeat - read: -1531 ms. at de.hybris.platform.jdbcwrapper.DataSourceImpl.adjustDatabaseInfos(DataSourceImpl.java:663) at de.hybris.platform.jdbcwrapper.DataSourceImpl.<init>(DataSourceImpl.java:214) at de.hybris.platform.jdbcwrapper.DataSourceImpl.<init>(DataSourceImpl.java:150) at de.hybris.platform.core.DataSourceImplFactory.createDataSource(DataSourceImplFactory.java:52) at de.hybris.platform.core.AbstractTenant$HybrisDataSourceBuilder.createMasterDataSource(AbstractTenant.java:2842) at de.hybris.platform.core.AbstractTenant$HybrisDataSourceBuilder.buildMasterDataSourceOnce(AbstractTenant.java:2604) at de.hybris.platform.core.AbstractTenant$HybrisDataSourceBuilder.build(AbstractTenant.java:2550) at de.hybris.platform.core.AbstractTenant.doInitializeSafe(AbstractTenant.java:328) at de.hybris.platform.core.AbstractTenant.doInitialize(AbstractTenant.java:307) at de.hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:660) at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:649) at de.hybris.platform.core.Registry.activateTenant(Registry.java:710) at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:554) at de.hybris.platform.core.Registry.activateMasterTenant(Registry.java:617) at de.hybris.platform.core.Registry.startup(Registry.java:432) at de.hybris.platform.spring.HybrisContextLoaderListener.startRegistry(HybrisContextLoaderListener.java:266) at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplicationContext(HybrisContextLoaderListener.java:154) at de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicationContext(HybrisContextLoaderListener.java:144) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitialized(HybrisContextLoaderListener.java:80) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@65e9768f[file =D:\path_to_hybris\hybris\data\hsqldb\mydb.lck, exists=true, locked=false, va lid=false, ] method: checkHeartbeat read: 2016-12-28 17:42:28 heartbeat - read: -1531 ms. at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source) at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source) at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source) at de.hybris.platform.jdbcwrapper.JDBCConnectionFactory.createRawSQLConnection(JDBCConnectionFactory.java:189) at de.hybris.platform.jdbcwrapper.JDBCConnectionFactory.createSQLConnection(JDBCConnectionFactory.java:220) at de.hybris.platform.jdbcwrapper.JDBCConnectionFactory.makeObject(JDBCConnectionFactory.java:109) at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) at de.hybris.platform.jdbcwrapper.JDBCConnectionPool.borrowConnection(JDBCConnectionPool.java:109) at de.hybris.platform.jdbcwrapper.ConnectionErrorCheckingJDBCConnectionPool.borrowConnection(ConnectionErrorCheckingJDBCConnectionPool.java:85) at de.hybris.platform.jdbcwrapper.DataSourceImpl.adjustDatabaseInfos(DataSourceImpl.java:645) ... 28 more Caused by: org.hsqldb.HsqlException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@65e9768f[file =D:\path_to_hybris\hybris\data\hsqldb\mydb.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2016-12-28 17:42:28 heartbeat - read: -1531 ms. at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.persist.LockFile.newLockFileLock(Unknown Source) at org.hsqldb.persist.Logger.acquireLock(Unknown Source) at org.hsqldb.persist.Logger.openPersistence(Unknown Source) at org.hsqldb.Database.reopen(Unknown Source) at org.hsqldb.Database.open(Unknown Source) at org.hsqldb.DatabaseManager.getDatabase(Unknown Source) at org.hsqldb.DatabaseManager.newSession(Unknown Source) ... 40 more Dec 28, 2016 5:42:29 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Dec 28, 2016 5:42:29 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [] startup failed due to previous errors Dec 28, 2016 5:42:29 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [commons-pool-EvictionTimer] but has failed to stop it. This is very likely to create a memory leak. ←[32mINFO [localhost-startStop-1] [AbstractTenant] Created master data source DataSourceImpl<<master/master>> ←[m←[32mINFO [localhost-startStop-1] [AbstractTenant] Created alternative data source "vjdbc" ←[m←[32mINFO [localhost-startStop-1] [AbstractTenant] Created alternative data source "vjdbcrw" ←[m←[32mINFO [localhost-startStop-1] [DefaultClusterNodeManagementService] Automatic cluster ID discovery disabled. Configured ID: 0 ←[m←[32mINFO [localhost-startStop-1] [DefaultBroadcastService] Started message broadcast service: clustering (enabled:false) sending synchronously - no queue methods [<loopback>::de.hybris.platform.cluster.LoopBackBroadcastMethod@43df0e9a] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ***************************************************************** ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Starting up hybris server ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Configuration: ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Cluster: disabled ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Tenant: master ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Mode: development ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] OS: Windows Server 2008 R2 6.1, amd64 ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Database: Pool: hybris - hsqldb, table prefix: ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] SA - jdbc:hsqldb:file:D:\path_to_hybris\hybris\data/hsqldb/mydb;shutdown=true;hsqldb.cache_rows=100000;hsqldb.cache_size=20000;hsqld b.write_delay_millis=1000;hsqldb.inc_backup=true;hsqldb.defrag_limit=2;hsqldb.nio_data_file=false ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Platform: 6.2.0.0-SNAPSHOT ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Java: Oracle Corporation ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Java(TM) SE Runtime Environment, 1.8.0_92-b14 ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] D:\Program Files\Java\jdk1.8.0_92\jre ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] VM Locale: language=en,country=US,region=null ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Cache: RegionCache is not yet initialized. [de.hybris.platform.cache.impl.RegionCacheAdapter] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] Server type: tomcat ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ***************************************************************** ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] --------------------------------------------------------------- ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] --- Extensions in dependency order ( options: ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] --- @deprecated: is deprecated, p: platform extension,*: auto-required ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] --- ?: lazy-loaded, i: got items.xml, b: got beans.xml, c: got core module ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] --- w: got web module, h: got HMC module ) ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] --------------------------------------------------------------- ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] core 6.2.0.0-SNAPSHOT [p*cib] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] testweb 6.2.0.0-SNAPSHOT [p*w] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] scripting 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] paymentstandard 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] mediaweb 6.2.0.0-SNAPSHOT [p*cw] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] maintenanceweb 6.2.0.0-SNAPSHOT [p*w] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] deliveryzone 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] commons 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] processing->(scripting,commons) 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] impex->processing 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] validation->impex 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] catalog->(validation,commons) 6.2.0.0-SNAPSHOT [p*cib] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] europe1->(impex,catalog) 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] platformservices->(paymentstandard,impex,deliveryzone,europe1,processing) 6.2.0.0-SNAPSHOT [p*cb] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] workflow->(catalog,platformservices,processing,commons) 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] oauth2->platformservices 6.2.0.0-SNAPSHOT [p*cibw] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] hac->(impex,catalog,processing,platformservices) 6.2.0.0-SNAPSHOT [p*cw] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] comments->(workflow,impex,catalog,processing) 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] advancedsavedquery->(impex,catalog,processing) 6.2.0.0-SNAPSHOT [p*ci] ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] embeddedserver <-?-tomcatembeddedserver 6.2.0.0-SNAPSHOT [?cibw] path:D:\path_to_hybris\hybris\bin\ext-platform-optional\embeddedserver ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] voucher <-?-(promotions,voucherbackoffice) 6.2.0.0-SNAPSHOT [?ci] path:D:\path_to_hybris\hybris\bin\ext-commerce\voucher ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] tomcatembeddedserver->embeddedserver <-?-webservicescommons 6.2.0.0-SNAPSHOT [?cibw] path:D:\path_to_hybris\hybris\bin\ext-platform-optional\tomc atembeddedserver ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] promotions->voucher <-?-(promotionsbackoffice,commerceservices,promotionengineservices) 6.2.0.0-SNAPSHOT [?ci] path:D:\path_to_hybris\hybris\bin\ ext-commerce\promotions ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] virtualjdbc->catalog <-?-reportcockpit 6.2.0.0-SNAPSHOT [?cw] path:D:\path_to_hybris\hybris\bin\ext-platform-optional\virtualjdbc ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] atddengine <-?-atddimpex 6.2.0.0-SNAPSHOT [?c] path:D:\path_to_hybris\hybris\bin\ext-atdd\atddengine ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] springintegrationlibs <-?-(acceleratorservices,smartedit) 6.2.0.0-SNAPSHOT [?] path:D:\path_to_hybris\hybris\bin\ext-platform-optional\springinte grationlibs ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ruleengine <-?-ruleengineservices 6.2.0.0-SNAPSHOT [?cib] path:D:\path_to_hybris\hybris\bin\ext-commerce\ruleengine ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] ordercalculation <-?-ruleengineservices 6.2.0.0-SNAPSHOT [?ci] path:D:\path_to_hybris\hybris\bin\ext-commerce\ordercalculation ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] basecommerce <-?-(payment,cms2,commerceservices,cscockpit,cmscockpit,basecommercebackoffice,promotionengineservices) 6.2.0.0-SNAPSHOT [?cib] path:D :\path_to_hybris\hybris\bin\ext-commerce\basecommerce ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] payment->basecommerce <-?-(commerceservices,cscockpit) 6.2.0.0-SNAPSHOT [?ci] path:D:\path_to_hybris\hybris\bin\ext-commerce\payment ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] customerreview <-?-commerceservices 6.2.0.0-SNAPSHOT [?ci] path:D:\path_to_hybris\hybris\bin\ext-commerce\customerreview ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] atddimpex->atddengine <-?-(commerceservicesatddtests,commercesearchatddtests,ruleengineatddtests) 6.2.0.0-SNAPSHOT [?c] path:D:\path_to_hybris\hy bris\bin\ext-atdd\atddimpex ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] cockpit->(comments,workflow,impex,catalog,processing,validation) <-?-(admincockpit,reportcockpit,cscockpit,productcockpit,cmscockpit,mcc) 6.2.0.0-S NAPSHOT [?ci] path:D:\path_to_hybris\hybris\bin\ext-cockpit\cockpit ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] admincockpit->(impex,processing,validation,cockpit) <-?-cmscockpit 6.2.0.0-SNAPSHOT [?ciw] path:D:\path_to_hybris\hybris\bin\ext-cockpit\admincoc kpit ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] reportcockpit->(impex,virtualjdbc,cockpit) <-?-highstreetcockpits 6.2.0.0-SNAPSHOT [?ciw] path:D:\path_to_hybris\hybris\bin\ext-cockpit\reportcoc kpit ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] npmancillary <-?-(backoffice,smartedit,cmssmartedit,personalizationsmartedit) 6.2.0.0-SNAPSHOT [?c] path:D:\path_to_hybris\hybris\bin\ext-content \npmancillary ←[m←[32mINFO [localhost-startStop-1] [hybrisserver] backoffice->npmancillary <-?-(platformbackoffice,voucherbackoffice,promotionsbackoffice,basecommercebackoffice,textfieldconfiguratortemplatebackoff
Request clarification before answering.
remove the D:\path_to_hybris\hybris\data\hsqldb\mydb.lck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.