I have installed Bitbucket Server from scratch, version 7.21.3 on Windows Server 2016.
The installation is secured by using a non-default user account to run the BitBucket and ElasticSearch services, and Apache redirects http:7990 to https. Crowd is used for user authentication, and SSO is set up and working.
Bitbucket itself appears to be working without problems, however the ElasticSearch service does not start up properly.
When I start the ElasticSearch service, it stops again immediately, and reports the following error in atlassianbitbucketsearch-stderr.log:
org.springframeowrk.boot.web.server.PortInUseException: Port 7990 is already in use
Port 7990 is Bitbucket's default port, so it seems reasonable that this port is in use. I'm not sure why ElasticSearch is also trying to use it.
I have tried stopping Bitbucket, then starting ElasticSearch, then starting BitBucket again, and while ElasticSearch starts up and keeps running, obviously BitBucket does not.
I have bypassed Apache and returned to the original http:7990 set up, but I still have the same problem.
Any help on why is ElasticSearch trying to use Bitbucket's port, and how do I get around this so ElasticSearch runs properly would be appreciated!
Hi @Helen
The elasticsearch port is defined in <Bitbucket home directory>/shared/search/elasticsearch.yml. Can you check which port is defined in that file?
You can also follow this procedure.
Ah, I don't seem to have that file at all! That might explain something :P
Looking at https://confluence.atlassian.com/bitbucketserver0721/running-bitbucket-server-as-a-windows-service-1115666779.html, there should have been a robocopy executed to copy files from the installation directory to the that location.
The robocopy refers to "config-template" directory which doesn't exist in my Bitbucket installation.
I think I need to robocopy the <bitbucket-install>\opensearch\config directory. There is an opensearch.yml file in it, which I think is my equivilent of elasticsearch.yml.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Indeed, you seem to be missing some files.
Let me know if you are able to solve it :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I resolved it by removing the Bitbucket installation and installing from scratch; the service just refused to pick up on the proper ports.
I clearly stuffed something up during the initial installation because it installed just fine the second time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok, I'm glad it was resolved!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.