在 Fedora 15 上,在 Fedora 上启动 Lift 应用程序并获取 org.h2.jdbc.JdbcSQLException
在 Fedora 15 上,执行 mvn jetty:run 后,当它尝试为用户初始化 MetaMapper 时,我收到以下异常 以下
org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server (tcp://
192.168.1.105:33463)" (port may be in use), cause: "timeout" [90061-138]
(full stack trace is pasted last in the mail)
是我生成项目的方式
mvn archetype:generate \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic_2.8.1 \
-DarchetypeVersion=2.3 \
-DarchetypeRepository=http://scala-tools.org/repo-releases \
-DremoteRepositories=http://scala-tools.org/repo-releases \
-DgroupId=com.mytest \
-DartifactId=helloworld \
-Dversion=2.0
我尝试用 Sun JDK 替换 OpenJDK,但仍然不起作用。 H2有什么问题吗?我需要重新安装H2吗?还是电梯的问题?
例如,如果我终止运行并重新启动另一个运行,我将得到相同的异常,但只是不同的 tcp 端口
org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server
(tcp://208.68.143.50:55325)" (port may be in use), cause: "timeout" [90061-138]
On Fedora 15, after doing mvn jetty:run, I am getting the following excetion when it's trying to initialize the MetaMapper for User
org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server (tcp://
192.168.1.105:33463)" (port may be in use), cause: "timeout" [90061-138]
(full stack trace is pasted last in the mail)
The following is how I generated the project
mvn archetype:generate \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic_2.8.1 \
-DarchetypeVersion=2.3 \
-DarchetypeRepository=http://scala-tools.org/repo-releases \
-DremoteRepositories=http://scala-tools.org/repo-releases \
-DgroupId=com.mytest \
-DartifactId=helloworld \
-Dversion=2.0
I tried replacing OpenJDK with Sun JDK, still doesn't work. Anything wrong with H2? Do I need to reinstall H2? Or is it a Lift issue?
If I kill the run and restart another one, I will get the same exception, but just different tcp port, for example
org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server
(tcp://208.68.143.50:55325)" (port may be in use), cause: "timeout" [90061-138]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许您的应用程序仍在运行或端口尚未关闭。
使用“netstat”进行验证。
您可能想阅读 so_reuseaddr。
我的计算机上运行着一台服务器(它是 Common Lisp,而不是 H2,但这并不重要):
我希望有一个进程正在侦听 208.68.143.50:55325。如果这个 IP 不是您的计算机,那么就会发生一些奇怪的事情。
您可以使用
test.out 文件启动您的应用程序,然后调查该文件。 “strace”工具允许您记录程序发出的所有系统调用。在文件test.out中搜索listen。
Maybe your application still runs or the ports haven't closed.
Verify using 'netstat'.
You may want to read on so_reuseaddr.
I have a server running on my computer (its Common Lisp and not H2 but this doesn't matter):
I would expect that either a process is listening on 208.68.143.50:55325. If this IP isn't your computer, then something weird is going on.
You can start your application with
and afterwards investigate the test.out file. The 'strace' tool allows you to log all the system calls that are issued by the program. Search listen in the file test.out.
这很可能是网络配置问题。你能检查一下你的主机文件中是否有奇怪的条目吗?我的hosts文件是(Mac OS):
如果这个文件没有什么奇怪的,请下载H2并运行
./build.sh testNetwork
(或build.bat testNetwork
)视窗)。在我的系统上,我得到:当然,H2 可以只使用“localhost”,但某些功能将无法按设计工作。
This is most likely a network configuration problem. Could you check in your hosts file for strange entries? My hosts file is (Mac OS):
If there is nothing strange in this file, please download H2 and run
./build.sh testNetwork
(orbuild.bat testNetwork
for Windows). On my system, I get:Of course H2 could just use "localhost", but then certain features wouldn't work as designed.