after I updated Cargo from version 1.6.2 to the newest version (1.8.4) , Cargo logs seem stuck even if my server works perfectly fine.
===========================================================================================================================================
______ ___ .______ _______ ______ _______ ___ _______ .___ ___. ______ .__ __.
/ | / \ | _ \ / _____| / __ \ | \ / \ | ____|| \/ | / __ \ | \ | |
| ,----' / ^ \ | |_) | | | __ | | | | | .--. | / ^ \ | |__ | \ / | | | | | | \| |
| | / /_\ \ | / | | |_ | | | | | | | | | / /_\ \ | __| | |\/| | | | | | | . ` |
| `----. / _____ \ | |\ \----.| |__| | | `--' | | '--' | / _____ \ | |____ | | | | | `--' | | |\ |
\______|/__/ \__\ | _| `._____| \______| \______/ |_______/ /__/ \__\ |_______||__| |__| \______/ |__| \__|
__ __ ____ ____ _______ __ ______ _______ ____ ____ __ _______ ____ __ ____ _______ .______
| | | | \ \ / / | ____| | | / __ \ / _____|\ \ / / | | | ____|\ \ / \ / / | ____|| _ \
| | | | \ \/ / | |__ | | | | | | | | __ \ \/ / | | | |__ \ \/ \/ / | |__ | |_) |
| | | | \ / | __| | | | | | | | | |_ | \ / | | | __| \ / | __| | /
| `----.| | \ / | |____ | `----.| `--' | | |__| | \ / | | | |____ \ /\ / | |____ | |\ \----.
|_______||__| \__/ |_______| |_______| \______/ \______| \__/ |__| |_______| \__/ \__/ |_______|| _| `._____|
===========================================================================================================================================
DATE Fri Jan 22 12:09:45 CET 2021
[10:35:54.123][info][talledLocalContainer] Tomcat 8.x starting...
[10:35:54.209][warn][stalledLocalDeployer] The WAR contains a context.xml file which sets the path to [webapp], which means path set it the Cargo configuration will be ignored by Tomcat
[10:35:54.209][info][stalledLocalDeployer] Deploying [/home/myapp/.cargo/workspace/myapp/myapp-deployable-2.1.7-SNAPSHOT.war] to [/home/cactus/.cargo/configurations/myapp/webapps]...
[10:36:15.367][info][talledLocalContainer] Tomcat 8.x started on port [8080]
[10:35:44.120][info][talledLocalContainer] Tomcat 8.x is stopping...
[10:35:49.123][info][talledLocalContainer] Tomcat 8.x is stopped
In this example , my application is actually running even if it looks like it has been stopped. And there is a loading icon in the lowest part of the log.
Has anybody had experienced the same problem in the past?
Related
I'm trying to restart the application by using RestartEndpoint, but it loops restart with Spring version 2.6.4 and java 11.
Any solutions for this problem?
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
<version>3.1.1</version>
</dependency>
#Component
public class TestRestartApplication {
#Autowired
private RestartEndpoint restartEndpoint;
public void restartApp() {
restartEndpoint.restart();
}
}
application.properties:
management.endpoint.restart.enabled=true
management.endpoints.web.exposure.include=restart,health
Console logs:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.6.4)
2022-03-16 20:53:29.904 INFO 1828 --- [ Thread-6] com.rean.ReloadSpringApplication : Starting ReloadSpringApplication using Java 11.0.2 on MSI with PID 1828 (D:\Rean Java\reload-spring-application\target\classes started by dawnt in D:\Rean Java\reload-spring-application)
2022-03-16 20:53:29.904 INFO 1828 --- [ Thread-6] com.rean.ReloadSpringApplication : No active profile set, falling back to 1 default profile: "default"
2022-03-16 20:53:30.030 INFO 1828 --- [ Thread-6] o.s.cloud.context.scope.GenericScope : BeanFactory id=abc9c58b-bafa-3329-a3c8-8f791cae2962
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.6.4)
2022-03-16 20:53:29.904 INFO 1828 --- [ Thread-6] com.rean.ReloadSpringApplication : Starting ReloadSpringApplication using Java 11.0.2 on MSI with PID 1828 (D:\Rean Java\reload-spring-application\target\classes started by dawnt in D:\Rean Java\reload-spring-application)
2022-03-16 20:53:29.904 INFO 1828 --- [ Thread-6] com.rean.ReloadSpringApplication : No active profile set, falling back to 1 default profile: "default"
2022-03-16 20:53:30.030 INFO 1828 --- [ Thread-6] o.s.cloud.context.scope.GenericScope : BeanFactory id=abc9c58b-bafa-3329-a3c8-8f791cae2962
Ive got a springboot application that when bundled into a docker image and published to Amazon ECS fails to start
The error message is:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| timestamp | message |
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1645724032287 | . ____ _ __ _ _ |
| 1645724032287 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ |
| 1645724032287 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ |
| 1645724032287 | \\/ ___)| |_)| | | | | || (_| | ) ) ) ) |
| 1645724032287 | ' |____| .__|_| |_|_| |_\__, | / / / / |
| 1645724032287 | =========|_|==============|___/=/_/_/_/ |
| 1645724032290 | :: Spring Boot :: |
| 1645724033092 | 17:33:53.090 [main] INFO com.jtmaxwell.Microservice.DocumentGenerator.Application - Starting Application using Java 11.0.14.1 on ip-172-31-20-189.eu-west-1.compute.internal with PID 1 (/app.jar started by root in /) |
| 1645724033093 | 17:33:53.093 [main] DEBUG com.jtmaxwell.Microservice.DocumentGenerator.Application - Running with Spring Boot, Spring |
| 1645724033093 | 17:33:53.093 [main] INFO com.jtmaxwell.Microservice.DocumentGenerator.Application - No active profile set, falling back to default profiles: default |
| 1645724033095 | 17:33:53.095 [main] DEBUG org.springframework.boot.SpringApplication - Loading source class com.jtmaxwell.Microservice.DocumentGenerator.Application |
| 1645724033893 | 17:33:53.893 [main] DEBUG org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#13acb0d1 |
| 1645724034087 | 17:33:54.087 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' |
| 1645724034591 | 17:33:54.590 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/app.jar!/com/jtmaxwell/Microservice/DocumentGenerator/config/MessagingConfig.class] |
| 1645724034601 | 17:33:54.599 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/app.jar!/com/jtmaxwell/Microservice/DocumentGenerator/consumer/User.class] |
| 1645724034697 | 17:33:54.693 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/app.jar!/com/jtmaxwell/Microservice/DocumentGenerator/publisher/OrderPublisher.class] |
| 1645724035094 | 17:33:55.094 [main] ERROR org.springframework.boot.SpringApplication - Application run failed |
| 1645724035094 | java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct. |
| 1645724035094 | at org.springframework.util.Assert.notEmpty(Assert.java:470) |
| 1645724035094 | at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getCandidateConfigurations(AutoConfigurationImportSelector.java:180) |
| 1645724035094 | at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getAutoConfigurationEntry(AutoConfigurationImportSelector.java:123) |
| 1645724035094 | at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector$AutoConfigurationGroup.process(AutoConfigurationImportSelector.java:434) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGrouping.getImports(ConfigurationClassParser.java:879) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247) |
| 1645724035094 | at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) |
| 1645724035094 | at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112) |
| 1645724035094 | at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746) |
| 1645724035094 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564) |
| 1645724035094 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) |
| 1645724035094 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) |
| 1645724035094 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) |
| 1645724035094 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) |
| 1645724035094 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) |
| 1645724035094 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) |
| 1645724035094 | at com.jtmaxwell.Microservice.DocumentGenerator.Application.main(Application.java:18) |
| 1645724035293 | 17:33:55.290 [main] DEBUG org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#13acb0d1, started on Thu Feb 24 17:33:53 UTC 2022 |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The pom.xml is
<?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.6.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.jtmaxwell</groupId>
<artifactId>microservice.documentgenerator</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Microservice.DocumentGenerator</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<repositories>
<repository>
<id>clojars.org</id>
<url>https://repo.clojars.org</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.erdos</groupId>
<artifactId>stencil-core</artifactId>
<version>0.3.29</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Can you please check first the docker images run outside of ECS? Seem there are some libs not got bundled as part of the docker build.
Also i assume your spring boot app runs locally
The answer here was as others highlighted. The image was missing dependencies due to the jar file from Visual Code being used for the docker build.
I ran the supplied
mvnw package
Then used the resulting jar file to build the docker image
I am trying to run my spring boot application using the docker-compose file but the service running inside the docker container is not able to connect to the database container.
Below is the exception stack trace from docker-compose logs
couchbase-demo | Starting Couchbase Server -- Web UI available at http://<ip>:8091
couchbase-demo | and logs available in /opt/couchbase/var/lib/couchbase/logs
couchbase-demo |
tech-blog | LOGBACK: No context given for c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy#589446616
tech-blog |
tech-blog | . ____ _ __ _ _
tech-blog | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
tech-blog | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
tech-blog | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
tech-blog | ' |____| .__|_| |_|_| |_\__, | / / / /
tech-blog | =========|_|==============|___/=/_/_/_/
tech-blog | :: Spring Boot :: (v2.2.4.RELEASE)
tech-blog |
tech-blog | 01:33:40.468 [main] INFO com.tech.blog.TechBlogApplication - Starting TechBlogApplication v0.0.2-SNAPSHOT on bf6509f5200d with PID 1 (/opt/tech/techblog.jar started by root in /opt/tech)
tech-blog | 01:33:40.477 [main] DEBUG com.tech.blog.TechBlogApplication - Running with Spring Boot v2.2.4.RELEASE, Spring v5.2.3.RELEASE
tech-blog | 01:33:40.477 [main] INFO com.tech.blog.TechBlogApplication - No active profile set, falling back to default profiles: default
^CGracefully stopping... (press Ctrl+C again to force)
Stopping tech-blog ... done
Stopping couchbase-demo ... done
srinathkavuri#Srinaths-MBP TechBlog % docker logs couchbase-demo
Starting Couchbase Server -- Web UI available at http://<ip>:8091
and logs available in /opt/couchbase/var/lib/couchbase/logs
Waiting for Couchbase Server to start....% srinathkavuri#Srinaths-MBP TechBlog % docker-compose up
Starting couchbase-demo ... done
Starting tech-blog ... done
Attaching to couchbase-demo, tech-blog
couchbase-demo | Starting Couchbase Server -- Web UI available at http://<ip>:8091
couchbase-demo | and logs available in /opt/couchbase/var/lib/couchbase/logs
tech-blog | LOGBACK: No context given for c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy#1908923184
tech-blog |
tech-blog | . ____ _ __ _ _
tech-blog | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
tech-blog | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
tech-blog | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
tech-blog | ' |____| .__|_| |_|_| |_\__, | / / / /
tech-blog | =========|_|==============|___/=/_/_/_/
tech-blog | :: Spring Boot :: (v2.2.4.RELEASE)
tech-blog |
couchbase-demo |
tech-blog | 02:07:25.243 [main] INFO com.tech.blog.TechBlogApplication - Starting TechBlogApplication v0.0.2-SNAPSHOT on bf6509f5200d with PID 1 (/opt/tech/techblog.jar started by root in /opt/tech)
tech-blog | 02:07:25.250 [main] DEBUG com.tech.blog.TechBlogApplication - Running with Spring Boot v2.2.4.RELEASE, Spring v5.2.3.RELEASE
tech-blog | 02:07:25.251 [main] INFO com.tech.blog.TechBlogApplication - No active profile set, falling back to default profiles: default
tech-blog | 02:07:28.543 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
tech-blog | 02:07:28.544 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.30]
tech-blog | 02:07:28.683 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
tech-blog | 02:07:29.984 [cb-events] INFO com.couchbase.core - [com.couchbase.core][DnsSrvLookupFailedEvent][30ms] DNS SRV lookup failed (name not found), trying to bootstrap from given hostname directly.
tech-blog | 02:07:30.795 [cb-events] INFO com.couchbase.core - [com.couchbase.core][CoreCreatedEvent] {"clientVersion":"3.0.3","clientGitHash":"e55f7d43","coreVersion":"2.0.4","coreGitHash":"e55f7d43","userAgent":"couchbase-java/3.0.3 (Linux 4.19.76-linuxkit amd64; OpenJDK 64-Bit Server VM 1.8.0_121-b13)","maxNumRequestsInRetry":32768,"ioEnvironment":{"nativeIoEnabled":true,"eventLoopThreadCount":2,"eventLoopGroups":["EpollEventLoopGroup"]},"ioConfig":{"captureTraffic":[],"mutationTokensEnabled":true,"networkResolution":"auto","dnsSrvEnabled":true,"tcpKeepAlivesEnabled":true,"tcpKeepAliveTimeMs":60000,"configPollIntervalMs":2500,"kvCircuitBreakerConfig":"disabled","queryCircuitBreakerConfig":"disabled","viewCircuitBreakerConfig":"disabled","searchCircuitBreakerConfig":"disabled","analyticsCircuitBreakerConfig":"disabled","managerCircuitBreakerConfig":"disabled","numKvConnections":1,"maxHttpConnections":12,"idleHttpConnectionTimeoutMs":30000,"configIdleRedialTimeoutMs":300000},"compressionConfig":{"enabled":true,"minRatio":0.83,"minSize":32},"securityConfig":{"tlsEnabled":false,"nativeTlsEnabled":true,"hasTrustCertificates":false,"trustManagerFactory":null},"timeoutConfig":{"kvMs":10000000,"kvDurableMs":10000,"managementMs":75000,"queryMs":75000,"viewMs":75000,"searchMs":75000,"analyticsMs":75000,"connectMs":10000000,"disconnectMs":10000},"loggerConfig":{"customLogger":null,"fallbackToConsole":false,"disableSlf4j":false,"loggerName":"CouchbaseLogger","diagnosticContextEnabled":false},"orphanReporterConfig":{"emitIntervalMs":10000,"sampleSize":10,"queueLength":1024},"retryStrategy":"BestEffortRetryStrategy","requestTracer":"OwnedSupplier"} {"coreId":"0xce88bae700000001"}
tech-blog | 02:07:30.806 [cb-events] INFO com.couchbase.node - [com.couchbase.node][NodeConnectedEvent] Node connected {"coreId":"0xce88bae700000001","managerPort":"8091","remote":"localhost"}
tech-blog | 02:07:30.829 [cb-events] WARN com.couchbase.endpoint - [com.couchbase.endpoint][EndpointConnectionFailedEvent][271ms] Connect attempt 1 failed because of AnnotatedConnectException: finishConnect(..) failed: Connection refused: localhost/127.0.0.1:11210 {"circuitBreaker":"DISABLED","coreId":"0xce88bae700000001","remote":"localhost:11210","type":"KV"}
tech-blog | com.couchbase.client.core.deps.io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: localhost/127.0.0.1:11210
tech-blog | Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused
tech-blog | at com.couchbase.client.core.deps.io.netty.channel.unix.Errors.throwConnectException(Errors.java:124)
tech-blog | at com.couchbase.client.core.deps.io.netty.channel.unix.Socket.finishConnect(Socket.java:243)
tech-blog | at com.couchbase.client.core.deps.io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:672)
tech-blog | at com.couchbase.client.core.deps.io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:649)
tech-blog | at com.couchbase.client.core.deps.io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:529)
tech-blog | at com.couchbase.client.core.deps.io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:465)
tech-blog | at com.couchbase.client.core.deps.io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378)
tech-blog | at com.couchbase.client.core.deps.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
tech-blog | at com.couchbase.client.core.deps.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
tech-blog | at com.couchbase.client.core.deps.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
tech-blog | at java.lang.Thread.run(Thread.java:745)
Below is my docker-compose file.
services:
couchbase.lcl:
image: bentonam/couchbase-docker:latest
container_name: couchbase-demo
ports:
- "8091-8094:8091-8094"
- "11210:11210"
environment:
CLUSTER_USERNAME: Administrator
CLUSTER_PASSWORD: pass
CLUSTER_NAME: TECH_BLOG_CLUSTER
SERVICES: data,index,query,fts
CLUSTER_RAMSIZE: 500
BUCKET: user-profile
BUCKET_RAMSIZE: 300
NODE_INIT_INDEX_PATH: /opt/couchbase/var/lib/couchbase/indexes
networks:
- tech-blog-network
techblog.lcl:
image: docker-tech-blog:latest
restart: always
container_name: tech-blog
links:
- couchbase.lcl
environment:
COUCHBASE_HOST: couchbase.lcl
depends_on:
- couchbase.lcl
ports:
- "8123:8123"
networks:
- tech-blog-network
networks:
tech-blog-network:
driver: bridge
Can anyone please let me know is there any issue with my docker-compose file?
Below is my spring configuration file
server:
port: 8123
logging:
level:
org.springframework: ERROR
com.tech.blog: DEBUG
pattern:
console: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
file: "%d %p %c{1.} [%t] %m%n"
file: /var/log/techblog.log
management:
endpoint:
health:
show-details: always
endpoints:
web:
exposure:
include: "*"
health:
defaults:
enabled: false
cb:
connectionTimeOut: 10000
kvTimeOut: 10000
hosts: localhost
cluster:
username: Administrator
password: pass
bucketname: user-profile
its not localhost when you are using docker container for each service.
change: hosts: localhost
to: hosts: couchbase.lcl
I am trying to deploy a war or a directory named root.war.
My code is able to scan and run the war.
But I am not able to access any web services and keep receiving a 404 not found error.
Can someone please tell me what I am doing wrong...
Thanks
ContextHandlerCollection contexts = new ContextHandlerCollection();
HandlerCollection handlers = new HandlerCollection();
handlers.setHandlers(new Handler[] { contexts, new DefaultHandler() });
WebAppProvider webAppProvider = new WebAppProvider();
webAppProvider.setMonitoredDirName( combine( BUILD , STAGING ) );
webAppProvider.setScanInterval( 1 );
DeploymentManager dm = new DeploymentManager();
dm.setContexts( contexts );
dm.setContextAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", ".*/servlet-api-[^/]*\\.jar$");
dm.addAppProvider( webAppProvider );
embeddedServer.addBean( dm );
embeddedServer.setHandler( handlers );
logAndDisplayInfo( "Attempting to start Jetty server");
addConnectors( embeddedServer );
embeddedServer.start();
Following is the log dump I see after putting: server.dumpAfterStart(true);
org.eclipse.jetty.server.Server#25bbe1b6 - STARTING
+= qtp1291286504{STARTED,8<=37<=200,i=1,q=0} - STARTED
| +- 15 qtp1291286504-15-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 20 qtp1291286504-20-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 85 qtp1291286504-85-acceptor-0#172f494e-ServerConnector#7a3c99f1{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} RUNNABLE # sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) prio=3
| +- 94 qtp1291286504-94-acceptor-0#61904002-ServerConnector#16b7e04a{SSL,[ssl, http/1.1]}{0.0.0.0:8443} RUNNABLE # sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) prio=3
| +- 19 qtp1291286504-19 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 17 qtp1291286504-17 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 76 qtp1291286504-76-acceptor-0#9f892f0-ServerConnector#3ec082a1{SSL,[ssl, http/1.1]}{0.0.0.0:9443} RUNNABLE # sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) prio=3
| +- 74 qtp1291286504-74 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 95 qtp1291286504-95 TIMED_WAITING # sun.misc.Unsafe.park(Native Method) IDLE
| +- 82 qtp1291286504-82-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 77 qtp1291286504-77 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 79 qtp1291286504-79 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 18 qtp1291286504-18-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 69 qtp1291286504-69-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 84 qtp1291286504-84-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 73 qtp1291286504-73-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 70 qtp1291286504-70 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 92 qtp1291286504-92 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 75 qtp1291286504-75-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 90 qtp1291286504-90 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 78 qtp1291286504-78-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 68 qtp1291286504-68 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 88 qtp1291286504-88 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 83 qtp1291286504-83 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 72 qtp1291286504-72 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 21 qtp1291286504-21 RUNNABLE # sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 16 qtp1291286504-16-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 80 qtp1291286504-80-lowPrioritySelector BLOCKED # org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:244) prio=1
| +- 67 qtp1291286504-67-acceptor-0#6478ae7e-ServerConnector#18811c42{HTTP/1.1,[http/1.1]}{0.0.0.0:90} RUNNABLE # sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) prio=3
| +- jobs
+= ServerConnector#7a3c99f1{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} - STARTED
| +~ org.eclipse.jetty.server.Server#25bbe1b6 - STARTING
| +~ qtp1291286504{STARTED,8<=38<=200,i=2,q=0} - STARTED
| += org.eclipse.jetty.util.thread.ScheduledExecutorScheduler#55fe41ea - STARTED
| +- org.eclipse.jetty.io.ArrayByteBufferPool#7f030c72
| += org.eclipse.jetty.server.ServerConnector$ServerConnectorManager#68d8ae27 - STARTED
| | += org.eclipse.jetty.io.ManagedSelector#18513c23 id=0 keys=0 selected=0 id=0
| | | +- sun.nio.ch.WindowsSelectorImpl#69ea9e1b keys=0
| | += org.eclipse.jetty.io.ManagedSelector#6be50b35 id=1 keys=0 selected=0 id=1
| | | +- sun.nio.ch.WindowsSelectorImpl#606b79f7 keys=0
| | += org.eclipse.jetty.io.ManagedSelector#ce2eaa7 id=2 keys=0 selected=0 id=2
| | | +- sun.nio.ch.WindowsSelectorImpl#6678dc4f keys=0
| | += org.eclipse.jetty.io.ManagedSelector#2166c48a id=3 keys=0 selected=0 id=3
| | +- sun.nio.ch.WindowsSelectorImpl#7610a6e1 keys=0
| += HttpConnectionFactory#1ce24091[HTTP/1.1] - STARTED
| | +- HttpConfiguration#304744a1{32768/8192,8192/8192,https://:8443,[SecureRequestCustomizer#73385d3f]}
| +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:8080]
| +- qtp1291286504-85-acceptor-0#172f494e-ServerConnector#7a3c99f1{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
+= org.eclipse.jetty.server.handler.ContextHandlerCollection#6cd7f381[o.e.j.w.WebAppContext#16a0ee18{/<obsucredText>.war,file:///S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/,AVAILABLE}{S:\Ent\<obsucredText>\build\staging\<obsucredText>.war}] - STARTED
| += o.e.j.w.WebAppContext#16a0ee18{/<obsucredText>.war,file:///S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/,AVAILABLE}{S:\Ent\<obsucredText>\build\staging\<obsucredText>.war} - STARTED
| += org.eclipse.jetty.server.session.SessionHandler2113133067==dftMaxIdleSec=1800 - STARTED
| | += org.eclipse.jetty.security.ConstraintSecurityHandler#4e5d5ac1 - STARTED
| | | +- org.eclipse.jetty.security.DefaultAuthenticatorFactory#70777a65
| | | += org.eclipse.jetty.servlet.ServletHandler#236fd411 - STARTED
| | | | += org.eclipse.jetty.servlet.ListenerHolder#402f61f5 - STARTED
| | | | += org.eclipse.jetty.servlet.ListenerHolder#6480a063 - STARTED
| | | | += default#5c13d641==org.eclipse.jetty.servlet.DefaultServlet,jsp=null,order=0,inst=true - STARTED
| | | | | +- aliases=false
| | | | | +- dirAllowed=true
| | | | | +- maxCacheSize=256000000
| | | | | +- maxCachedFileSize=200000000
| | | | | +- welcomeServlets=false
| | | | | +- useFileMappedBuffer=true
| | | | | +- acceptRanges=true
| | | | | +- etags=false
| | | | | +- maxCachedFiles=2048
| | | | | +- redirectWelcome=false
| | | | += jsp#19c47==org.eclipse.jetty.jsp.JettyJspServlet,jsp=null,order=0,inst=true - STARTED
| | | | | +- fork=false
| | | | | +- compilerSourceVM=1.7
| | | | | +- logVerbosityLevel=DEBUG
| | | | | +- compilerTargetVM=1.7
| | | | | +- scratchdir=C:\Users\cs185225\AppData\Local\Temp\jetty-0.0.0.0-90-<obsucredText>.war-_<obsucredText>.war-any-2397625917440130731.dir\jsp
| | | | | +- xpoweredBy=false
| | | | +- [/]=>default
| | | | +- [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp
| | | | += org.eclipse.jetty.servlet.ListenerHolder#2f6f4ac4 - STARTED
| | | | += org.eclipse.jetty.servlet.ListenerHolder#727dcc64 - STARTED
| | | | += org.eclipse.jetty.servlet.ListenerHolder#49e62b17 - STARTED
| | | | += Charset Filter - STARTED
| | | | | +- requestEncoding=UTF-8
| | | | += MemberProfileExportServlet#dfb4eea2==com.<obsucredText>.presentation.servlet.ef.MemberProfileExportServlet,jsp=null,order=5,inst=true - STARTED
| | | | += <obsucredText>CSSDownloadServlet#8cb4a90e==com.<obsucredText>.presentation.servlet.ef.<obsucredText>CSSDownloadServlet,jsp=null,order=6,inst=true - STARTED
| | | | += ServiceControlManager#36677185==com.<obsucredText>.enterprise.ServiceControlManagerServlet,jsp=null,order=2,inst=true - STARTED
| | | | += MemberLookupServlet#25bfad1==com.<obsucredText>.presentation.servlet.ef.MemberLookupServlet,jsp=null,order=6,inst=true - STARTED
| | | | +- [/*]/[]==0=>Charset Filter
| | | | +- [/insightws/*]=>CXFServlet
| | | | +- [/initLogging]=>AAInitLog4j
| | | | +- [*.do]=>action
| | | | +- [/servlet/services]=>ServiceControlManager
| | | | +- [/tran/*]=>JerseyREST_TRAN
| | | |
| | | +> null
| | | +> null
| | | +> null
| | | +> []
| | | +> /={TRACE={RoleInfo,F,C[],None}, TRACE.omission={RoleInfo[],None}}
| | += org.eclipse.jetty.server.session.DefaultSessionCache#288409f0[evict=-1,removeUnloadable=false,saveO<obsucredText>eate=false,saveOnInactiveEvict=false] - STARTED
| | | += org.eclipse.jetty.server.session.NullSessionDataStore#7d685f4e[passivating=false,graceSec=3600] - STARTED
| | +~ org.eclipse.jetty.server.session.DefaultSessionIdManager#61eab26b[worker=node0] - STARTED
| += org.eclipse.jetty.servlet.ErrorPageErrorHandler#19ac93d2 - STARTED
| |
| +> WebAppClassLoader=Virtual BackOffice#58d75e99
| | +- file:/S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/WEB-INF/classes/
| | +- file:/S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/WEB-INF/lib/common-annotations.jar
| | +- sun.misc.Launcher$AppClassLoader#18b4aac2
| +> Systemclasses o.e.j.w.WebAppContext#16a0ee18{/<obsucredText>.war,file:///S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/,AVAILABLE}{S:\Ent\<obsucredText>\build\staging\<obsucredText>.war}
| | +- java.
| | +- javax.
| | +- org.w3c.
| | +- org.xml.
| +> Serverclasses o.e.j.w.WebAppContext#16a0ee18{/<obsucredText>.war,file:///S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/,AVAILABLE}{S:\Ent\<obsucredText>\build\staging\<obsucredText>.war}
| | <jetty jars>
| | +- org.eclipse.jdt.
| | +- org.eclipse.jetty.
| | +- org.objectweb.asm.
| +> Configurations o.e.j.w.WebAppContext#16a0ee18{/<obsucredText>.war,file:///S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/,AVAILABLE}{S:\Ent\<obsucredText>\build\staging\<obsucredText>.war}
| | +- org.eclipse.jetty.webapp.WebInfConfiguration#116fc29e
| | +- org.eclipse.jetty.webapp.WebXmlConfiguration#2e426dd2
| | +- org.eclipse.jetty.webapp.MetaInfConfiguration#1a0ffb9b
| | +- org.eclipse.jetty.webapp.FragmentConfiguration#67c0c90b
| | +- org.eclipse.jetty.webapp.JettyWebXmlConfiguration#8549c5f
| +> Handler attributes o.e.j.w.WebAppContext#16a0ee18{/<obsucredText>.war,file:///S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/,AVAILABLE}{S:\Ent\<obsucredText>\build\staging\<obsucredText>.war}
| | +- javax.servlet.context.tempdir=C:\Users\cs185225\AppData\Local\Temp\jetty-0.0.0.0-90-<obsucredText>.war-_<obsucredText>.war-any-2397625917440130731.dir
| | +- org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=.*/servlet-api-[^/]*\.jar$
| | +- org.eclipse.jetty.server.Executor=qtp1291286504{STARTED,8<=38<=200,i=2,q=0}
| | +- org.apache.catalina.jsp_classpath=S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\classes;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\abdera-core-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\abdera-extensions-json-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\abdera-extensions-main-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\abdera-i18n-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\abdera-parser-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\activation-1.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\antlr-2.7.7.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\aopalliance-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\apache-log4j-extras-1.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\apache-log4j-receivers-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\asm-2.2.3.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\asm-attrs-1.5.3.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\axiom-api-1.2.7.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\axiom-impl-1.2.7.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\batik-awt-util.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\batik-dom.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\batik-svggen.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\batik-util.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\batik-xml.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\bcmail-jdk15on-1.47.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\bcpkix-jdk15on-1.52.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\bcprov-jdk15on-1.52.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\bsf-2.3.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\bsh-2.0b4.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\byte-buddy-1.6.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\byte-buddy-agent-1.6.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\cewolf.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\cglib-2.1_3.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\common-annotations.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-beanutils-1.8.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-chain-1.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-cli-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-cli.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-codec-1.7.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-collections-3.2.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-digester-1.8.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-el.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-fileupload-1.1.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-httpclient-3.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-io-1.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-lang-2.4.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-logging-1.0.4.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-logging-1.1.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-logging-api.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-pool-1.5.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-pool2-2.3.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\commons-validator-1.3.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\cxf-bundle-2.2.10.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\dom4j-1.6.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\ehcache-1.2.3.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\enterprise-core-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\ezmorph-1.0.5.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\geronimo-activation_1.1_spec-1.0.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\geronimo-annotation_1.0_spec-1.1.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\geronimo-jaxws_2.1_spec-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\geronimo-jms_1.1_spec-1.1.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\geronimo-servlet_2.5_spec-1.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\geronimo-stax-api_1.0_spec-1.0.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\geronimo-ws-metadata_2.0_spec-1.1.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\groovy-all-2.4.4.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\gson-2.2.4.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\hibernate-3.2.1.ga.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\hibernate-commons-annotations-3.3.0.ga.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\hibernate-validator-4.1.0.Final.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jackson-annotations-2.1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jackson-core-2.1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jackson-core-asl-1.9.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jackson-databind-2.1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jackson-jaxrs-1.9.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jackson-mapper-asl-1.9.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jackson-xc-1.9.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jasperreports-4.1.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jaxb-api-2.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jaxb-impl-2.1.13.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jaxb-xjc-2.1.13.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jaxen-1.1.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jdbm-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jdom-1.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jdom.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\je-4.1.7.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jedis-2.6.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jersey-bundle-1.18.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jersey-json-1.18.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jersey-test-framework-core-1.18.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jersey-test-framework-http-1.18.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jettison-1.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jfreechart-0.9.21.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jline-0.9.94.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jpos-1.8.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jra-1.0-alpha-4.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\js-1.7R1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\json-lib-2.2.2-jdk15.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\json-smart-1.3.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jstl-1.0.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\jtds-1.2.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\junit-4.10.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\junitperf-1.9.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\log4j-1.2.16.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\lz4-1.2.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\mockito-core-2.6.3.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\mybatis-3.0.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\neethi-2.0.4.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\nimbus-jose-jwt-4.26.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\objenesis-2.5.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\oro-2.0.8.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\passkit4j-2.0.2-<obsucredText>.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\persistence-api-1.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\primrose.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\quartz-2.2.3.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\reflections-0.9.10.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\saaj-api-1.3.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\saaj-impl-1.3.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\saxon-9.1.0.8.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\saxon-dom-9.1.0.8.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\saxon9-dom.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\serializer-2.7.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\slf4j-api-1.5.8.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\slf4j-jdk14-1.5.8.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\slf4j-nop-1.5.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\spock-core-1.0-groovy-2.4.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\spring-beans-2.5.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\spring-context-2.5.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\spring-context-support-2.5.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\spring-core-2.5.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\spring-jms-2.5.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\spring-tx-2.5.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\spring-web-2.5.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\standard-1.0.6.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\standard.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\struts-core-1.3.10.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\struts-el-1.3.10.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\struts-extras-1.3.10.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\struts-taglib-1.3.10.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\struts-tiles-1.3.10.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\urlrewritefilter.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\validation-api-1.0.0.GA.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\velocity-1.6.4.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\wsdl4j-1.6.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\wss4j-1.5.8.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\wstx-asl-3.2.9.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xalan-2.7.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xercesImpl-2.9.1.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xercesImpl.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xml-apis-1.3.04.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xml-apis.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xml-resolver-1.2.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xmlbeans-2.4.0.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\XmlSchema-1.4.5.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xmlsec-1.4.3.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xpp3_min-1.1.4c.jar;S:\Ent\<obsucredText>\build\staging\<obsucredText>.war\WEB-INF\lib\xstream-1.3.1.jar
| +> Context attributes o.e.j.w.WebAppContext#16a0ee18{/<obsucredText>.war,file:///S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/,AVAILABLE}{S:\Ent\<obsucredText>\build\staging\<obsucredText>.war}
| | +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=1]
| | +- org.apache.struts.action.MESSAGE=org.apache.struts.util.PropertyMessageResources#35454c7a
| | +- resourceCache=ResourceCache[null,org.eclipse.jetty.servlet.DefaultServlet#50f3ba6a]#832219630
| | +- rpcRouter=org.apache.soap.server.RPCRouter#1d806de6
| | +- org.apache.struts.action.MODULE=org.apache.struts.config.impl.ModuleConfigImpl#2b9d4b0
| | +- org.apache.struts.action.PLUG_INS=[Lorg.apache.struts.action.PlugIn;#4f541e67
| | +- allAppenders=[org.apache.log4j.DailyRollingFileAppender#2be50bba, org.apache.log4j.DailyRollingFileAppender#3514ac7d, org.apache.log4j.DailyRollingFileAppender#79c4f23b]
| | +- org.springframework.web.context.WebApplicationContext.ROOT=org.springframework.web.context.support.XmlWebApplicationContext#601cbd8c: display name [Root WebApplicationContext]; startup date [Thu Jun 08 16:56:29 CDT 2017]; root of context hierarchy
| | +- org.apache.struts.globals.MODULE_PREFIXES=[Ljava.lang.String;#160c7c42
| | +- org.apache.struts.action.SERVLET_MAPPING=*.do
| | +- org.apache.struts.action.ACTION_SERVLET=org.apache.struts.action.ActionServlet#15371de2
| | +- serviceManager=org.apache.soap.server.ServiceManager#5503c7d
| +> Initparams o.e.j.w.WebAppContext#16a0ee18{/<obsucredText>.war,file:///S:/Ent/<obsucredText>/build/staging/<obsucredText>.war/,AVAILABLE}{S:\Ent\<obsucredText>\build\staging\<obsucredText>.war}
| +- javax.faces.DEFAULT_SUFFIX=.xhtml
| +- com.<obsucredText>.presentation.jsf.phaselistener.phaseTracker.cphase=ANY_PHASE
| +- com.sun.faces.numberOfLogicalViews=0
| +- facelets.DEVELOPMENT=true
| +- javax.servlet.jsp.jstl.fmt.localizationContext=com.<obsucredText>.presentation.resources.LoggingResources
| +- facelets.REFRESH_PERIOD=-1
| +- facelets.LIBRARIES=/WEB-INF/facelets/tag-af.xml
| +- contextConfigLocation=WEB-INF/beans.xml
| +- com.sun.faces.verifyObjects=true
| +- com.sun.faces.validateXml=true
| +- javax.faces.STATE_SAVING_METHOD=client
| +- org.ajax4jsf.handleViewExpiredOnClient=true
| +- org.richfaces.SKIN=<obsucredText>
+= org.eclipse.jetty.deploy.DeploymentManager#5b5b53c6 - STARTED
| +~ org.eclipse.jetty.deploy.providers.WebAppProvider#2ec0ca83 - STARTED
+= org.eclipse.jetty.server.handler.ErrorHandler#3350ab4 - STARTED
+- {}
+- {}
+- {}
+= org.eclipse.jetty.server.session.DefaultSessionIdManager#61eab26b[worker=node0] - STARTED
| += org.eclipse.jetty.server.session.HouseKeeper#7827d7b[interval=600000, ownscheduler=true] - STARTED
|
+> sun.misc.Launcher$AppClassLoader#18b4aac2
I am using Spring boot for my tomcat deploy of my webapp. On my mac, and on a fellow developers linux install (not sure of his distro), the catalina.out file has just one instance of the spring ascii art indicating that it booted up just once as expected.
On our development and production servers, both centOS and mirrors of one another, the catalina.out file has five instances of the Spring ascii art indicating that it is "booting" 5 times! I have code that runs in the onStartup method of my RestApplication that extends SpringBootServletInitializer and that code runs 5 times verifying that spring is booting up 5 times. Why is this happening on our production machines but not on our development machines? War files are deployed to tomcat 8 in all instances.
It takes many minutes before the webapp is ready as a result.
At first I thought maybe it was linked the number of clases tagged #RestController since that seemed about 5, but it turns out we have 7 classes with this tag. So, I can't find anything that would match up with this number of 5 boots.
Any thoughts? Cheers.
UPDATE
Here is my log file with an exception stack trace in the onStartup method. It is looking for a file of the name servletContext.getContextPath() + "_init.properties". As you can see we are alternating between a DeployWar with the name of "wildbook" (correct name of my war file) and a StartChild with the name of "". Except the last DeployWar does not seem to trigger a StartChild.
INFO | jvm 1 | 2015/09/30 19:40:53 |
INFO | jvm 1 | 2015/09/30 19:40:53 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:40:53 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:40:53 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:40:53 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:40:53 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:40:53 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:40:53 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:40:53 |
INFO | jvm 1 | 2015/09/30 19:41:02 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:02 | java.io.FileNotFoundException: /opt/tomcat8/conf/wildbook_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:03 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:41:17 |
INFO | jvm 1 | 2015/09/30 19:41:17 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:41:17 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:17 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:17 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:41:17 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:41:17 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:41:17 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:41:17 |
INFO | jvm 1 | 2015/09/30 19:41:24 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:24 | java.io.FileNotFoundException: /opt/tomcat8/conf/_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:25 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:41:34 |
INFO | jvm 1 | 2015/09/30 19:41:34 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:41:34 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:34 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:34 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:41:34 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:41:34 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:41:34 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:41:34 |
INFO | jvm 1 | 2015/09/30 19:41:40 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:40 | java.io.FileNotFoundException: /opt/tomcat8/conf/wildbook_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:41 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:41:50 |
INFO | jvm 1 | 2015/09/30 19:41:50 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:41:50 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:50 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:50 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:41:50 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:41:50 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:41:50 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:41:50 |
INFO | jvm 1 | 2015/09/30 19:41:55 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:55 | java.io.FileNotFoundException: /opt/tomcat8/conf/_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:56 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:42:05 |
INFO | jvm 1 | 2015/09/30 19:42:05 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:42:05 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:42:05 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:42:05 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:42:05 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:42:05 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:42:05 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:42:05 |
INFO | jvm 1 | 2015/09/30 19:42:13 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:42:13 | java.io.FileNotFoundException: /opt/tomcat8/conf/wildbook_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
Second Update
Here is my SpringBootServletInitializer in it's entirety as requested.
package org.ecocean.rest;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import org.ecocean.ShepherdPMF;
import org.flywaydb.core.Flyway;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.samsix.database.ConnectionInfo;
#Configuration
#EnableAutoConfiguration
#ComponentScan
public class RestApplication extends SpringBootServletInitializer {
/**
* This method should allow you to start up the rest service from a compiled jar rather
* than having to make a war and stick it in tomcat.
*/
public static void main(final String[] args) {
SpringApplication.run(RestApplication.class, args);
}
#Override
protected final SpringApplicationBuilder configure(final SpringApplicationBuilder application) {
// ObjectMapper mapper = new ObjectMapper();
// mapper.registerModule(new JodaModule());
return application.sources(RestApplication.class);
}
#Override
public void onStartup(final ServletContext servletContext) throws ServletException
{
super.onStartup(servletContext);
//
// Uses default location of db/migration on classpath. You will find it in the src/main/resources folder.
// OutOfOrder = true makes it so that if two developers create SQL in a different order and one somehow
// gets applied to the database, the other's should too. This should only be an issue on development
// databases and allows me to get other developers sql patches even if I've applied a newer one myself
// locally. In production, everything should be fine.
//
ConnectionInfo connectionInfo = ShepherdPMF.getConnectionInfo();
Flyway flyway = new Flyway();
flyway.setOutOfOrder(true);
flyway.setSqlMigrationPrefix("");
flyway.setDataSource(connectionInfo.getUrl(), connectionInfo.getUserName(), connectionInfo.getPassword());
flyway.migrate();
}
#Bean
public ServletRegistrationBean servletRegistrationBean(){
return new ServletRegistrationBean(new MediaUploadServlet(),"/mediaupload");
}
}