This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
Run start-bitbucket.sh with the full path in Bitbucket init script #158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After merging #157 I've converged a new bitbucket instance, and it seems that patch isn't enough to bring the code search up.
When I start Bitbucket manually, I get 'cannot stat' error and elasticsearch fails as log4j isn't configured properly (elasticsearch/config-template/ contains logging configuration). The result is the same -- 'Search is unavailable'.
The culprit is this line (in start-search.sh):
$sucmd -l $BITBUCKET_USER -c "mkdir -p "$ES_CONFIG_PATH" && cp -r "$PRGDIR/../elasticsearch/config-template/"* "$ES_CONFIG_PATH""
It copies logging configuration to where elasticsearch is set to look for it.
start-search.sh is called by start-bitbucket.sh, and start-bitbucket.sh is called by the init script:
So PRGDIR is ./. It looks like a bug in start-search.sh.
We can workaround by running $BASE/bin/start-bitbucket.sh instead of ./start-bitbucket.sh in the init script. Worked for me.