Invalid Version Format Error When Configuring Code Search

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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.

*Except Fisheye and Crucible

Problem

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

Cause

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.

Resolution

Under Adminstration >> Server Settings >> Search change the Elasticsearch URL to http://localhost:7992

Last modified on Jul 11, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.