Closed atikhono closed 8 years ago
@linc01n please have a look
I can start bitbucket and search with d779f76 of the cookbook on an upgrade of existing instance. Let me try fresh one.
@linc01n have you got a fresh instance working without this patch?
@atikhono I tried a fresh install and reproduce this bug. It is about the copying of the elasticsearch config files. Merged. Thanks
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.