Invalid Version Format Error When Configuring Code Search
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
When configuring Bitbucket Server Code Search, the test returns Connection attempt failed to establish connection. Check the Bitbucket log for details.
and the follow error is present in bitbucket_search.log
:
[2016-07-11 17:38:43,450][WARN ][com.atlassian.elasticsearch.buckler.SecureHttpServerTransport] [bitbucket_bundled] Caught exception while handling client http traffic, closing connection [id: 0xee988843, /127.0.0.1:36916 => /127.0.0.1:7992]
java.lang.IllegalArgumentException: invalid version format:
The following error appears in atlassian-bitbucket.log
:
2016-07-12 02:36:34,475 INFO [I/O dispatcher 13] admin @18ELAMUx156x42x0 14g89mb 1.227.57.126 "POST /rest/search-admin/latest/test-connection HTTP/1.1" c.a.b.s.s.i.t.DefaultElasticsearchConnectionTester Testing connection with Elasticsearch failed due to exception
java.util.concurrent.CompletionException: org.apache.http.ConnectionClosedException: Connection closed
原因
The protocol being used to connect to Elasticsearch is incorrect. This is usually caused by having Bitbucket Server configured to use HTTPS to connect to Elasticsearch and Elasticsearch not being configured to support HTTPS.
For example, if the Elasticsearch URL is set to https://localhost:7992
this error will be encountered.
ソリューション
Under Adminstration >> Server Settings >> Search
change the Elasticsearch URL to http://localhost:7992