Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemInitializers should not give upon the first failed attempt #10604

Open
rymsha opened this issue Jun 22, 2024 · 1 comment
Open

SystemInitializers should not give upon the first failed attempt #10604

rymsha opened this issue Jun 22, 2024 · 1 comment
Assignees
Labels

Comments

@rymsha
Copy link
Contributor

rymsha commented Jun 22, 2024

A store timeout laves system repository in broken state so the entire cluster cannot boot up properly

Initializer should retry the init in case of a failure

2024-05-30T18:06:57,231 ERROR c.e.x.c.i.s.SecurityInitializer - Unable to initialize role: role:system.auditlog
com.enonic.xp.repository.IndexException: Failed to store document with id [role:system.auditlog] in index [search-system-repo] branch master
	at com.enonic.xp.repo.impl.elasticsearch.storage.StorageDaoImpl.store(StorageDaoImpl.java:118)
	at com.enonic.xp.repo.impl.storage.IndexDataServiceImpl.store(IndexDataServiceImpl.java:105)
	at com.enonic.xp.repo.impl.storage.NodeStorageServiceImpl.store(NodeStorageServiceImpl.java:107)
	at com.enonic.xp.repo.impl.storage.NodeStorageServiceImpl.store(NodeStorageServiceImpl.java:76)
	at com.enonic.xp.repo.impl.node.CreateNodeCommand.execute(CreateNodeCommand.java:98)
	at com.enonic.xp.repo.impl.node.NodeServiceImpl.doCreate(NodeServiceImpl.java:417)
	at com.enonic.xp.repo.impl.node.NodeServiceImpl.create(NodeServiceImpl.java:405)
	at com.enonic.xp.core.impl.security.SecurityServiceImpl.lambda$createRole$28(SecurityServiceImpl.java:756)
	at com.enonic.xp.context.ContextImpl.callWith(ContextImpl.java:100)
	at com.enonic.xp.core.impl.security.SecurityServiceImpl.callWithContext(SecurityServiceImpl.java:1084)
	at com.enonic.xp.core.impl.security.SecurityServiceImpl.createRole(SecurityServiceImpl.java:756)
	at com.enonic.xp.core.impl.security.SecurityInitializer.addRole(SecurityInitializer.java:331)
	at com.enonic.xp.core.impl.security.SecurityInitializer.initializeRoles(SecurityInitializer.java:263)
	at com.enonic.xp.core.impl.security.SecurityInitializer.lambda$doInitialize$0(SecurityInitializer.java:117)
	at com.enonic.xp.context.ContextImpl.runWith(ContextImpl.java:84)
	at com.enonic.xp.core.impl.security.SecurityInitializer.doInitialize(SecurityInitializer.java:114)
	at com.enonic.xp.init.Initializer.initialize(Initializer.java:51)
Caused by: org.elasticsearch.ElasticsearchTimeoutException: Timeout waiting for task.
	at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:70)
	at com.enonic.xp.repo.impl.elasticsearch.storage.StorageDaoImpl.store(StorageDaoImpl.java:111)
	... 243 common frames omitted
2024-05-30T18:06:57,274 INFO  c.e.x.c.i.s.SecurityInitializer - Added user:system:su as member of role:system.admin
2024-05-30T18:06:57,278 INFO  c.e.x.c.i.s.SecurityInitializer - Initializing [/keys] folder
2024-05-30T18:07:07,436 ERROR c.e.x.c.i.s.SecurityServiceActivator - bundle com.enonic.xp.core.security:7.14.1 (73)[com.enonic.xp.core.impl.security.SecurityServiceActivator(148)] : The activate method has thrown an exception
org.apache.felix.log.LogException: com.enonic.xp.repository.IndexException: Failed to store document with id [95b432c2-8429-47cb-8fb5-bd8a015148f6] in index [search-system-repo] branch master
	at com.enonic.xp.repo.impl.elasticsearch.storage.StorageDaoImpl.store(StorageDaoImpl.java:118)
	at com.enonic.xp.repo.impl.storage.IndexDataServiceImpl.store(IndexDataServiceImpl.java:105)
	at com.enonic.xp.repo.impl.storage.NodeStorageServiceImpl.store(NodeStorageServiceImpl.java:107)
	at com.enonic.xp.repo.impl.storage.NodeStorageServiceImpl.store(NodeStorageServiceImpl.java:76)
	at com.enonic.xp.repo.impl.node.CreateNodeCommand.execute(CreateNodeCommand.java:98)
	at com.enonic.xp.repo.impl.node.NodeServiceImpl.doCreate(NodeServiceImpl.java:417)
	at com.enonic.xp.repo.impl.node.NodeServiceImpl.create(NodeServiceImpl.java:405)
	at com.enonic.xp.core.impl.security.SecurityInitializer.initializeKeys(SecurityInitializer.java:182)
	at com.enonic.xp.core.impl.security.SecurityInitializer.lambda$doInitialize$0(SecurityInitializer.java:122)
	at com.enonic.xp.context.ContextImpl.runWith(ContextImpl.java:84)
	at com.enonic.xp.core.impl.security.SecurityInitializer.doInitialize(SecurityInitializer.java:114)
	at com.enonic.xp.init.Initializer.initialize(Initializer.java:51)
	at com.enonic.xp.core.impl.security.SecurityServiceActivator.activate(SecurityServiceActivator.java:43)
Caused by: org.apache.felix.log.LogException: org.elasticsearch.ElasticsearchTimeoutException: Timeout waiting for task.
	at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:70)
	at com.enonic.xp.repo.impl.elasticsearch.storage.StorageDaoImpl.store(StorageDaoImpl.java:111)
	... 238 common frames omitted
@rymsha rymsha added the Bug label Jun 22, 2024
@rymsha rymsha self-assigned this Jun 22, 2024
@rymsha
Copy link
Contributor Author

rymsha commented Jun 22, 2024

Additionaly based on experience xp.init.maxTries should be 900 (which gives ~15 minutes) #10615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants