resolve Solr pod startup error: Failed to create collection 'dataone_index' due to: collection already exists: dataone_index

Open
#54 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
kubernetes, shell

Research direction

Start with the /solrconfig/config-solr.sh script referenced by the failed post-start hook and inspect how the dataone_index collection is created while the Solr pods wait for ZooKeeper. Reproduce or review the pod startup described in the issue; done means an already-existing collection no longer causes the lifecycle hook to fail or the pod to restart.

Written by the indexing model from the issue text.

Description

Not critical, since the pod automatically restarts, but should be cleaned up at some point to avoid confusion:

Looks like a race condition where one of the solr pods is trying to create the dataone_index collection when another one has already created it:

kc describe pod/metacatbrooke-solr-0
[...]
  Warning  FailedPostStartHook     48s    kubelet                  Exec lifecycle hook ([/bin/bash -c /solrconfig/config-solr.sh]) for Container "solr" in Pod "metacatbrooke-solr-0_brooke(cd1c3c64-74b6-4bf6-8b74-c9e301e93a36)" failed - error: command '/bin/bash -c /solrconfig/config-solr.sh' exited with 1: solr 19:40:01.60 INFO  ==> Waiting for Zookeeper to be up

ERROR: Failed to create collection 'dataone_index' due to: collection already exists: dataone_index

, message: "Uploading /bitnami/solr/server/solr/configsets/dataone_index/conf for config 
dataone_index to ZooKeeper at metacatbrooke-zookeeper:2181/solr\nRe-using existing configuration 
directory dataone_index\n\x1b[38;5;6msolr \x1b[38;5;5m19:40:01.60 \x1b[0m\x1b[38;5;2mINFO \x1b[0m 
==> Waiting for Zookeeper to be up\n\nERROR: Failed to create collection 'dataone_index' due to: 
collection already exists: dataone_index\n\n"

  Normal  Killing  48s                  kubelet  FailedPostStartHook
Dominant language
Java
Stars
0
Forks
2
Avg merge
6d 6h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataONEorg/dataone-indexer

All issues in DataONEorg/dataone-indexer

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.