cancel
Showing results for 
Search instead for 
Did you mean: 

Error master tenant upgrading 6.4 to 1808 when updating system

Former Member
0 Kudos

Hello, I followed the steps of the documentation to update from version 6.4 to 1808, one by version. But I can not update the system (HAC> Update) due to this error, the update log is blocked and it does not continue until I manually stop the Hybris process. Therefore, the update does not finish correctly and the system is corrupted .

 ERROR [impex result worker [cj:00002WXW-ImpEx-Import]] [Registry] cannot activate tenant <<master>> since its database connection is currently lost
 ERROR [ImpExWorker<5/8>] [FlexibleSearch] line 11 at main script: Flexible search error occured...
 ERROR [ImpExWorker<5/8>] [FlexibleSearch] line 12 at main script: Flexible search error occured...
 ERROR [impex result worker [cj:00002WXW-ImpEx-Import]] [PoolableThread] Problems executing impex result worker [cj:00002WXW-ImpEx-Import] : could not switch tenant to <<master>> 
 java.lang.IllegalStateException: could not switch tenant to <<master>>
     at de.hybris.platform.core.Registry.activateTenant(Registry.java:721)
     at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:566)
     at de.hybris.platform.core.Registry.activateMasterTenant(Registry.java:626)
     at de.hybris.platform.core.Registry.activateMasterTenantAndFailIfAlreadySet(Registry.java:614)
     at de.hybris.platform.util.threadpool.ThreadPool.setTenant(ThreadPool.java:79)
     at de.hybris.platform.util.threadpool.PoolableThread.internalRun(PoolableThread.java:206)
     at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:134)
 
 ERROR [ImpExWorker<2/8>] [Registry] line 7 at main script: cannot activate tenant <<master>> since its database connection is currently lost
 ERROR [ImpExWorker<2/8>] [FlexibleSearch] line 7 at main script: Flexible search error occured...
 INFO  [ImpExWorker<2/8>] [DefaultImportProcessor] Failed to process item update due to ModelSavingException. Retrying in the next turn.
 WARN  [ImpExWorker<3/8>] [Registry] line 9 at main script: Activating tenant master after connection had been broken. In a clustered environment this node may be out of sync with the rest of the cluster in case of complete network outage!
 WARN  [ImpExWorker<5/8>] [JaloSession] There are some active local session contexts left (4) for tenant master, this might indicate there are not properly freed localsession context instances.
 INFO  [ImpExWorker<1/8>] [ImpExWorker] Returning worker impex worker 1/8 [cj:00002WXW-ImpEx-Import] to the pool
 


The environment starts correctly with the database (SQLServer) and this is a copy of the production environment (in production there are two servers in cluster for hyrbis more one for SQLServer) I do not know what more information to give to solve this.

I have tried set Registry current tenant to master and nothing

Thank you very much and greetings.

former_member620692
Active Contributor
0 Kudos

It seems Hybris is losing connection with SQL Server. Which version of SQL Server and driver are you using? Did you check the SQL Server log if it was down or inaccessible during that time? I hope you have also checked your configuration as suggested at https://help.hybris.com/1811/hcd/8c10641f86691014ab1ad4f02d3be056.html and you have also gone through some important links mentioned there. Since it is working correctly in production, you can also compare your configuration with that of the production system and see if you are missing anything.

Former Member
0 Kudos

I do not think there's a problem with the version or driver. I have another similar instance raised using the Hybris 6.4 version and it goes perfectly. In this version 1808 run server well but does not update, I have even in version 6.5 also updated correctly

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member620692
Active Contributor
0 Kudos

For a similar problem, the following solution worked for me:

A. Execute the following SQL commands:

 ALTER DATABASE my-database-name SET READ_COMMITTED_SNAPSHOT ON
 ALTER DATABASE my-database-name SET ALLOW_SNAPSHOT_ISOLATION ON

The SQL commands mentioned above may fail for an existing database. If you are creating a new database, they must be executed.
B. Put the following property in local.properties:

 db.pool.maxActive=10000

The property mentioned above has once rescued me even from a similar problem with MySQL database.

You can get some useful information at https://help.hybris.com/1811/hcd/8c10641f86691014ab1ad4f02d3be056.html e.g. I created my database using the following SQL command as suggested on this page:

 CREATE DATABASE my-database-name COLLATE Latin1_General_CI_AS

Please let me know if it works for you too.