Hello, 

I am playing around with H2 for a while now. I do this mostly locally 
(testing the App during development).
Recently I started to deploy my app to a public server. My desired usage 
scenario for H2 looks roughly like this: 

- I decided for an encrypted database file, in case somebody can copy it 
due to a security hole in some other service.
- My app starts the db-server in mixed mode, and connects to it, to do its 
thing.
- My url looks like 
this: 
jdbc:h2:file:db/testdb;CIPHER=AES;TRACE_LEVEL_FILE=3;TRACE_MAX_FILE_SIZE=16384;
AUTOCOMMIT=ON;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=9090;
- Almost all of the time there will be only one client.

Additionally I would like to connect from a different computer. This will 
be very rarely, and always manually. 
Mostly to see whats in there, check logs, do small schema modifications.
Thats why i picked mixed mode and auto_server in the first place.

>From what i gathered this is unfortunately not possible, as all clients 
need to run on the same computer, to have access to
the .lock file. I had a look and there is not really something special in 
there.

Now i do understand this limitation, and while it is bad for my desired 
usage scenario, i can just start a normal (tcp-based)
server via the API. I found some Code snippets on stack exchange, so I will 
try this soon. 

What has me confused is that the server, in mixed mode, does not bind to 
localhost (127.0.0.1) but to 0.0.0.0 
(or in my case the respective ipv6 addresses) I gathered that from the 
following netstat line: 

netstat -tulpen
Proto Recv-Q Send-Q Local Address           Foreign Address         State   
    User       Inode      PID/Program name    
...
tcp6       0      0 :::9090                 :::*                    LISTEN 
     1002       6252932    29262/java    
...

And that has me confused, when its impossible to connect from external in 
mixed mode, why make it available 
to external interfaces? If i would go ahead and mount my server's disk via 
sshfs or nfs (or any other network file System), would that work? 

I googled for a while now, but did not found an answer while it binds to 
public interfaces. 

I would be very thankful if somebody cleared that up. 

-- 
yasuo

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to