正在启动JHipster应用程序无法正常工作:应用程序挂在初始日志上,因此无法启动[编辑]

时间:2019-02-04 22:37:02

标签: java spring-boot jhipster

我在Manjaro Linux Intel i7(x64)上运行JHipster 5.8.1,并且我的Jhipster应用程序遇到问题。 也就是说,我创建了一个项目,正确导入了我的jdl实体,并在application-dev.yml文件中配置了该应用程序,但是当我运行mvn spring-boot:run时,JHipster会打印一些日志行,并且程序会卡在其中一个并挂起,长时间在线

  

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

直到无法获取锁都抛出SQLException

例如,我尝试检查后端生成的代码,将spring.profiles.active从dev更改为:

  

春天:      个人资料:          活跃:开发人员,快速

这是完整的日志:

[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 

可能的原因似乎是mysql由于未知原因拒绝连接。 我希望Jhipster可以启动应用程序并显示从后端和前端访问应用程序的链接。

感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

在日志OutOfMemoryError中进行检查。

我认为,可能是为了您的内存,也许您需要更多的内存,或者您可以配置使用更多的内存(请检查以下链接),或者使用其他服务器,也许是云。

链接,要配置更多内存,请查看以下答案:

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

Error Java heap space

希望您能帮忙。