h2-2.2.224 Automatic Mixed Mode(AUTO_SERVER=TRUE) from different PCs no longer supported?

88 views
Skip to first unread message

neive

unread,
Apr 27, 2024, 8:18:46 AMApr 27
to H2 Database
Hi Team,

I tried upgrading h2-1.4.196 to h2-2.2.224 to verify.
Is connecting with Automatic Mixed Mode(AUTO_SERVER=TRUE) from different PCs no longer supported?

* Automatic Mixed Mode
https://www.h2database.com/html/features.html?highlight=AUTO_SERVER&search=AUTO_SERVER%20#auto_mixed_mode


* Could not connect even on the console.
PC1
java -cp h2-2.2.224.jar org.h2.tools.Shell -url "jdbc:h2:file:.\db;CIPHER=AES;AUTO_SERVER=TRUE;NON_KEYWORDS=USER,VALUE;" -driver "org.h2.Driver" -user "test" -password "test"

PC2
java -cp h2-2.2.224.jar org.h2.tools.Shell -url "jdbc:h2:file:.\\pc1\db;CIPHER=AES;AUTO_SERVER=TRUE;NON_KEYWORDS=USER,VALUE;" -driver "org.h2.Driver" -user "test" -password "test"
Database may be already in use: "Lock file exists: //pc1/db.lock.db". Possible solutions: close all other connection(s); use the server mode [90020-224]

*Past similar questions
https://groups.google.com/g/h2-database/c/lYi5Usc4tHU/m/jqfsD03tAgAJ


neive

unread,
Apr 27, 2024, 10:08:32 AMApr 27
to H2 Database
It might be a Windows sharing issue.
*I have given read/write permissions to everyone on both PCs, and the sharing method is the same.

* Place DB on PC1 and access from PC2
  >>Error. Possible solutions: close all other connection(s); use the server mode [90020-224]

* Place DB on PC2 and access from PC1
  >> success.
2024年4月27日土曜日 21:18:46 UTC+9 neive:

neive

unread,
Apr 27, 2024, 12:11:28 PMApr 27
to H2 Database
Sorry, it appears to be a Windows file sharing issue. 
*It was resolved by canceling sharing and resetting it.


2024年4月27日土曜日 23:08:32 UTC+9 neive:
Reply all
Reply to author
Forward
0 new messages