在将Play Framework 2.0应用程序部署为Windows服务时,如何解决服务器糟糕的错误? [英] How do I fix server Oops error when deploying Play Framework 2.0 application as a Windows service?
问题描述
我正在跟踪这个非常有用的帖子中的过程:
I was following the processes in this very helpful post:
如何将Play Framework 2.0应用程序作为Windows服务运行?
当我遇到麻烦在步骤9.当我执行 runConsole.bat
,服务循环运行 和重新启动状态。完整的日志在这里:
when I ran into trouble in Step 9. When I execute runConsole.bat
, the service cycles between the running and restarting states. The full log is here:
但在日志中跳出我的是:
but what jumps out at me in the log are the following:
INFO|7268/0|play.core.server.NettyServer|13-12-28 13:07:28|Oops, cannot start the server.
INFO|7268/0|play.core.server.NettyServer|13-12-28 13:07:28|Configuration error: Configuration error[Cannot connect to database [default]]
...
INFO|7268/0|play.core.server.NettyServer|13-12-28 13:07:28|Caused by: org.h2.jdbc.JdbcSQLException: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-168]
...
INFO|wrapper|play.core.server.NettyServer|13-12-28 13:07:28|restart process due to default exit code rule
INFO|wrapper|play.core.server.NettyServer|13-12-28 13:07:28|restart internal RUNNING
INFO|wrapper|play.core.server.NettyServer|13-12-28 13:07:28|stopping process with pid/timeout 7268 45000
INFO|wrapper|play.core.server.NettyServer|13-12-28 13:07:30|process exit code: -1
...
INFO|7812/1|play.core.server.NettyServer|13-12-28 13:07:45|[error] c.j.b.h.AbstractConnectionHook - Failed to obtain initial connection Sleeping for 0ms and trying again. Attempts left: 0. Exception: null
INFO|7812/1|play.core.server.NettyServer|13-12-28 13:07:45|Oops, cannot start the server.
INFO|7812/1|play.core.server.NettyServer|13-12-28 13:07:45|Configuration error: Configuration error[Cannot connect to database [default]]
重复几次...
推荐答案
通过写这篇文章的一半,我意识到在之前的第9步,你应该终止在第6步中启动的 start.bat 脚本。当我这样做, runConsole.bat
将正常执行,而不会出现上面列出的所有错误。
Half way through writing this post, I realized that before step 9., you should terminate the start.bat script which you start up in step 6. When I did this, runConsole.bat
would execute normally without all the errors I list above.
这篇关于在将Play Framework 2.0应用程序部署为Windows服务时,如何解决服务器糟糕的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!