H2数据库启动提示8082端口被占用
Posted duanguyuan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了H2数据库启动提示8082端口被占用相关的知识,希望对你有一定的参考价值。
The Web Console server could not be started. Possible cause: another server is already running at http://192.168.56.1:8082?key=ad8 23856d1dd0ac5663546cde65332df66eaa357b0131bcebaece3730f28b807 Root cause: Exception opening port "8082" (port may be in use), cause: "java.net.BindException: Address already in use: JVM_Bind" [90061-199] Exception in thread "main" org.h2.jdbc.JdbcSQLNonTransientConnectionException: Exception opening port "8082" (port may be in use), cause: "java.net.BindException: Address already in use: JVM_Bind" [90061-199] at org.h2.message.DbException.getJdbcSQLException(DbException.java:617) at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) at org.h2.message.DbException.get(DbException.java:194) at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:180) at org.h2.util.NetUtils.createServerSocket(NetUtils.java:146) at org.h2.server.web.WebServer.start(WebServer.java:387) at org.h2.tools.Server.start(Server.java:511) at org.h2.tools.Console.runTool(Console.java:208) at org.h2.tools.Console.main(Console.java:72) 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:176) ... 5 more 请按任意键继续. . .
原因:TIM使用了8082.
任务管理器-性能-资源监视器中可见:
解决
修改D:\\Program Files (x86)\\H2\\bin\\h2.bat,指定别的端口
java -classpath h2-1.4.199.jar org.h2.tools.Server -webPort 8083
java -classpath h2-1.4.199.jar org.h2.tools.Server -? 查看其他参数
以上是关于H2数据库启动提示8082端口被占用的主要内容,如果未能解决你的问题,请参考以下文章
linux 启动某个程序的时候总是提示端口被占用,如何处理?