Guilherme Smethurst
Guilherme Smethurst

Reputation: 41

Starting JHipster application not working: app hangs on initial logs and do not start [EDITED]

I'm running JHipster 5.8.1 on a Manjaro Linux Intel i7 (x64) and I'm facing a problem with my Jhipster application. That is, I created a project, imported my jdl entities correctly and configured the application in application-dev.yml file, but when I run mvn spring-boot:run JHipster prints some log lines and program gets stuck in one of them and hangs for a long time at line

2019-02-04 19:30:01.448 DEBUG 13716 --- [ restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration : Started Swagger in 13ms

until is throws a SQLException for it couldn't acquire lock

For instance, I've tried to inspect backend generated code, change spring.profiles.active from dev to:

spring: profiles: active: dev, fast

Here is the complete log:

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< br.ufpa.labes.spm:spm >------------------------
[INFO] Building Spm 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.0.8.RELEASE:run (default-cli) > test-compile @ spm >>>
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:copy-resources (default-resources) @ spm ---
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ spm ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 342 resources
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-versions) @ spm ---
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.2:prepare-agent (pre-unit-tests) @ spm ---
[INFO] argLine set to -javaagent:/home/arjuna/.m2/repository/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2-runtime.jar=destfile=/home/arjuna/Documentos/Algoritmos/JHipster/spm/target/test-results/coverage/jacoco/jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx256m
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ spm ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 868 source files to /home/arjuna/Documentos/Algoritmos/JHipster/spm/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ spm ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ spm ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.0.8.RELEASE:run (default-cli) < test-compile @ spm <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.0.8.RELEASE:run (default-cli) @ spm ---
[INFO] Attaching agents: []
The Class-Path manifest attribute in /home/arjuna/.m2/repository/org/liquibase/liquibase-core/3.5.5/liquibase-core-3.5.5.jar referenced one or more files thatdo not exist: file:/home/arjuna/.m2/repository/org/liquibase/liquibase-core/3.5.5/lib/snakeyaml-1.13.jar

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝

:: JHipster 🤓  :: Running Spring Boot 2.0.8.RELEASE ::
:: https://www.jhipster.tech ::

2019-02-05 23:32:04.146 DEBUG 15146 --- [  restartedMain] b.u.labes.spm.config.AsyncConfiguration  : Creating Async Task Executor
2019-02-05 23:32:06.359 DEBUG 15146 --- [  restartedMain] c.ehcache.core.Ehcache-usersByLogin      : Initialize successful.

//Database tables initializing

c.e.c.E.u.labes.spm.domain.UserPlugin    : Initialize successful.
2019-02-05 23:32:08.407 DEBUG 15146 --- [  restartedMain] b.u.l.spm.config.LiquibaseConfiguration  : Configuring Liquibase
2019-02-05 23:32:09.603 ERROR 15146 --- [  restartedMain] com.zaxxer.hikari.pool.HikariPool        : Hikari - Exception during pool initialization.

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:342)
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2197)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2230)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2025)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:778)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
        at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:117)
        at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:123)
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:365)
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:194)
        at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:460)
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:534)
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
        at 

//      ...stacktrace methods catches

        at 
org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:301)
        ... 147 common frames omitted

2019-02-05 23:32:15.950 DEBUG 15146 --- [  restartedMain] br.ufpa.labes.spm.config.WebConfigurer   : Registering CORS filter
2019-02-05 23:32:16.067  INFO 15146 --- [  restartedMain] br.ufpa.labes.spm.config.WebConfigurer   : Web application configuration, using profiles: dev
2019-02-05 23:32:16.068  INFO 15146 --- [  restartedMain] br.ufpa.labes.spm.config.WebConfigurer   : Web application fully configured
2019-02-05 23:32:16.489 DEBUG 15146 --- [  restartedMain] b.u.l.spm.security.jwt.TokenProvider     : Using a Base64-encoded JWT secret key
2019-02-05 23:32:31.019 DEBUG 15146 --- [  restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration  : Starting Swagger
2019-02-05 23:32:31.034 DEBUG 15146 --- [  restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration  : Started Swagger in 15 

Possible cause seems to be mysql is refusing connections for an unknown reason. I expect Jhipster to start application and show links to access application from working both backend and frontend.

Thanks for helping!

Upvotes: 0

Views: 2141

Answers (1)

Arenas V.
Arenas V.

Reputation: 193

Check this in the log, OutOfMemoryError.

I think, probably is for your memory, maybe u need more memory, or u can config for use more (check the following links) or in other sever, maybe cloud.

Links, to configure more memory, check these answers:

How to deal with “java.lang.OutOfMemoryError: Java heap space” error?

Error Java heap space

I hope you help, regards.

Upvotes: 1

Related Questions