Edmond Edmond - 8 days ago 5
Java Question

How to start jhipster microservice application without tomcat

I have created a jhipster (v3.4.0) microservice app and wanted to deploy it on production but not on a tomcat instance. I've configure it not to require jhipster-registry nor jhipster-console for log forwarding. So what I want to achieve is to run it as a java app/jar.

Here are my logs from running it with dev profile:

hostname:myapp edmond$ ./mvnw
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Myapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.3.5.RELEASE:run (default-cli) > test-compile @ myapp >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myapp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 43 resources
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) @ myapp ---
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.6.201602180812:prepare-agent (pre-unit-tests) @ myapp ---
[INFO] surefireArgLine set to -javaagent:/Users/edmond/.m2/repository/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-runtime.jar=destfile=/Users/edmond/workspace/myapp/target/test-results/coverage/jacoco/jacoco.exec
[INFO]
[INFO] --- maven-processor-plugin:2.2.4:process (process) @ myapp ---
[WARNING] diagnostic: warning: The following options were not recognized by any processor: '[mapstruct.defaultComponentModel, mapstruct.suppressGeneratorTimestamp]'
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ myapp ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 161 source files to /Users/edmond/workspace/myapp/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ myapp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ myapp ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 24 source files to /Users/edmond/workspace/myapp/target/test-classes
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.3.5.RELEASE:run (default-cli) < test-compile @ myapp <<<
[INFO]
[INFO] --- spring-boot-maven-plugin:1.3.5.RELEASE:run (default-cli) @ myapp ---
2016-09-17 13:02:17.453 DEBUG 3087 --- [kground-preinit] org.jboss.logging : Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property

██ ██ ██ ████████ ███████ ██████ ████████ ████████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ████████ ██ ███████ █████ ██ ██████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██ ██ ████████ ██ ██████ ██ ████████ ██ ██

:: JHipster

Answer

after a closer look at your logs, I think IMHO that your app is trying to get the configuration for your app, i.e. is looking up for http://localhost:8888/myapp/default.

Under the port 8888 is running mostly the spring clod config service (here is the documentation). Since you don't want to run the registry service check how your microservice is configured, e.g. have a look at the boostrap-[profile].yml in the config folder of your app.

cheers,duderoot

Comments