Port 9092

499 views
Skip to first unread message

Shpend

unread,
Apr 18, 2008, 6:23:38 AM4/18/08
to H2 Database
Hello,

i got allways this error....and i don't know how to handle this
problem...
i rode the other topic Port is in use..but it didn't help me...

i want that my java application (java applet) which is on a extern
webserver...can work with the h2 database...
users from other computer should then use the java applet over the web
browser...

in my application:
static String strURL = "jdbc:h2:tcp://localhost/";
static String strDatabase = "knowhow";
static String strUser = "root";
static String strPassword = "root";

Class.forName("org.h2.Driver").newInstance();
Server server = Server.createTcpServer(new String[] {
"-tcpAllowOthers", "true" });
server.start();
con = DriverManager.getConnection(strURL+strDatabase, strUser,
strPassword);
stmt = con.createStatement();



can it be that i have the same problem as Markus had it before...
java.net.InetAddress.getLocalHost().toString(); ==>
CFBAD10921/192.168.0.35

thx for every help...

here the error msg:

org.h2.jdbc.JdbcSQLException: Fehler beim Öffnen von Port 9092 (Port
wird ev. bereits verwendet), Grund: java.net.BindException: Address
already in use: JVM_Bind
Exception opening port 9092 (port may be in use), cause:
java.net.BindException: Address already in use: JVM_Bind [90061-69]
at org.h2.message.Message.getSQLException(Message.java:91)
at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:103)
at org.h2.util.NetUtils.createServerSocket(NetUtils.java:66)
at org.h2.server.TcpServer.start(TcpServer.java:201)
at org.h2.tools.Server.start(Server.java:447)
at APP.KnowHow.SQL_H2DB.<init>(SQL_H2DB.java:26)
at APP.KnowHow.Model.<init>(Model.java:166)
at APP.KnowHow.GUI.<init>(GUI.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:779)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:708)
at sun.applet.AppletPanel.run(AppletPanel.java:362)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:97)
... 16 more

Thomas Mueller

unread,
Apr 18, 2008, 12:22:27 PM4/18/08
to h2-da...@googlegroups.com
Hi,

> can it be that i have the same problem as Markus had it before...
> java.net.InetAddress.getLocalHost().toString(); ==>
> CFBAD10921/192.168.0.35
>
> thx for every help...
>
> here the error msg:
>
> org.h2.jdbc.JdbcSQLException: Fehler beim Öffnen von Port 9092 (Port
> wird ev. bereits verwendet), Grund: java.net.BindException: Address
> already in use: JVM_Bind
> Exception opening port 9092 (port may be in use), cause:
> java.net.BindException: Address already in use: JVM_Bind [90061-69]

The problem seems to be: another TCP server or another application is
already running on this port. I will document the exception as
follows:

The error with code 90061 is thrown when
trying to start a server if a server is already running on the same port.
It could also be a firewall problem. To find out if another server is
already running, run the following command on Windows:

netstat -ano

The column PID is the process id as listed in the Task Manager.
For Linux, use:

netstat -npl

I hope this helps,
Thomas

Reply all
Reply to author
Forward
0 new messages