Gpt SNAP locked H2 database

Hello,

I’ve ran into this problem before, and thought it was fixed, but still have the same issue. Basically running multiple gpt commands at the same time sharing auxiliary files causes a severe warning that the database is locked or connection refused. Am running up to date snap and all modules, 8.0.9.

Initializing external tool adapters\nSEVERE: org.esa.snap.product.library.v2.activator.ProductLibraryActivator: Failed to initialize the database.\norg.h2.jdbc.JdbcSQLException: Database may be already in use: “Locked by another process: products.lock.db”. Possible solutions: close all other connection(s); use the server mode [90020-197]\n\tat org.h2.message.DbException.getJdbcSQLException(DbException.java:357)\n\tat org.h2.message.DbException.get(DbException.java:179)\n\tat org.h2.message.DbException.get(DbException.java:155)\n\tat org.h2.store.FileLock.getExceptionAlreadyInUse(FileLock.java:433)\n\tat org.h2.store.FileLock.lockFile(FileLock.java:325)\n\tat org.h2.store.FileLock.lock(FileLock.java:108)\n\tat org.h2.engine.Database.open(Database.java:674)\n\tat org.h2.engine.Database.openDatabase(Database.java:286)\n\tat org.h2.engine.Database.(Database.java:280)\n\tat org.h2.engine.Engine.openSession(Engine.java:66)\n\tat org.h2.engine.Engine.openSession(Engine.java:179)\n\tat org.h2.engine.Engine.createSessionAndValidate(Engine.java:157)\n\tat org.h2.engine.Engine.createSession(Engine.java:140)\n\tat org.h2.engine.Engine.createSession(Engine.java:28)\n\tat org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:351)\n\tat org.h2.jdbc.JdbcConnection.(JdbcConnection.java:124)\n\tat org.h2.jdbc.JdbcConnection.(JdbcConnection.java:103)\n\tat org.h2.Driver.connect(Driver.java:69)\n\tat java.sql.DriverManager.getConnection(DriverManager.java:664)\n\tat java.sql.DriverManager.getConnection(DriverManager.java:208)\n\tat org.esa.snap.product.library.v2.database.DataAccess.getConnection(DataAccess.java:1063)\n\tat org.esa.snap.product.library.v2.database.DataAccess.upgradeDatabase(DataAccess.java:82)\n\tat org.esa.snap.product.library.v2.activator.ProductLibraryActivator.start(ProductLibraryActivator.java:27)\n\tat org.esa.snap.runtime.Engine.informActivators(Engine.java:222)\n\tat org.esa.snap.runtime.Engine.lambda$start$0(Engine.java:121)\n\tat org.esa.snap.runtime.Engine.runClientCode(Engine.java:189)\n\tat org.esa.snap.runtime.Engine.start(Engine.java:121)\n\tat org.esa.snap.runtime.Engine.start(Engine.java:90)\n\tat org.esa.snap.runtime.Launcher.run(Launcher.java:51)\n\tat org.esa.snap.runtime.Launcher.main(Launcher.java:31)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)\n\tat com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:66)\n\tat install4j.org.esa.snap.runtime.Launcher_gpt.main(Unknown Source)

Initializing external tool adapters\nSEVERE: org.esa.snap.product.library.v2.activator.ProductLibraryActivator: Failed to initialize the database.\norg.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused (Connection refused): [90067-197]\n\tat org.h2.message.DbException.getJdbcSQLException(DbException.java:357)\n\tat org.h2.message.DbException.get(DbException.java:168)\n\tat org.h2.engine.SessionRemote.connectServer(SessionRemote.java:451)\n\tat org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:364)\n\tat org.h2.jdbc.JdbcConnection.(JdbcConnection.java:124)\n\tat org.h2.jdbc.JdbcConnection.(JdbcConnection.java:103)\n\tat org.h2.Driver.connect(Driver.java:69)\n\tat java.sql.DriverManager.getConnection(DriverManager.java:664)\n\tat java.sql.DriverManager.getConnection(DriverManager.java:208)\n\tat org.esa.snap.product.library.v2.database.DataAccess.getConnection(DataAccess.java:1063)\n\tat org.esa.snap.product.library.v2.database.DataAccess.upgradeDatabase(DataAccess.java:82)\n\tat org.esa.snap.product.library.v2.activator.ProductLibraryActivator.start(ProductLibraryActivator.java:27)\n\tat org.esa.snap.runtime.Engine.informActivators(Engine.java:222)\n\tat org.esa.snap.runtime.Engine.lambda$start$0(Engine.java:121)\n\tat org.esa.snap.runtime.Engine.runClientCode(Engine.java:189)\n\tat org.esa.snap.runtime.Engine.start(Engine.java:121)\n\tat org.esa.snap.runtime.Engine.start(Engine.java:90)\n\tat org.esa.snap.runtime.Launcher.run(Launcher.java:51)\n\tat org.esa.snap.runtime.Launcher.main(Launcher.java:31)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)\n\tat com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:66)\n\tat install4j.org.esa.snap.runtime.Launcher_gpt.main(Unknown Source)\nCaused by: java.net.ConnectException: Connection refused (Connection refused)\n\tat java.net.PlainSocketImpl.socketConnect(Native Method)\n\tat java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)\n\tat java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)\n\tat java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)\n\tat java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)\n\tat java.net.Socket.connect(Socket.java:607)\n\tat org.h2.util.NetUtils.createSocket(NetUtils.java:103)\n\tat org.h2.util.NetUtils.createSocket(NetUtils.java:83)\n\tat org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:114)\n\tat org.h2.engine.SessionRemote.connectServer(SessionRemote.java:447)\n

Thanks

Yes, it seems it is not finally solved.
I’ve created a new issue for this problem: [SNAP-1538] Product Library throws exception if multiple gpt instance are running

But it should affect your processing. The results should be fine.

Hello @marpet and @oana_hogoiu are there any developments regarding this issue, or expectation of when a fix can be released?
We have recently moved to snap v9 and suddenly we are hit by this problem that we didn’t have in v8, which is affecting our production tasks now. Any help in this matter is very welcome.
Thank you in advance!

Yes,
There is a ticket in progress (SNAP-1552) which will be included in the next minor version release.
But I want to mention that nothing changed since v8, this warning was from v8 and it should not affect the processing.

Hi, Thank you very much for the quick reply and the link to the new ticket.
Do you have any idea of the time frame for the next minor release? Does that follow any periodic timeline (quarter, monthly, etc.?). Thanks.

No really, but since there is an issue with the Help display after 9.0.1 updates, I think 9.0.2 will be prepared after everybody gets back from holidays.

OK Thank you!