【发布时间】:2015-03-06 06:43:59
【问题描述】:
我最近在 Windows7 中安装了 H2 数据库。要启动 H2 命令行,我遇到了以下问题。已经有一个进程在 8082 端口上运行。为了解决这个问题,我需要停止这个过程。
The Web Console server could not be started. Possible cause: another server is a
lready running at http://169.254.216.99:8082
Root cause: Exception opening port "8082" (port may be in use), cause: "java.net
.BindException: Address already in use: JVM_Bind" [90061-184]
Exception in thread "main" org.h2.jdbc.JdbcSQLException: Exception opening port
"8082" (port may be in use), cause: "java.net.BindException: Address already in
use: JVM_Bind" [90061-184]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:194)
at org.h2.util.NetUtils.createServerSocket(NetUtils.java:160)
at org.h2.server.web.WebServer.start(WebServer.java:357)
at org.h2.tools.Server.start(Server.java:474)
at org.h2.tools.Console.runTool(Console.java:231)
at org.h2.tools.Console.main(Console.java:99)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:190)
... 5 more
Press any key to continue . . .
现在我检查了哪个进程在 8082 端口上运行。
netstat -a -n -o | find "8082"
TCP 0.0.0.0:8082 0.0.0.0:0 LISTENING 4472
TCP [::]:8082 [::]:0 LISTENING 4472
我发现javaw.exe 进程正在port 8082 上运行。
tasklist
javaw.exe 4472
我从这个链接Java/Javaw/Javaws 发现了一些关于java/javaw/javaws 的信息。
现在我的问题是,如果我关闭了“javaw.exe”进程,我在运行其他应用程序/程序时会遇到任何问题吗?
或者我可以在不同的端口上运行 javaw.exe 或更改 H2 端口(反之亦然)?怎么样?
编辑
我知道要杀死进程-(在命令行中)
Taskkill /PID 4472 /F
【问题讨论】:
标签: java database console command h2