Opal not starting - opal-config?

28 views
Skip to first unread message

Tom Bishop

unread,
Sep 17, 2024, 5:32:23 AM9/17/24
to obiba...@googlegroups.com

Hi Yannick,

 

I hope all is well with you.

 

Our production Opal instance (running as a container under Coral) failed and won’t restart. The error message seems to indicate an issue with opal-config, perhaps some kind of corruption after an unclean shutdown.

 

I’m afraid I’ve not seen this before and searching for the error has not turned up a solution. Do you have any suggestions, please?

 

Thanks

 

Tom

 

 

 

 

2024-09-10 12:29:10,703 [main] INFO  org.obiba.opal.server.OpalServer - Starting Opal server!

2024-09-10 12:29:10,706 [main] INFO  org.obiba.opal.server.OpalServer - Upgrading Opal...

2024-09-10 12:29:10,774 [main] INFO  org.springframework.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@a9cd3b1: startup date [Tue Sep 10 12:29:10 UTC 2024]; root of context hierarchy

2024-09-10 12:29:10,818 [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [META-INF/spring/opal-server/upgrade.xml]

2024-09-10 12:29:10,898 [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [META-INF/spring/opal-server/config.xml]

2024-09-10 12:29:10,927 [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [upgrade-context.xml]

2024-09-10 12:29:11,044 [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/opal-core/tx.xml]

2024-09-10 12:29:11,069 [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/opal-core/version.xml]

2024-09-10 12:29:11,397 [main] INFO  org.objectweb.jotm - CAROL initialization

2024-09-10 12:29:11,408 [main] INFO  org.objectweb.jotm - JOTM started with a local transaction factory

2024-09-10 12:29:11,477 [main] INFO  org.springframework.transaction.jta.JtaTransactionManager - Using JTA UserTransaction: org.objectweb.jotm.Current@6ce86ce1

2024-09-10 12:29:11,478 [main] INFO  org.springframework.transaction.jta.JtaTransactionManager - Using JTA TransactionManager: org.objectweb.jotm.Current@6ce86ce1

2024-09-10 12:29:12,156 [main] INFO  org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 5.0.1.Final

2024-09-10 12:29:12,298 [main] INFO  org.obiba.opal.core.service.LocalOrientDbServerFactory - Start OrientDB server (plocal:/srv/data/orientdb/opal-config)

2024-09-10 12:29:12,636 [main] INFO  com.orientechnologies.orient.server.config.OServerConfigurationLoaderXml - Loading configuration from input stream

2024-09-10 12:29:15,995 [main] ERROR com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - Exception `45900B64` in storage `plocal:/srv/data/orientdb/opal-config`: 2.2.37 (build a7541e7ceeabf592dd9a7b2928b6c023cbc73193, branch 2.2.x)

java.lang.IllegalMonitorStateException: null

                at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryRelease(ReentrantReadWriteLock.java:371)

                at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1261)

                at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.unlock(ReentrantReadWriteLock.java:1131)

                at com.orientechnologies.common.concur.lock.OOneEntryPerKeyLockManager.releaseLock(OOneEntryPerKeyLockManager.java:216)

                at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:493)

                at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:407)

                at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.endAtomicOperation(ODurableComponent.java:113)

                at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.create(OSBTree.java:156)

                at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.create(OSBTreeIndexEngine.java:82)

                at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.addIndexEngine(OAbstractPaginatedStorage.java:2048)

                at com.orientechnologies.orient.core.index.OIndexAbstract.create(OIndexAbstract.java:243)

                at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:129)

                at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:40)

                at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:171)

                at com.orientechnologies.orient.core.index.OIndexManagerProxy.createIndex(OIndexManagerProxy.java:87)

                at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:1900)

                at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:1870)

                at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:1860)

                at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:1856)

                at org.obiba.opal.core.service.OrientDbServiceImpl.createUniqueIndex(OrientDbServiceImpl.java:401)

                at org.obiba.opal.core.service.security.SubjectCredentialsServiceImpl.start(SubjectCredentialsServiceImpl.java:85)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:498)

                at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366)

                at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311)

                at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1611)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)

                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)

                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)

                at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)

                at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)

                at org.obiba.opal.server.UpgradeCommand.standardUpgrade(UpgradeCommand.java:61)

                at org.obiba.opal.server.UpgradeCommand.execute(UpgradeCommand.java:57)

                at org.obiba.opal.server.OpalServer.upgrade(OpalServer.java:102)

                at org.obiba.opal.server.OpalServer.<init>(OpalServer.java:37)

                at org.obiba.opal.server.OpalServer.main(OpalServer.java:151)

opal_16_09_2024.log

Stuart Wheater

unread,
Sep 17, 2024, 5:52:03 AM9/17/24
to obiba...@googlegroups.com
Hi,
    I don't know if this is related, but I am having problems with the obiba/opal:5.0.0-RC1 docker image.

opal-1   | Unrecognized VM option 'MaxPermSize=256M'
opal-1   | Error: Could not create the Java Virtual Machine.
opal-1   | Error: A fatal exception has occurred. Program will exit.
opal-1   | Unrecognized VM option 'MaxPermSize=256M'
opal-1   | Error: Could not create the Java Virtual Machine.
opal-1   | Error: A fatal exception has occurred. Program will exit.

Stuart
Dr Stuart Wheater
Postal Address: Arjuna Technologies Limited,
Urban Sciences Building, Newcastle Helix, Bath Lane, Newcastle upon Tyne, NE4 5TG United Kingdom
VAT Registration No: 764173128. Company registered in England
Registration No: 4497081



--
You received this message because you are subscribed to the Google Groups "obiba-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to obiba-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/obiba-users/LO4P265MB3792526D6CC3A00FE333A344B9612%40LO4P265MB3792.GBRP265.PROD.OUTLOOK.COM.

Yannick Marcon

unread,
Sep 17, 2024, 11:50:51 AM9/17/24
to obiba-users
Hi Stuart,

MaxPermSize is not a valid option for java 21, just remove it and restart.

Regards 
Yannick 


Stuart Wheater

unread,
Sep 17, 2024, 11:52:00 AM9/17/24
to obiba...@googlegroups.com
Thanks. will do.

Stuart
Dr Stuart Wheater
Postal Address: Arjuna Technologies Limited,
Urban Sciences Building, Newcastle Helix, Bath Lane, Newcastle upon Tyne, NE4 5TG United Kingdom
VAT Registration No: 764173128. Company registered in England
Registration No: 4497081


Yannick Marcon

unread,
Sep 17, 2024, 2:48:11 PM9/17/24
to obiba...@googlegroups.com
Hi Tom,

Either the orientdb files are corrupted or there is just a lock on the database because there is another opal process running, would that be possible?

Regards
Yannick


--

Tom Bishop

unread,
Sep 18, 2024, 4:55:57 AM9/18/24
to obiba...@googlegroups.com
Hi Yannick,

This is an old VM and it did previously run a non-container version of opal (and mongoDB). However, the  non-container services are disabled, and this configuration has been running like that for years previously. I guess I could complete remove the old versions now to be sure there is no interference?

If the orientdb files are corrupted, is the only option the risky manual repair suggested by Ramin?

Thanks

Tom

From: obiba...@googlegroups.com <obiba...@googlegroups.com> on behalf of Yannick Marcon <yannick...@obiba.org>
Sent: 17 September 2024 7:47 PM
To: obiba...@googlegroups.com <obiba...@googlegroups.com>
Subject: Re: [OBiBa] Opal not starting - opal-config?
 

Stuart Wheater

unread,
Sep 18, 2024, 8:22:18 AM9/18/24
to obiba...@googlegroups.com
Yannick,
    I have not been able to find any reference in the "docker compose" file or the "obiba/opal:5.0.0-RC1" docker image I am using, to MaxPermSize.

Stuart
Dr Stuart Wheater
Postal Address: Arjuna Technologies Limited,
Urban Sciences Building, Newcastle Helix, Bath Lane, Newcastle upon Tyne, NE4 5TG United Kingdom
VAT Registration No: 764173128. Company registered in England
Registration No: 4497081


Yannick Marcon

unread,
Sep 18, 2024, 9:24:11 AM9/18/24
to obiba...@googlegroups.com
Good catch: the option was still in the Dockerfile's default JAVA_OPTS. I have rebuilt and pushed the image. Please pull the updated image and try again.

Yannick

Tom Bishop

unread,
Sep 19, 2024, 9:32:44 AM9/19/24
to obiba...@googlegroups.com

Just to follow up on this, if I don’t think another Opal process is running, my only option is to repair OrientDB?

 

What is the role of OrientDB? Does it contain information about the configuration of Opal? Should we back it up in the future?

 

Thanks

 

Tom

Yannick Marcon

unread,
Sep 19, 2024, 9:48:34 AM9/19/24
to obiba...@googlegroups.com
Yes, try to repair orientdb. You could also try first to remove the folder:
OPAL_HOME/data/orientdb/opal-config/databases/OSystem/
It will be recreated at orientdb startup, clean.
(backup the original files before doing anything!)

This db is for internal usage only; it contains mainly users/groups, permissions, databases connection, projects and resources settings. All the indiv data and dictionaries are in the external sql/mongo databases. The folders to backup from OPAL_HOME are: fs, data and conf

Yannick

Tom Bishop

unread,
Sep 20, 2024, 7:13:07 AM9/20/24
to obiba...@googlegroups.com
Hi Yannick,

I have tried both removing the OSystem folder and repairing the database as per Ramin's steps. There were no errors during this process. Unfortunately, I still see the same error (ERROR com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - Exception `45900B64` in storage `plocal:/srv/data/orientdb/opal-config`: 2.2.37 (build a7541e7ceeabf592dd9a7b2928b6c023cbc73193, branch 2.2.x)

We have been backing up our Docker volumes, which includes the OPAL_HOME folders. Unfortunately, these were saved to a network location that was subject to a cyber attack and is currently not accessible. Hopefully access will return, in which case do I just need to replace the orientdb folder with the one from the backup?

To avoid problems in the future, is there anything that can stop this type of database corruption from happening, as it seems quite difficult to fix?

Thanks

Tom

Sent: 19 September 2024 2:48 PM

Yannick Marcon

unread,
Sep 20, 2024, 8:13:06 AM9/20/24
to obiba...@googlegroups.com
Hi,

Yes, just replace the whole orientdb folder.

Opal 5 will upgrade orientdb database to the latest version, and we may consider implementing alternative solutions (#3856).

Regards
Yannick


Tom Bishop

unread,
Sep 20, 2024, 8:26:11 AM9/20/24
to obiba...@googlegroups.com
Hi Yannick,

That sounds promising, but is there a possibility that something else has changed and the opal-config db no longer matches up with this? Maybe something changed with one of the projects?

Thanks

Tom

Sent: 20 September 2024 1:12 PM

Yannick Marcon

unread,
Sep 20, 2024, 8:44:11 AM9/20/24
to obiba...@googlegroups.com
No, there have been no breaking changes on the opal/orientdb side for years. It is most likely due to an unclean shutdown.
Yannick


Ramin H.A.

unread,
Sep 20, 2024, 9:07:31 AM9/20/24
to obiba...@googlegroups.com

Hi Tom,

Try running the repair database and rebuild index as follows:

$ repair database --fix-graph=true --fix-links=true 
$ rebuild index *

FYI: https://orientdb.org/docs/2.2.x/Console-Command-Repair-Database.html

Good luck!


Tom Bishop

unread,
Sep 23, 2024, 7:27:17 AM9/23/24
to obiba...@googlegroups.com

Thanks Ramin, I tried this and it made no difference. No errors were reported during the repair and reindex.

 

When running the repair it looks like there is nothing in the database (i.e. no edges or vertices):

 

Repair of graph 'plocal:/srv/data/orientdb.test/opal-config' is started ...

Scanning 0 edges (skipEdges=0)...

Scanning edges completed

Scanning 0 vertices...

Scanning vertices completed

Repair of graph 'plocal:/srv/data/orientdb.test/opal-config' completed in 0 secs

scannedEdges.....: 0

removedEdges.....: 0

scannedVertices..: 0

scannedLinks.....: 0

removedLinks.....: 0

repairedVertices.: 0

 

Do you have any other ideas about what might be going on?

 

Thanks

 

Tom

Ramin H.A.

unread,
Sep 23, 2024, 8:19:18 AM9/23/24
to obiba...@googlegroups.com

Hi Tom,

When you run the command ls -al inside the opal-config are the following files all empty? *.cpm, *.cpl. Also, just in case, make sure the ownership is correct. For example, my Opal docker container volumes are owned by systemd-resolve.

Can you do any queries inside the OrientDB such as:

$ classes
--or--
$ select * from Database
$ select * from SubjectAcl

I am afraid the only viable solution looks more like reverting to a functional backup and hopefully the backups are frequent enough that you can revert to a version that is functional as well as recent.

I will see if I can find anything useful.

Best,


Tom Bishop

unread,
Sep 23, 2024, 8:30:46 AM9/23/24
to obiba...@googlegroups.com

Thanks for your help Ramin.

 

The .cpm and .pcl are not all empty, some have size 66560, 132096 etc.

 

When I do select commands I can return entries that correspond to projects in our mysql database, for example, so there is definitely “stuff” still there. The ownership in our case is opal and nogroup, which seems consistent with other files in the container.

 

Unfortunately all the backups are currently locked away (possibly for months due to a cyber attack). I really hope they restore a working version otherwise we have lost a huge amount of work.

 

Best wishes

Ramin H.A.

unread,
Sep 23, 2024, 10:47:02 AM9/23/24
to obiba...@googlegroups.com

The good news is that the actual data (datasources, view and identifiers) is not in the OrientDB as this database is primarily for configurations.

If you have time, you could:

  • Backup the current volumes to another folder where you’d start a new Opal instance (use rsync -avP to preserve ownership)
  • Start a fresh new Opal container with the same version as the previous one
  • Configure your new Opal database such that it points to the correct Opal Data and Identifiers DBs (doc), e.g.:
# Old OrientDB
select * from Database

# Output
+----+-----+--------+------------+-------+--------------+------------------+---------------------------------------------------------------------------------------+-------------------+-------------------+
|#   |@RID |@CLASS  |name        |usage  |defaultStorage|usedForIdentifiers|mongoDbSettings                                                                        |created            |updated            |
+----+-----+--------+------------+-------+--------------+------------------+---------------------------------------------------------------------------------------+-------------------+-------------------+
|0   |#33:0|Database|_identifiers|STORAGE|false         |true              |{url=mongodb://mongo:27017/opal_ids, username=, password=, properties=, batchSize=100} |2024-08-06 12:02:35|2024-08-06 12:02:35|
|1   |#34:0|Database|mongodb     |STORAGE|true          |false             |{url=mongodb://mongo:27017/opal_data, username=, password=, properties=, batchSize=100}|2024-08-06 12:02:36|2024-08-06 12:02:36|

# New OrientDB
connect plocal:/data/new-volumes/opal/data/orientdb/opal-config admin admin
update Database merge {mongoDbSettings: {url:'mongodb://mongo:27017/opal_data?authSource=admin', username:'toto', password:'ABCDFED', properties:'', batchSize:100}} where name = 'opal_data'
update Database merge {mongoDbSettings: {url:'mongodb://mongo:27017/opal_ids?authSource=admin', username:'toto', password:'JDHEGEE', properties:'', batchSize:100}} where name <> 'opal_data'

Sometimes and not often I use this command to point the Database classes to another IP.

  • Stop the new container and copy all relevant volumes from your backup above (work, data, fs, etc) except:
    • data/orientdb
    • data/keystore
  • Make sure all the folders in the volume folder have proper permissions
  • Cross fingers
  • Start the instance

If Opal starts without any issues, you can try to create a Project you know (In the old OrientDB select * from Project limit 1000). Since the actual data DB still has your datasources, it should be able to recuperate all tables and variables.

What is lost? ACLs, users, groups, alas all configurations but you may able to, painfully, recreating them by finding the required info via the old database, say, to find all old users :

select * from SubjectAcl limit 1000 # use temp password and let the users change them

One last thing, if you have Opal, Mongo/MySQL, Rock all as containers using a docker-compose.yml, recreate them all with the old volumes (make sure they have the same versions) and follow the above suggestions for Opal only.

Best of lucks,


Tom Bishop

unread,
Sep 23, 2024, 11:16:35 AM9/23/24
to obiba...@googlegroups.com

Hi Ramin,

 

Thanks again for your guidance. I see that there is an option to essentially manually reconstruct the information held in orientdb via the console. I think I will have to wait for the backups first and see if that works.

 

Best wishes


Tom

 

From: obiba...@googlegroups.com <obiba...@googlegroups.com> On Behalf Of Ramin H.A.
Sent: 23 September 2024 15:46
To: obiba...@googlegroups.com
Subject: Re: [OBiBa] Opal not starting - opal-config?

 

The good news is that the actual data (datasources, view and identifiers) is not in the OrientDB as this database is primarily for configurations.

If you have time, you could:

·         Backup the current volumes to another folder where you’d start a new Opal instance (use rsync -avP to preserve ownership)

·         Start a fresh new Opal container with the same version as the previous one

·         Configure your new Opal database such that it points to the correct Opal Data and Identifiers DBs (doc), e.g.:

# Old OrientDB
select * from Database
 
# Output
+----+-----+--------+------------+-------+--------------+------------------+---------------------------------------------------------------------------------------+-------------------+-------------------+
|#   |@RID |@CLASS  |name        |usage  |defaultStorage|usedForIdentifiers|mongoDbSettings                                                                        |created            |updated            |
+----+-----+--------+------------+-------+--------------+------------------+---------------------------------------------------------------------------------------+-------------------+-------------------+
|0   |#33:0|Database|_identifiers|STORAGE|false         |true              |{url=mongodb://mongo:27017/opal_ids, username=, password=, properties=, batchSize=100} |2024-08-06 12:02:35|2024-08-06 12:02:35|
|1   |#34:0|Database|mongodb     |STORAGE|true          |false             |{url=mongodb://mongo:27017/opal_data, username=, password=, properties=, batchSize=100}|2024-08-06 12:02:36|2024-08-06 12:02:36|
 
# New OrientDB
connect plocal:/data/new-volumes/opal/data/orientdb/opal-config admin admin
update Database merge {mongoDbSettings: {url:'mongodb://mongo:27017/opal_data?authSource=admin', username:'toto', password:'ABCDFED', properties:'', batchSize:100}} where name = 'opal_data'
update Database merge {mongoDbSettings: {url:'mongodb://mongo:27017/opal_ids?authSource=admin', username:'toto', password:'JDHEGEE', properties:'', batchSize:100}} where name <> 'opal_data'

Sometimes and not often I use this command to point the Database classes to another IP.

·         Stop the new container and copy all relevant volumes from your backup above (work, data, fs, etc) except:

o    data/orientdb

o    data/keystore

Tom Bishop

unread,
Dec 16, 2024, 11:14:59 AM12/16/24
to obiba...@googlegroups.com

Hi,

 

Just to close the loop on this one, where the OrientDB had become corrupted. Thankfully I was able to restore from a back up. I hope I don’t have to do that again! And I’m glad the back ups worked J

 

Thanks for your help with the steps to do this.

 

Tom

Ramin H.A.

unread,
Dec 16, 2024, 11:39:24 AM12/16/24
to obiba...@googlegroups.com
Great news and I hope you don't have to go through this again. 

Ramin

Reply all
Reply to author
Forward
0 new messages