Artifactory issue (maybe Derby related) - derby

A few days back I noticed that my artifactory instance was not running anymore. Now I am not able to start it again. In the localhost logs in /opt/jfrog/artifactory/tomcat/logs I found a long stack trace, but I am not sure whether that is the actual problem because It seems to appear already at a time where everything was still working fine.
Update 2 weeks later: A few days after initially writing this question, artifactory was suddenly running again. I did not understand why, since nothing I tried seemed to help. Now, the same issue is back...
The localhost log:
19-Jul-2018 10:50:34.781 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Using artifactory.home at '/var/opt/jfrog/artifactory' resolved from: System property
19-Jul-2018 10:50:38.843 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
19-Jul-2018 10:51:57.405 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Using artifactory.home at '/var/opt/jfrog/artifactory' resolved from: System property
19-Jul-2018 10:52:03.598 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
19-Jul-2018 10:53:07.428 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Using artifactory.home at '/var/opt/jfrog/artifactory' resolved from: System property
19-Jul-2018 10:53:15.436 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
19-Jul-2018 10:53:32.409 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.artifactory.webapp.servlet.ArtifactoryHomeConfigListener]
java.lang.RuntimeException: Could't establish connection with db: jdbc:derby:/var/opt/jfrog/artifactory/data/derby;create=true
at org.jfrog.config.db.TemporaryDBChannel.<init>(TemporaryDBChannel.java:35)
at org.artifactory.common.ArtifactoryConfigurationAdapter.getDbChannel(ArtifactoryConfigurationAdapter.java:183)
at org.jfrog.config.wrappers.ConfigurationManagerImpl.getDBChannel(ConfigurationManagerImpl.java:422)
at org.artifactory.config.MasterKeyBootstrapUtil.dbChannel(MasterKeyBootstrapUtil.java:206)
at org.artifactory.config.MasterKeyBootstrapUtil.tryToCreateTable(MasterKeyBootstrapUtil.java:95)
at org.artifactory.config.MasterKeyBootstrapUtil.validateOrInsertKeyInformation(MasterKeyBootstrapUtil.java:65)
at org.artifactory.config.MasterKeyBootstrapUtil.handleMasterKey(MasterKeyBootstrapUtil.java:46)
at org.artifactory.webapp.servlet.BasicConfigManagers.initHomes(BasicConfigManagers.java:95)
at org.artifactory.webapp.servlet.BasicConfigManagers.initialize(BasicConfigManagers.java:81)
at org.artifactory.webapp.servlet.ArtifactoryHomeConfigListener.contextInitialized(ArtifactoryHomeConfigListener.java:53)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1842)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: Failed to start database '/var/opt/jfrog/artifactory/data/derby' with class loader java.net.URLClassLoader#e9e54c2, 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.EmbeddedDriver.connect(Unknown Source)
at org.jfrog.config.db.TemporaryDBChannel.<init>(TemporaryDBChannel.java:31)
... 22 more
Caused by: ERROR XJ040: Failed to start database '/var/opt/jfrog/artifactory/data/derby' with class loader java.net.URLClassLoader#e9e54c2, 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)
... 32 more
Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database /var/opt/jfrog/artifactory/data/derby.
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.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.impl.services.monitor.FileMonitor.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.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)
... 29 more
19-Jul-2018 10:53:32.503 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.artifactory.webapp.servlet.logback.LogbackConfigListener]
java.lang.IllegalStateException: Artifactory home not initialized
at org.artifactory.webapp.servlet.logback.LogbackConfigListener.initArtifactoryHome(LogbackConfigListener.java:55)
at org.artifactory.webapp.servlet.logback.LogbackConfigListener.contextInitialized(LogbackConfigListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1842)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
19-Jul-2018 10:53:32.569 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.artifactory.webapp.servlet.ArtifactoryContextConfigListener]
java.lang.IllegalStateException: Artifactory home not initialized.
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.getArtifactoryHome(ArtifactoryContextConfigListener.java:176)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.setSessionTrackingMode(ArtifactoryContextConfigListener.java:150)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.contextInitialized(ArtifactoryContextConfigListener.java:77)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1842)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
19-Jul-2018 10:54:44.743 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
19-Jul-2018 10:56:21.997 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log jolokia: No access restrictor found, access to any MBean is allowed
19-Jul-2018 17:22:06.575 INFO [localhost-startStop-5] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
19-Jul-2018 17:24:22.721 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Using artifactory.home at '/var/opt/jfrog/artifactory' resolved from: System property
19-Jul-2018 17:24:27.463 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
19-Jul-2018 17:26:29.617 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
artifactory.log with severall restart attempts. Note: it always gets stuck at '[art-init] [INFO ] (o.a.w.s.ArtifactoryContextConfigListener:281) -'
/ \ _ __| |_ _| |_ __ _ ___| |_ ___ _ __ _ _ | | | | (___| (___
/ /\ \ | '__| __| | _/ _` |/ __| __/ _ \| '__| | | | | | | |\___ \\___ \
/ ____ \| | | |_| | || (_| | (__| || (_) | | | |_| | | |__| |____) |___) |
/_/ \_\_| \__|_|_| \__,_|\___|\__\___/|_| \__, | \____/|_____/_____/
Version: 5.9.0 __/ |
Revision: 50900900 |___/
Artifactory Home: '/var/opt/jfrog/artifactory'
2018-08-01 16:52:01,039 [art-init] [WARN ] (o.a.f.l.ArtifactoryLockFile:65) - Found existing lock file. Artifactory was not shutdown properly. [/var/opt/jfrog/artifactory/data/.lock]
2018-08-01 16:52:03,744 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:484) - Artifactory application context set to NOT READY by refresh
2018-08-01 16:52:03,777 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:227) - Refreshing artifactory: startup date [Wed Aug 01 16:52:03 UTC 2018]; root of context hierarchy
2018-08-01 16:53:29,163 [art-init] [INFO ] (o.a.s.d.DbServiceImpl:217) - Database: Apache Derby 10.11.1.1 - (1616546). Driver: Apache Derby Embedded JDBC Driver 10.11.1.1 - (1616546) Pool: derby
2018-08-01 16:53:29,178 [art-init] [INFO ] (o.a.s.d.DbServiceImpl:220) - Connection URL: jdbc:derby:/var/opt/jfrog/artifactory/data/derby
2018-08-01 16:54:05,176 [art-init] [INFO ] (o.j.s.b.p.t.BinaryProviderClassScanner:76) - Added 'blob' from jar:file:/opt/jfrog/artifactory/tomcat/webapps/artifactory/WEB-INF/lib/artifactory-storage-db-5.9.0.jar!/
2018-08-01 16:54:05,524 [art-init] [INFO ] (o.j.s.b.p.t.BinaryProviderClassScanner:76) - Added 'empty, external-file, external-wrapper, file-system, cache-fs, retry' from jar:file:/opt/jfrog/artifactory/tomcat/webapps/artifactory/WEB-INF/lib/binary-store-core-2.0.37.jar!/
2018-08-01 16:54:49,865 [art-init] [INFO ] (o.a.s.ArtifactorySchedulerFactoryBean:647) - Starting Quartz Scheduler now
2018-08-01 16:54:52,478 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:234) - Artifactory context starting up 39 Spring Beans...
2018-08-01 16:55:04,519 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:356) - Initialzed new service id: jfrt#01c72726yd871j0wqyck0k0n0z
2018-08-01 16:55:05,338 [art-init] [INFO ] (o.j.s.c.EncryptionWrapperFactory:33) - createArtifactoryKeyWrapper EncryptionWrapperBase{ encodingType=ARTIFACTORY_MASTER, topEncrypter=BytesEncrypterBase{ Cipher='DESede', keyId='22QC5'}, formatUsed=OldFormat, decrypters=[BytesEncrypterBase{ Cipher='DESede', keyId='22QC5'}]}
2018-08-01 16:55:05,687 [art-init] [INFO ] (o.a.s.a.ArtifactoryAccessClientConfigStore:556) - Using Access Server URL: http://localhost:8040/access (bundled) source: detected
2018-08-01 16:55:09,887 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:279) - Waiting for access server...
2018-08-01 16:56:49,406 [art-init] [INFO ] (o.a.w.s.ArtifactoryContextConfigListener:281) -
_ _ __ _ ____ _____ _____
/\ | | (_)/ _| | | / __ \ / ____/ ____|
/ \ _ __| |_ _| |_ __ _ ___| |_ ___ _ __ _ _ | | | | (___| (___
/ /\ \ | '__| __| | _/ _` |/ __| __/ _ \| '__| | | | | | | |\___ \\___ \
/ ____ \| | | |_| | || (_| | (__| || (_) | | | |_| | | |__| |____) |___) |
/_/ \_\_| \__|_|_| \__,_|\___|\__\___/|_| \__, | \____/|_____/_____/
Version: 5.9.0 __/ |
Revision: 50900900 |___/
Artifactory Home: '/var/opt/jfrog/artifactory'
2018-08-01 16:56:49,510 [art-init] [WARN ] (o.a.f.l.ArtifactoryLockFile:65) - Found existing lock file. Artifactory was not shutdown properly. [/var/opt/jfrog/artifactory/data/.lock]
2018-08-01 16:56:52,853 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:484) - Artifactory application context set to NOT READY by refresh
2018-08-01 16:56:52,908 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:227) - Refreshing artifactory: startup date [Wed Aug 01 16:56:52 UTC 2018]; root of context hierarchy
2018-08-01 17:00:01,718 [art-init] [INFO ] (o.a.w.s.ArtifactoryContextConfigListener:281) -
_ _ __ _ ____ _____ _____
/\ | | (_)/ _| | | / __ \ / ____/ ____|
/ \ _ __| |_ _| |_ __ _ ___| |_ ___ _ __ _ _ | | | | (___| (___
/ /\ \ | '__| __| | _/ _` |/ __| __/ _ \| '__| | | | | | | |\___ \\___ \
/ ____ \| | | |_| | || (_| | (__| || (_) | | | |_| | | |__| |____) |___) |
/_/ \_\_| \__|_|_| \__,_|\___|\__\___/|_| \__, | \____/|_____/_____/
Version: 5.9.0 __/ |
Revision: 50900900 |___/
Artifactory Home: '/var/opt/jfrog/artifactory'
2018-08-01 17:00:01,827 [art-init] [WARN ] (o.a.f.l.ArtifactoryLockFile:65) - Found existing lock file. Artifactory was not shutdown properly. [/var/opt/jfrog/artifactory/data/.lock]
2018-08-01 17:00:04,617 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:484) - Artifactory application context set to NOT READY by refresh
2018-08-01 17:00:04,619 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:227) - Refreshing artifactory: startup date [Wed Aug 01 17:00:04 UTC 2018]; root of context hierarchy
2018-08-01 17:03:09,821 [art-init] [INFO ] (o.a.w.s.ArtifactoryContextConfigListener:281) -
When I try to start the service via systemctl start artifactory.service it fails with "Job for artifactory.service failed because a timeout was exceeded. See "systemctl status artifactory.service" and "journalctl -xe" for details.".
Output systemctl status artifactory.service:
nikl#nikls-droplet-1:/opt/jfrog/artifactory/tomcat/logs$ sudo systemctl status artifactory.service
● artifactory.service - Setup Systemd script for Artifactory in Tomcat Servlet Engine
Loaded: loaded (/lib/systemd/system/artifactory.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2018-07-20 23:19:14 UTC; 25min ago
Process: 18829 ExecStart=/opt/jfrog/artifactory/bin/artifactoryManage.sh start (code=killed, signal=TERM)
Jul 20 23:18:23 nikls-droplet-1 artifactoryManage.sh[18829]: /usr/bin/java
Jul 20 23:18:24 nikls-droplet-1 artifactoryManage.sh[18829]: Starting Artifactory tomcat as user artifactory...
Jul 20 23:18:24 nikls-droplet-1 su[18851]: Successful su for artifactory by root
Jul 20 23:18:24 nikls-droplet-1 su[18851]: + ??? root:artifactory
Jul 20 23:18:24 nikls-droplet-1 su[18851]: pam_unix(su:session): session opened for user artifactory by (uid=0)
Jul 20 23:18:24 nikls-droplet-1 artifactoryManage.sh[18829]: Max number of open files: 1024
Jul 20 23:18:24 nikls-droplet-1 artifactoryManage.sh[18829]: Using ARTIFACTORY_HOME: /var/opt/jfrog/artifactory
Jul 20 23:18:24 nikls-droplet-1 artifactoryManage.sh[18829]: Using ARTIFACTORY_PID: /var/opt/jfrog/run/artifactory.pid
Jul 20 23:18:24 nikls-droplet-1 artifactoryManage.sh[18829]: Tomcat started.
Jul 20 23:19:14 nikls-droplet-1 systemd[1]: Stopped Setup Systemd script for Artifactory in Tomcat Servlet Engine.
Output journalctl -xe:
nikl#nikls-droplet-1:/opt/jfrog/artifactory/tomcat/logs$ sudo journalctl -xe
-- Kernel start-up required KERNEL_USEC microseconds.
--
-- Initial RAM disk start-up required INITRD_USEC microseconds.
--
-- Userspace start-up required 108849 microseconds.
Jul 20 23:54:42 nikls-droplet-1 systemd[1]: Started User Manager for UID 1001.
-- Subject: Unit user#1001.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user#1001.service has finished starting up.
--
-- The start-up result is done.
Jul 20 23:54:42 nikls-droplet-1 artifactoryManage.sh[19282]: Max number of open files: 1024
Jul 20 23:54:42 nikls-droplet-1 artifactoryManage.sh[19282]: Using ARTIFACTORY_HOME: /var/opt/jfrog/artifactory
Jul 20 23:54:42 nikls-droplet-1 artifactoryManage.sh[19282]: Using ARTIFACTORY_PID: /var/opt/jfrog/run/artifactory.pid
Jul 20 23:54:42 nikls-droplet-1 artifactoryManage.sh[19282]: Tomcat started.
Jul 20 23:54:42 nikls-droplet-1 su[19305]: pam_unix(su:session): session closed for user artifactory
Jul 20 23:56:11 nikls-droplet-1 systemd[1]: artifactory.service: Start operation timed out. Terminating.
Jul 20 23:56:11 nikls-droplet-1 systemd[1]: Failed to start Setup Systemd script for Artifactory in Tomcat Servlet Engine.
-- Subject: Unit artifactory.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit artifactory.service has failed.
--
-- The result is failed.
Jul 20 23:56:11 nikls-droplet-1 systemd[1]: artifactory.service: Unit entered failed state.
Jul 20 23:56:11 nikls-droplet-1 systemd[1]: artifactory.service: Failed with result 'timeout'.
Jul 20 23:56:11 nikls-droplet-1 polkitd(authority=local)[1443]: Unregistered Authentication Agent for unix-process:19273:10938586 (system bus name :1.317, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Jul 20 23:56:16 nikls-droplet-1 systemd[1]: artifactory.service: Service hold-off time over, scheduling restart.
Jul 20 23:56:16 nikls-droplet-1 systemd[1]: Stopped Setup Systemd script for Artifactory in Tomcat Servlet Engine.
-- Subject: Unit artifactory.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit artifactory.service has finished shutting down.
Jul 20 23:56:16 nikls-droplet-1 systemd[1]: Starting Setup Systemd script for Artifactory in Tomcat Servlet Engine...
-- Subject: Unit artifactory.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit artifactory.service has begun starting up.
Jul 20 23:56:16 nikls-droplet-1 artifactoryManage.sh[19863]: /usr/bin/java
Jul 20 23:56:17 nikls-droplet-1 artifactoryManage.sh[19863]: Starting Artifactory tomcat as user artifactory...
Jul 20 23:56:17 nikls-droplet-1 su[19885]: Successful su for artifactory by root
Jul 20 23:56:17 nikls-droplet-1 su[19885]: + ??? root:artifactory
Jul 20 23:56:17 nikls-droplet-1 su[19885]: pam_unix(su:session): session opened for user artifactory by (uid=0)
Jul 20 23:56:17 nikls-droplet-1 systemd-logind[1395]: New session c140 of user artifactory.
-- Subject: A new session c140 has been created for user artifactory
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID c140 has been created for the user artifactory.
--
-- The leading process of the session is 19885.
Jul 20 23:56:17 nikls-droplet-1 systemd[1]: Started Session c140 of user artifactory.
-- Subject: Unit session-c140.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-c140.scope has finished starting up.
--
-- The start-up result is done.
Jul 20 23:56:17 nikls-droplet-1 artifactoryManage.sh[19863]: Max number of open files: 1024
Jul 20 23:56:17 nikls-droplet-1 artifactoryManage.sh[19863]: Using ARTIFACTORY_HOME: /var/opt/jfrog/artifactory
Jul 20 23:56:17 nikls-droplet-1 artifactoryManage.sh[19863]: Using ARTIFACTORY_PID: /var/opt/jfrog/run/artifactory.pid
Jul 20 23:56:17 nikls-droplet-1 artifactoryManage.sh[19863]: Tomcat started.
Jul 20 23:56:17 nikls-droplet-1 su[19885]: pam_unix(su:session): session closed for user artifactory
Jul 20 23:56:18 nikls-droplet-1 systemd-logind[1395]: Removed session c140.
-- Subject: Session c140 has been terminated
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A session with the ID c140 has been terminated.
I have tried deleting the .lck files in the derby folder because that seems to have solved the "Another instance of Derby may have already booted the database /var/opt/jfrog/artifactory/data/derby" issue for someone else before, but nothing changed for me. After the next start of artifactory the files were just back and the same error showed up in the log files.
Since the output of systemctl start artifactory.service complaints about a timeout I raised START_TMO in artifactory.default to 300, but still the same problem persists. I also raised START_TMO in a different file according to the first answer of this SO question.
I don't understand what is going on and would be very grateful for any help/advice.

Related

Spring message appears several times during the test run

I am currently using spring-boot with the org.testcontainers library to pass test in docker . But I noticed that the following message appears several times :
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.20.RELEASE)
It appears up to 4 times , 2 of them with the following message :
11:33:23.733 [main] INFO org.springframework.web.context.support.GenericWebApplicationContext - Refreshing org.springframework.web.context.support.GenericWebApplicationContext#13ffeba4: startup date [Wed Jun 16 11:33:23 CEST 2021]; root of context hierarchy
Some messages that have caught my attention, first time that appears (the only one I think necessary)
11:31:48.515 [main] INFO org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 0 (http)
11:31:49.019 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5416 ms
2 : It does not appear Why?
3:
11:35:06.738 [main] INFO org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 0 (http)
11:35:06.764 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1569 ms
4:
11:36:19.343 [main] INFO org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 0 (http)
11:36:19.362 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 454 ms
The message always pops up after a specific test, for example the third time during this test.
#Category(OneTest.class)
public class PasswordEncryptionTest
{
#Test
public void passwordEncryptionTest()
{
PasswordEncryption passwordEncryption = new PasswordEncryption();
try
{
String password = "passwordExample";
String encrypted = passwordEncryption.encryptPassword(password.toCharArray());
String decrypted = passwordEncryption.decryptPassword(encrypted.toCharArray());
assertEquals(password, decrypted);
}
catch (PasswordDecryptionException e)
{
e.printStackTrace();
fail(e.getMessage());
}
}
}
Is this normal ? Because it is the message that appears when you start the application and that it appears 4 times, that is what I noticed.
Can it be affecting the performance of the tests?
Pd: They are messages, after passing the tests many times, in different environments, they are not the result of chance. I have seen no relationship in the times between the different appearances. (It does not follow a time pattern)
spring-boot 1.5.20
junit47
org.testcontainers 1.13.0
Docker windows 2.2.0.3

ConfigServletWebServerApplicationContext : How to uninstall Flyway from Spring Maven Project

The goal: Uninstall flyway from my Spring Maven project !
Maybe my question is more global and consists of how to get rid of dependecies or libraries....
The context:
My project is called "Meetzicker" it will be a restfull API to meet musicians.
I will dockerize it and use docker-compose with many services:
my API
postgres db
pgAdmin to manage DB
and later flyway but not for now !
If you have advices I accept them gladly !
enter image description here
First I build an image of my project with the pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.praline40</groupId>
<artifactId>meetzicker</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>MeetZicker REST API</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.18.Final</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version> 2.0.1.Final </version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.20.1</version>
<configuration>
<images>
<image>
<name>${project.artifactId}</name>
<build>
<dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
<assembly>
<mode>dir</mode>
<targetDir>/var/lib/${project.artifactId}</targetDir>
<descriptor>${project.basedir}/src/main/docker/assembly.xml</descriptor>
</assembly>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build</id>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
The last part of the pom (between ... ) builds my image automatically when I call:
~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker$ mvn clean install -DskipTests=true
I am using docker-composed with 3 services:
# meetzicker/docker-compose.yml
version: "3.3"
services:
db:
image: postgres:${POSTGRES_VERSION}
container_name: db
network_mode: bridge
volumes:
- db-data:/var/lib/postgresql/data
expose:
- 5432
ports:
- 5432:5432
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
restart: unless-stopped
pgadmin:
image: dpage/pgadmin4
network_mode: bridge
container_name: pgadmin4
volumes:
- pgadmin-data:/var/lib/pgadmin
expose:
- 5050
ports:
- 5051:5050
links:
- db:pgsql-server
environment:
PGADMIN_DEFAULT_EMAIL: praline40#hotmail.fr
PGADMIN_DEFAULT_PASSWORD: ${POSTGRES_PASSWORD}
PGADMIN_PORT: 5050
restart: unless-stopped
meetzicker:
image: meetzicker
network_mode: bridge
container_name: meetzicker
volumes:
- meetzicker-data:/var/lib/meetzicker
expose:
- 8080
ports:
- 8080:8080
restart: unless-stopped
depends_on:
- db
volumes:
db-data:
pgadmin-data:
meetzicker-data:
When I call docker-compose:
jules#jules-MS-7B51:~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/src/main/docker$ docker-compose up
I have this error:
jules#jules-MS-7B51:~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/src/main/docker$ docker-compose up
WARNING: Found orphan containers (my-flyway) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
db is up-to-date
Starting pgadmin4 ... done
Starting meetzicker ... done
Attaching to db, meetzicker, pgadmin4
meetzicker | wait-for-it.sh: waiting 15 seconds for db:5432
db |
db | PostgreSQL Database directory appears to contain a database; Skipping initialization
db |
db | LOG: database system was shut down at 2021-05-14 13:52:50 UTC
db | LOG: MultiXact member wraparound protections are now enabled
db | LOG: database system is ready to accept connections
db | LOG: autovacuum launcher started
pgadmin4 | [2021-05-14 14:16:16 +0000] [1] [INFO] Starting gunicorn 20.1.0
pgadmin4 | [2021-05-14 14:16:16 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
pgadmin4 | [2021-05-14 14:16:16 +0000] [1] [INFO] Using worker: threads
pgadmin4 | [2021-05-14 14:16:16 +0000] [82] [INFO] Booting worker with pid: 82
meetzicker | wait-for-it.sh: timeout occurred after waiting 15 seconds for db:5432
meetzicker |
meetzicker | . ____ _ __ _ _
meetzicker | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
meetzicker | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
meetzicker | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
meetzicker | ' |____| .__|_| |_|_| |_\__, | / / / /
meetzicker | =========|_|==============|___/=/_/_/_/
meetzicker | :: Spring Boot :: (v2.3.4.RELEASE)
meetzicker |
meetzicker | 2021-05-14 14:16:29.399 INFO 43 --- [ main] c.p.MeetZicker.MeetZickerApplication : Starting MeetZickerApplication v0.0.1-SNAPSHOT on c9ed3b2b0bd9 with PID 43 (/var/lib/meetzicker/meetzicker.jar started by root in /var/lib/meetzicker)
meetzicker | 2021-05-14 14:16:29.401 INFO 43 --- [ main] c.p.MeetZicker.MeetZickerApplication : The following profiles are active: dev
meetzicker | 2021-05-14 14:16:29.849 INFO 43 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
meetzicker | 2021-05-14 14:16:29.918 INFO 43 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 62ms. Found 12 JPA repository interfaces.
meetzicker | 2021-05-14 14:16:30.323 INFO 43 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
meetzicker | 2021-05-14 14:16:30.331 INFO 43 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
meetzicker | 2021-05-14 14:16:30.331 INFO 43 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.38]
meetzicker | 2021-05-14 14:16:30.368 INFO 43 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
meetzicker | 2021-05-14 14:16:30.368 INFO 43 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 936 ms
meetzicker | 2021-05-14 14:16:30.445 WARN 43 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unsatisfied dependency expressed through method 'flywayInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingException: Cannot find migration scripts in: [classpath:db/migration] (please add migration scripts or check your Flyway configuration)
meetzicker | 2021-05-14 14:16:30.447 INFO 43 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
meetzicker | 2021-05-14 14:16:30.453 INFO 43 --- [ main] ConditionEvaluationReportLoggingListener :
meetzicker |
meetzicker | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
meetzicker | 2021-05-14 14:16:30.454 ERROR 43 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
meetzicker |
meetzicker | ***************************
meetzicker | APPLICATION FAILED TO START
meetzicker | ***************************
meetzicker |
meetzicker | Description:
meetzicker |
meetzicker | Flyway failed to initialize: none of the following migration scripts locations could be found:
meetzicker |
meetzicker | - classpath:db/migration
meetzicker |
meetzicker |
meetzicker | Action:
meetzicker |
meetzicker | Review the locations above or check your Flyway configuration
meetzicker |
meetzicker | wait-for-it.sh: waiting 15 seconds for db:5432
meetzicker | wait-for-it.sh: timeout occurred after waiting 15 seconds for db:5432
meetzicker |
meetzicker | . ____ _ __ _ _
meetzicker | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
meetzicker | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
meetzicker | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
meetzicker | ' |____| .__|_| |_|_| |_\__, | / / / /
meetzicker | =========|_|==============|___/=/_/_/_/
meetzicker | :: Spring Boot :: (v2.3.4.RELEASE)
meetzicker |
meetzicker | 2021-05-14 14:16:46.742 INFO 44 --- [ main] c.p.MeetZicker.MeetZickerApplication : Starting MeetZickerApplication v0.0.1-SNAPSHOT on c9ed3b2b0bd9 with PID 44 (/var/lib/meetzicker/meetzicker.jar started by root in /var/lib/meetzicker)
meetzicker | 2021-05-14 14:16:46.743 INFO 44 --- [ main] c.p.MeetZicker.MeetZickerApplication : The following profiles are active: dev
meetzicker | 2021-05-14 14:16:47.199 INFO 44 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
meetzicker | 2021-05-14 14:16:47.268 INFO 44 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 63ms. Found 12 JPA repository interfaces.
meetzicker | 2021-05-14 14:16:47.673 INFO 44 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
meetzicker | 2021-05-14 14:16:47.681 INFO 44 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
meetzicker | 2021-05-14 14:16:47.681 INFO 44 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.38]
meetzicker | 2021-05-14 14:16:47.719 INFO 44 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
meetzicker | 2021-05-14 14:16:47.719 INFO 44 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 945 ms
meetzicker | 2021-05-14 14:16:47.811 WARN 44 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unsatisfied dependency expressed through method 'flywayInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingException: Cannot find migration scripts in: [classpath:db/migration] (please add migration scripts or check your Flyway configuration)
meetzicker | 2021-05-14 14:16:47.813 INFO 44 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
meetzicker | 2021-05-14 14:16:47.819 INFO 44 --- [ main] ConditionEvaluationReportLoggingListener :
meetzicker |
meetzicker | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
meetzicker | 2021-05-14 14:16:47.820 ERROR 44 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
meetzicker |
meetzicker | ***************************
meetzicker | APPLICATION FAILED TO START
meetzicker | ***************************
meetzicker |
meetzicker | Description:
meetzicker |
meetzicker | Flyway failed to initialize: none of the following migration scripts locations could be found:
meetzicker |
meetzicker | - classpath:db/migration
meetzicker |
meetzicker |
meetzicker | Action:
meetzicker |
meetzicker | Review the locations above or check your Flyway configuration
meetzicker |
meetzicker exited with code 1
meetzicker | wait-for-it.sh: waiting 15 seconds for db:5432
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
I removed orphans:
jules#jules-MS-7B51:~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/src/main/docker$ docker-compose up --remove-orphans
Removing orphan container "my-flyway"
Starting db ... done
Starting meetzicker ... done
Starting pgadmin4 ... done
Attaching to db, meetzicker, pgadmin4
db |
db | PostgreSQL Database directory appears to contain a database; Skipping initialization
db |
db | LOG: database system was interrupted; last known up at 2021-05-16 12:21:00 UTC
db | LOG: database system was not properly shut down; automatic recovery in progress
db | LOG: invalid record length at 0/14F1D38: wanted 24, got 0
db | LOG: redo is not required
meetzicker | wait-for-it.sh: waiting 15 seconds for db:5432
db | LOG: MultiXact member wraparound protections are now enabled
db | LOG: database system is ready to accept connections
db | LOG: autovacuum launcher started
pgadmin4 | [2021-05-17 11:09:31 +0000] [1] [INFO] Starting gunicorn 20.1.0
pgadmin4 | [2021-05-17 11:09:31 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
pgadmin4 | [2021-05-17 11:09:31 +0000] [1] [INFO] Using worker: threads
pgadmin4 | [2021-05-17 11:09:31 +0000] [83] [INFO] Booting worker with pid: 83
meetzicker | wait-for-it.sh: timeout occurred after waiting 15 seconds for db:5432
meetzicker |
meetzicker | . ____ _ __ _ _
meetzicker | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
meetzicker | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
meetzicker | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
meetzicker | ' |____| .__|_| |_|_| |_\__, | / / / /
meetzicker | =========|_|==============|___/=/_/_/_/
meetzicker | :: Spring Boot :: (v2.3.4.RELEASE)
meetzicker |
meetzicker | 2021-05-17 11:09:44.061 INFO 43 --- [ main] c.p.MeetZicker.MeetZickerApplication : Starting MeetZickerApplication v0.0.1-SNAPSHOT on d256a05b5f82 with PID 43 (/var/lib/meetzicker/meetzicker.jar started by root in /var/lib/meetzicker)
meetzicker | 2021-05-17 11:09:44.062 INFO 43 --- [ main] c.p.MeetZicker.MeetZickerApplication : The following profiles are active: dev
meetzicker | 2021-05-17 11:09:44.512 INFO 43 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
meetzicker | 2021-05-17 11:09:44.581 INFO 43 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 63ms. Found 12 JPA repository interfaces.
meetzicker | 2021-05-17 11:09:44.988 INFO 43 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
meetzicker | 2021-05-17 11:09:44.996 INFO 43 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
meetzicker | 2021-05-17 11:09:44.996 INFO 43 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.38]
meetzicker | 2021-05-17 11:09:45.032 INFO 43 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
meetzicker | 2021-05-17 11:09:45.032 INFO 43 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 939 ms
meetzicker | 2021-05-17 11:09:45.123 WARN 43 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unsatisfied dependency expressed through method 'flywayInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingException: Cannot find migration scripts in: [classpath:db/migration] (please add migration scripts or check your Flyway configuration)
meetzicker | 2021-05-17 11:09:45.125 INFO 43 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
meetzicker | 2021-05-17 11:09:45.131 INFO 43 --- [ main] ConditionEvaluationReportLoggingListener :
meetzicker |
meetzicker | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
meetzicker | 2021-05-17 11:09:45.133 ERROR 43 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
meetzicker |
meetzicker | ***************************
meetzicker | APPLICATION FAILED TO START
meetzicker | ***************************
meetzicker |
meetzicker | Description:
meetzicker |
meetzicker | Flyway failed to initialize: none of the following migration scripts locations could be found:
meetzicker |
meetzicker | - classpath:db/migration
meetzicker |
meetzicker |
meetzicker | Action:
meetzicker |
meetzicker | Review the locations above or check your Flyway configuration
meetzicker |
Here is my public project:
https://github.com/praline40/MeetZickerAPI

Changing embedded Tomcat server port to 80 in Springboot web in gradle environment is Error, when 80 port hasn't use.Why?

These days,I have working a springboot web program ,then I want to change server port to 80 ,but it always error. I have found some measure,but generally method has not work ,I hope some people can help me solve it.Thank you very much !
I use embeded Tomcat server ,Error Info is below:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.5.RELEASE)
2020-03-25 19:31:58.325 INFO 3890 --- [ main] top.uniondong.home.HomeApplication : Starting HomeApplication on dong-manjaro with PID 3890 (/home/dong/Program/Uniondong_Home/build/classes/java/main started by dong in /home/dong/Program/Uniondong_Home)
2020-03-25 19:31:58.330 INFO 3890 --- [ main] top.uniondong.home.HomeApplication : No active profile set, falling back to default profiles: default
2020-03-25 19:32:00.031 INFO 3890 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 80 (http)
2020-03-25 19:32:00.044 INFO 3890 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-03-25 19:32:00.045 INFO 3890 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.31]
2020-03-25 19:32:00.160 INFO 3890 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-03-25 19:32:00.160 INFO 3890 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1686 ms
2020-03-25 19:32:00.470 INFO 3890 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-03-25 19:32:00.531 INFO 3890 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page template: index
2020-03-25 19:32:00.690 INFO 3890 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-03-25 19:32:00.697 INFO 3890 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-03-25 19:32:00.709 ERROR 3890 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:215) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at top.uniondong.home.HomeApplication.main(HomeApplication.java:12) [main/:na]
Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:231) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:278) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:197) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
... 10 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1038) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:227) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
... 12 common frames omitted
Caused by: java.net.SocketException: 权限不够
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_242]
at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_242]
at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_242]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220) ~[na:1.8.0_242]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85) ~[na:1.8.0_242]
at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:229) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:212) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1141) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1227) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:592) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1035) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
... 14 common frames omitted
2020-03-25 19:32:00.712 INFO 3890 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
Process finished with exit code 1

How to search logs between dates using sed

I'm trying to search through some logs while grepping for a specific line. How can I reduce the following logs even further by date and time? For example all lines between 2018/02/27 13:10:31 to 2018/02/27 13:17:34. I've tried using sed but I can't get it to work correctly on either date columns.
grep "Eps=" file.log
INFO | jvm 3 | 2018/02/27 13:02:27 | [Tue Feb 27 13:02:27 EST 2018] [INFO ] {Eps=5618.819672131148, Evts=2077762260}
INFO | jvm 3 | 2018/02/27 13:03:27 | [Tue Feb 27 13:03:27 EST 2018] [INFO ] {Eps=5288.8, Evts=2078079588}
INFO | jvm 3 | 2018/02/27 13:04:27 | [Tue Feb 27 13:04:27 EST 2018] [INFO ] {Eps=5176.633333333333, Evts=2078390186}
INFO | jvm 3 | 2018/02/27 13:05:28 | [Tue Feb 27 13:05:28 EST 2018] [INFO ] {Eps=5031.633333333333, Evts=2078692084}
INFO | jvm 3 | 2018/02/27 13:06:28 | [Tue Feb 27 13:06:28 EST 2018] [INFO ] {Eps=5047.433333333333, Evts=2078994930}
INFO | jvm 3 | 2018/02/27 13:07:30 | [Tue Feb 27 13:07:29 EST 2018] [INFO ] {Eps=5314.183333333333, Evts=2079313781}
INFO | jvm 3 | 2018/02/27 13:08:31 | [Tue Feb 27 13:08:31 EST 2018] [INFO ] {Eps=5182.934426229508, Evts=2079629940}
INFO | jvm 3 | 2018/02/27 13:09:31 | [Tue Feb 27 13:09:31 EST 2018] [INFO ] {Eps=5143.459016393443, Evts=2079943691}
INFO | jvm 3 | 2018/02/27 13:10:31 | [Tue Feb 27 13:10:31 EST 2018] [INFO ] {Eps=5519.266666666666, Evts=2080274847}
INFO | jvm 3 | 2018/02/27 13:11:31 | [Tue Feb 27 13:11:31 EST 2018] [INFO ] {Eps=5342.8, Evts=2080595415}
INFO | jvm 3 | 2018/02/27 13:12:32 | [Tue Feb 27 13:12:32 EST 2018] [INFO ] {Eps=5230.183333333333, Evts=2080909226}
INFO | jvm 3 | 2018/02/27 13:13:32 | [Tue Feb 27 13:13:32 EST 2018] [INFO ] {Eps=4975.533333333334, Evts=2081207758}
INFO | jvm 3 | 2018/02/27 13:14:32 | [Tue Feb 27 13:14:32 EST 2018] [INFO ] {Eps=5225.283333333334, Evts=2081521275}
INFO | jvm 3 | 2018/02/27 13:15:33 | [Tue Feb 27 13:15:33 EST 2018] [INFO ] {Eps=5261.766666666666, Evts=2081836981}
INFO | jvm 3 | 2018/02/27 13:16:34 | [Tue Feb 27 13:16:34 EST 2018] [INFO ] {Eps=5257.688524590164, Evts=2082157700}
INFO | jvm 3 | 2018/02/27 13:17:34 | [Tue Feb 27 13:17:34 EST 2018] [INFO ] {Eps=5634.133333333333, Evts=2082495748}
INFO | jvm 3 | 2018/02/27 13:18:34 | [Tue Feb 27 13:18:34 EST 2018] [INFO ] {Eps=5490.5, Evts=2082825178}
INFO | jvm 3 | 2018/02/27 13:19:35 | [Tue Feb 27 13:19:35 EST 2018] [INFO ] {Eps=5351.05, Evts=2083146241}
INFO | jvm 3 | 2018/02/27 13:20:37 | [Tue Feb 27 13:20:37 EST 2018] [INFO ] {Eps=5022.983606557377, Evts=2083452643}
INFO | jvm 3 | 2018/02/27 13:21:37 | [Tue Feb 27 13:21:37 EST 2018] [INFO ] {Eps=5302.196721311476, Evts=2083776077}
INFO | jvm 3 | 2018/02/27 13:22:37 | [Tue Feb 27 13:22:37 EST 2018] [INFO ] {Eps=5096.2, Evts=2084081849}
INFO | jvm 3 | 2018/02/27 13:23:37 | [Tue Feb 27 13:23:37 EST 2018] [INFO ] {Eps=5074.45, Evts=2084386316}
INFO | jvm 3 | 2018/02/27 13:24:38 | [Tue Feb 27 13:24:38 EST 2018] [INFO ] {Eps=5264.566666666667, Evts=2084702190}
Tools like sed or grep operate on strings, even when you can do really sophisticated stuff using regular expressions.
But these tools lack the ability to do something like "range queries" for things like date.
You might find various solutions to this questions, mine would include a small python snippet:
#!/usr/bin/env python
import sys
from datetime import datetime
begin = datetime(2018,2,27,13,10,31)
end = datetime(2018,2,27,13,47,34)
for line in sys.stdin.readlines():
if begin <= datetime.strptime(line.split('|')[2].strip(),'%Y/%m/%d %H:%M:%S') <= end:
print(line[:-1])
That snipped saved as filter.py and made executable (e.g. chmod +x) could then be called like this:
grep "Eps=" file.log | filter.py
Something like that will do the job in shell but as Stefan Sonnenberg-Carstens said in his answer consider using Python for that job:
#!/usr/bin/env sh
from=$(grep '2018/02/27 13:10:31' -n file.log | cut -d: -f1)
to=$(grep '2018/02/27 13:17:34' -n file.log | cut -d: -f1)
head -$to file.log | tail +$from
Output:
INFO | jvm 3 | 2018/02/27 13:10:31 | [Tue Feb 27 13:10:31 EST 2018] [INFO ] {Eps=5519.266666666666, Evts=2080274847}
INFO | jvm 3 | 2018/02/27 13:11:31 | [Tue Feb 27 13:11:31 EST 2018] [INFO ] {Eps=5342.8, Evts=2080595415}
INFO | jvm 3 | 2018/02/27 13:12:32 | [Tue Feb 27 13:12:32 EST 2018] [INFO ] {Eps=5230.183333333333, Evts=2080909226}
INFO | jvm 3 | 2018/02/27 13:13:32 | [Tue Feb 27 13:13:32 EST 2018] [INFO ] {Eps=4975.533333333334, Evts=2081207758}
INFO | jvm 3 | 2018/02/27 13:14:32 | [Tue Feb 27 13:14:32 EST 2018] [INFO ] {Eps=5225.283333333334, Evts=2081521275}
INFO | jvm 3 | 2018/02/27 13:15:33 | [Tue Feb 27 13:15:33 EST 2018] [INFO ] {Eps=5261.766666666666, Evts=2081836981}
INFO | jvm 3 | 2018/02/27 13:16:34 | [Tue Feb 27 13:16:34 EST 2018] [INFO ] {Eps=5257.688524590164, Evts=2082157700}
INFO | jvm 3 | 2018/02/27 13:17:34 | [Tue Feb 27 13:17:34 EST 2018] [INFO ] {Eps=5634.133333333333, Evts=2082495748}
Using a perl one-liner - try to find a more concise and clear way :)
perl -ne 'print if m|2018/02/27 13:10:31| .. m|2018/02/27 13:17:34|' file
Output :
INFO | jvm 3 | 2018/02/27 13:10:31 | [Tue Feb 27 13:10:31 EST 2018] [INFO ] {Eps=5519.266666666666, Evts=2080274847}
INFO | jvm 3 | 2018/02/27 13:11:31 | [Tue Feb 27 13:11:31 EST 2018] [INFO ] {Eps=5342.8, Evts=2080595415}
INFO | jvm 3 | 2018/02/27 13:12:32 | [Tue Feb 27 13:12:32 EST 2018] [INFO ] {Eps=5230.183333333333, Evts=2080909226}
INFO | jvm 3 | 2018/02/27 13:13:32 | [Tue Feb 27 13:13:32 EST 2018] [INFO ] {Eps=4975.533333333334, Evts=2081207758}
INFO | jvm 3 | 2018/02/27 13:14:32 | [Tue Feb 27 13:14:32 EST 2018] [INFO ] {Eps=5225.283333333334, Evts=2081521275}
INFO | jvm 3 | 2018/02/27 13:15:33 | [Tue Feb 27 13:15:33 EST 2018] [INFO ] {Eps=5261.766666666666, Evts=2081836981}
INFO | jvm 3 | 2018/02/27 13:16:34 | [Tue Feb 27 13:16:34 EST 2018] [INFO ] {Eps=5257.688524590164, Evts=2082157700}
INFO | jvm 3 | 2018/02/27 13:17:34 | [Tue Feb 27 13:17:34 EST 2018] [INFO ] {Eps=5634.133333333333, Evts=2082495748}

'Run as Spring Boot App' on STS but "webpage is not available" in the browser [duplicate]

This question already has answers here:
Why does my Spring Boot App always shutdown immediately after starting?
(23 answers)
Closed 7 years ago.
Like the title said, I right click on the spring boot project and Run as Spring Boot App. This is what I saw in the Console window of STS:
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.3.2.RELEASE)
2016-01-30 21:06:29.124 INFO 6584 --- [ main] l.IssueManagerApplication : Starting IssueManagerApplication on LVN with PID 6584 (E:\_WORKSPACE\SPRING_BOOT\issue-manager\target\classes started by Le in E:\_WORKSPACE\SPRING_BOOT\issue-manager)
2016-01-30 21:06:29.130 INFO 6584 --- [ main] l.IssueManagerApplication : No active profile set, falling back to default profiles: default
2016-01-30 21:06:29.249 INFO 6584 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#12d575ec: startup date [Sat Jan 30 21:06:29 EET 2016]; root of context hierarchy
2016-01-30 21:06:31.208 INFO 6584 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2016-01-30 21:06:32.032 INFO 6584 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-01-30 21:06:32.077 INFO 6584 --- [ main] l.IssueManagerApplication : Started IssueManagerApplication in 4.163 seconds (JVM running for 6.548)
2016-01-30 21:06:32.078 INFO 6584 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#12d575ec: startup date [Sat Jan 30 21:06:29 EET 2016]; root of context hierarchy
2016-01-30 21:06:32.084 INFO 6584 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
And when I open localhost:8080, it just displayed a grey page saying "This webpage is not available". Apparently the server does not start at all or it started but then stopped right after that.
I already tried run mvn spring-boot:run, it also log out information as above plus BUILD SUCCESS and stops even without me Ctrl + C. So I dont know how to run my "hello world" spring-boot application.
I resolved the issue by adding this in my pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Thanks to this post:
Why my Spring Boot App always shutdown

Resources