我正在Clevercloud上部署Jhipster应用程序。
我已经设置了一些配置:
war.json
{
"build": {
"type": "maven",
"goal": "package -Pprod -DskipTests"
},
"deploy": {
"goal": "package -Pprod -DskipTests",
"container": "TOMCAT8",
"war": [
{
"file": "target/myapp-1.0.0.war"
}
]
}
}
maven.json
{
"build": {
"type": "maven",
"goal": "package -Pprod -DskipTests"
},
"deploy": {
"goal": "package -Pprod -DskipTests"
}
}
我修改了application-prod.yml以包含db add-on的url / username / password。
部署时,部署成功,但应用程序未运行。
在应用程序页面上,我有404错误。 DB已正确初始化。 在日志中,我有以下消息,我不明白或者我无法解决:
此消息多次
2017-09-18T09:21:22.701Z: 09:21:21.483 [localhost-startStop-1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/logging.exception-conversion-word]
2017-09-18T09:21:22.702Z: 09:21:21.486 [localhost-startStop-1] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/logging.exception-conversion-word] not found - trying original name [logging.exception-conversion-word]. javax.naming.NameNotFoundException: Name [logging.exception-conversion-word] is not bound in this Context. Unable to find [logging.exception-conversion-word].
2017-09-18T09:21:22.702Z: 09:21:21.486 [localhost-startStop-1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [logging.exception-conversion-word]
2017-09-18T09:21:22.702Z: 09:21:21.486 [localhost-startStop-1] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [logging.exception-conversion-word] threw NamingException with message: Name [logging.exception-conversion-word] is not bound in this Context. Unable to find [logging.exception-conversion-word].. Returning null.
然后:
2017-09-18T09:21:22.777Z: [09:21:12.705][debug][talledLocalContainer] Connection attempt with socket Socket[unconnected], current time is 1505726472705
2017-09-18T09:21:22.778Z: [09:21:12.705][debug][talledLocalContainer] Socket Socket[unconnected] for port 8009 closed
2017-09-18T09:21:22.778Z: [09:21:13.068][debug][talledLocalContainer] Executing '/usr/x86_64-pc-linux-gnu/lib/icedtea8/jre/bin/java' with arguments:
2017-09-18T09:21:22.778Z: '-version'
2017-09-18T09:21:22.778Z: The ' characters around the executable and arguments are
2017-09-18T09:21:22.778Z: not part of the command.
2017-09-18T09:21:22.779Z: [09:21:13.085][debug][talledLocalContainer] Output appended to /tmp/cargo-jvm-version-4176730048875251522.txt
2017-09-18T09:21:22.779Z: [09:21:13.085][debug][talledLocalContainer] Error appended to /tmp/cargo-jvm-version-4176730048875251522.txt
2017-09-18T09:21:22.779Z: [09:21:13.086][debug][talledLocalContainer] Project base dir set to: /home/bas/app_4b724c3b-6703-474e-9ec4-65d775cd0013
2017-09-18T09:21:22.779Z: [09:21:13.086][debug][talledLocalContainer] Execute:Java13CommandLauncher: Executing '/usr/x86_64-pc-linux-gnu/lib/icedtea8/jre/bin/java' with arguments:
2017-09-18T09:21:22.779Z: '-version'
2017-09-18T09:21:22.779Z: The ' characters around the executable and arguments are
2017-09-18T09:21:22.779Z: not part of the command.
倍数:
2017-09-18T09:21:22.793Z: [09:21:13.416][debug][URLDeployableMonitor] Checking URL [http://localhost:8080/cargocpc/index.html] for status using a timeout of [120000] ms...
2017-09-18T09:21:22.794Z: [09:21:13.452][debug][URLDeployableMonitor] URL [http://localhost:8080/cargocpc/index.html] is not responding: -1 java.net.ConnectException: Connection refused (Connection refused)
2017-09-18T09:21:22.794Z: [09:21:13.452][debug][URLDeployableMonitor] Notifying monitor listener [org.codehaus.cargo.container.spi.deployer.DeployerWatchdog@7bd4937b]
结束时:
2017-09-18T09:21:32.710Z: 2017-09-18 09:21:28.724 INFO 2232 --- [ost-startStop-1] com.bbs.dm.config.WebConfigurer : Web application configuration, using profiles: prod
2017-09-18T09:21:32.711Z: 2017-09-18 09:21:28.735 INFO 2232 --- [ost-startStop-1] com.bbs.dm.config.WebConfigurer : Web application fully configured
2017-09-18T09:21:32.711Z: 2017-09-18 09:21:28.994 DEBUG 2232 --- [ost-startStop-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Starting Liquibase synchronously
2017-09-18T09:21:36.985Z: Nothing listening on 8080. Please update your configuration and redeploy
2017-09-18T09:21:52.730Z: 2017-09-18 09:21:47.492 DEBUG 2232 --- [ost-startStop-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Started Liquibase in 18498 ms
2017-09-18T09:21:57.985Z: Application start successful
2017-09-18T09:21:57.985Z: No cron to setup
2017-09-18T09:21:57.986Z: Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agentd.service → /usr/x86_64-pc-linux-gnu/lib/systemd/system/zabbix-agentd.service.
除了Clevercloud documentation to deploy
之外,我没有做任何其他事情我是否遗漏了配置中的内容? (有关信息,应用程序在Heroku或Pivotal等其他平台上部署良好)
答案 0 :(得分:1)
在Clevercloud上部署jhipster应用程序。 这对我有用。
我使用to create an application 3>跟踪了deploy it和the CLI给出的指示
配置文件:
clevercloud / war.json
{
"build": {
"type": "maven",
"goal": "package -Pprod -DskipTests"
},
"deploy": {
"jarName": "target/myapp-1.0.0.war"
}
}
clevercloud / maven.json
{
"build": {
"type": "maven",
"goal": "package -Pprod -DskipTests"
},
"deploy": {
"goal": "package -Pprod -DskipTests"
}
}
我修改了我的application-prod.yml以链接数据库。