Hi,

What is the complete stack trace of the exception you get?

Maybe it's a problem routing "localhost" to 127.0.0.1. Could you try
"ping localhost"? If this works, could you run "telnet localhost 9092"
as soon as the server is running? I get:

BSLM-MAC-012:bin tmueller$ telnet localhost 9092
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Could you run "lsof -nPi:9092" when you are connected to the database? I get:

lsof -nPi:9092
COMMAND   PID     USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
java    58103 tmueller    5u  IPv6 0x13bcc0e0      0t0  TCP *:9092 (LISTEN)
java    58103 tmueller   22u  IPv6 0x13bcd400      0t0  TCP
[::127.0.0.1]:51168->[::127.0.0.1]:9092 (ESTABLISHED)
java    58103 tmueller   23u  IPv6 0x13bcb720      0t0  TCP
[::127.0.0.1]:9092->[::127.0.0.1]:51168 (ESTABLISHED)

When the server is running, but no connection is open, I get:
COMMAND   PID     USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
java    58103 tmueller    5u  IPv6 0x13bcc0e0      0t0  TCP *:9092 (LISTEN)

I would like to know if you also get [::127.0.0.1] or something else.

Regards,
Thomas


On Thu, Jun 18, 2009 at 3:52 PM, blueboy<[email protected]> wrote:
>
> Hi,
>
> It is absolutly running despite of the exception. But why do I get it?
>
> / Hakan
>
> On 18 Juni, 15:47, Zinahe <[email protected]> wrote:
>> I don't think I understand you correctly. If h2 tcp server is not
>> running on port 9092 (which you can confirm by using netstat or lsof),
>> you will get a SQLException from a java program when you try to
>> connect to it.
>>
>> Without the -webAllowOthers -tcpAllowOthers I get the the same
>> exception.
>>
>> On Jun 18, 4:07 pm, blueboy <[email protected]> wrote:
>>
>>
>>
>> > Hi,
>>
>> > I got the same exception both if I start it from my java application
>> > or via command line
>> > like you do.
>>
>> > And netstat (or lsof) shows that it is started despite the exception
>> > and is in fact
>> > posible to connect to the database with H2 Console
>>
>> > / Vidoten
>>
>> > But it is still possible to connect to the db
>>
>> > On 18 Juni, 13:34, Zinahe <[email protected]> wrote:
>>
>> > > How did you start your server ?
>>
>> > > I use this command, from the h2/bin directory:
>>
>> > > $ java -cp h2-1.1.114.jar org.h2.tools.Server -webAllowOthers -
>> > > tcpAllowOthers
>>
>> > > and
>>
>> > > $ lsof -nPi:9092
>>
>> > > to confirm if the server is properly running.
>>
>> > > Hope that helps.
>>
>> > > Zinahe A.
>>
>> > > On Jun 18, 10:56 am, Vidioten <[email protected]> wrote:
>>
>> > > > Hi,
>>
>> > > > I have this problem..
>>
>> > > > r...@localhost bin]# netstat -anp | grep 9092
>> > > > <No output>
>>
>> > > > Failed to start servers: org.h2.jdbc.JdbcSQLException: Exception
>> > > > opening port H2 TCP Server (tcp://localhost:9092) (port may be in
>> > > > use), cause: timeout [90061-114]
>>
>> > > > [r...@localhost bin]# netstat -anp | grep 9092
>> > > > tcp        0      0 127.0.0.1:1048          127.0.0.1:9092
>> > > > TIME_WAIT   -
>> > > > [r...@localhost bin]# netstat -anp | grep 9092
>> > > > tcp        0      0 127.0.0.1:1048          127.0.0.1:9092
>> > > > TIME_WAIT   -
>> > > > [r...@localhost bin]# netstat -anp | grep 9092
>> > > > tcp        0      0 127.0.0.1:1048          127.0.0.1:9092
>> > > > TIME_WAIT   -
>> > > > [r...@localhost bin]# netstat -anp | grep 9092
>> > > > <No output>
>>
>> > > > Any ideas?
>>
>> > > > / Vidioten- Dölj citerad text -
>>
>> > > - Visa citerad text -- Dölj citerad text -
>>
>> - Visa citerad text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
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