Can't Start H2 Database On Command Line - ?ports In Use? Org.h2 ...

Skip to content Dismiss alert {{ message }} / sandhya_dt Public
  • Notifications You must be signed in to change notification settings
  • Fork 0
  • Star 0
  • Code
  • Issues 6
  • Pull requests
  • Actions
  • Projects
  • Security

    Uh oh!

    There was an error while loading. Please reload this page.

  • Insights
Additional navigation options Can't start h2 database on command line - ?ports in use? org.h2.jdbc. JdbcSQLException Exception opening port "H2 Console Server (http://172.16.1.33:8082)" (port may be in use), cause: "timeout" [90061-158] #6New issueNew issueOpenOpen Can't start h2 database on command line - ?ports in use? org.h2.jdbc. JdbcSQLException Exception opening port "H2 Console Server (http://172.16.1.33:8082)" (port may be in use), cause: "timeout" [90061-158]#6@sandhyasri-git

Description

@sandhyasri-gitsandhyasri-gitopened on Apr 19, 2016

The errors is

Can't start h2 database on command line - ?ports in use? org.h2.jdbc. JdbcSQLException Exception opening port "H2 Console Server (http://172.16.1.33:8082)" (port may be in use), cause: "timeout" [90061-158]

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.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:190) ... 5 more Press any key to continue . . .

Solution

  1. first type the following command to find out what are the processes running at the port no: 8082 a. goto cmd and type netstat -a -n -o | find "8082"

    TCP 0.0.0.0:8082 0.0.0.0.0 LISTENING 6000(PID) TCP [::]:8082 [::]:0 LISTENING 6000(PID)

another way of seeing the process

  1. Start>>All Programs>>Accessories>>System Tools>>Resource Monitor (or Run resmon.exe)

now type at the same cmd taskkill /F /PID 6000

SUCCESS: The process with PID 6000 has been terminated.

Metadata

Metadata

Assignees

No one assigned

Labels

No labelsNo labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You can’t perform that action at this time.

Từ khóa » H2 8082