Hi there

Lately, I am getting the following error when trying to run the H2 database 
server on Mac OS X 10.6.8:

$ java -cp Downloads/h2-1.3.157.jar org.h2.tools.Server -trace
java.net.ConnectException: Cannot allocate memory
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:529)
at org.h2.util.NetUtils.createSocket(NetUtils.java:110)
at org.h2.util.NetUtils.createSocket(NetUtils.java:91)
at org.h2.util.NetUtils.createLoopbackSocket(NetUtils.java:49)
at org.h2.server.web.WebServer.isRunning(WebServer.java:354)
at org.h2.tools.Server.isRunning(Server.java:415)
at org.h2.tools.Server.start(Server.java:374)
at org.h2.tools.Server.runTool(Server.java:215)
at org.h2.tools.Server.main(Server.java:115)
The Web Console server could not be started. Possible cause: another server 
is already running at http://192.168.2.1:8082
Exception in thread "main" org.h2.jdbc.JdbcSQLException: Exception opening 
port "H2 Console Server (http://192.168.2.1:8082)" (port may be in use), 
cause: "timeout" [90061-157]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.tools.Server.start(Server.java:377)
at org.h2.tools.Server.runTool(Server.java:215)
at org.h2.tools.Server.main(Server.java:115)

There is nothing else running on port 8082:

$ nc -vz localhost 8082
nc: connect to localhost port 8081 (tcp) failed: Connection refused
nc: connect to localhost port 8081 (tcp) failed: Connection refused
nc: connect to localhost port 8081 (tcp) failed: Connection refused

Strange enough I get the same error when testing the port with the IP 
address:

$ nc -vz 192.168.2.1 8082
nc: connect to 192.168.2.1 port 8082 (tcp) failed: Cannot allocate memory

The binary tries to open the H2 console in the browser at 
http://192.168.2.1:8082 – but this results in an error page because no 
connection can be made.

Furthermore, the yellow icon in the menu bar is missing.

Although I can display the console using http://localhost:8082 I still 
cannot connect to a database at 
jdbc:h2:tcp://localhost/~/path/to/data;ifexists=true because that gives me 
another error:

Connection is broken: "java.net.ConnectException: Connection refused: 
localhost" 
[90067-157]<http://localhost:8082/test.do?jsessionid=84834895edd9f4883410296189046e12#>
 90067/90067 

Trying to connect to jdbc:h2:tcp://192.168.2.1/~/path/to/data;ifexists=true 
again returns

Connection is broken: "java.net.ConnectException: Cannot allocate memory: 
192.168.2.1" 
[90067-157]<http://localhost:8082/test.do?jsessionid=84834895edd9f4883410296189046e12#>
 90067/90067 

Would be glad about any help because I am really stuck. I cannot remember 
having this problem ever before. 

Oh, and the last thing I did concerning Java is install Apple’s recent 
Update. Could this be related? How could I revert to the previous version, 
anyway?

$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)

Cheers,
tobi

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/nB-1QtSF7fsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to