c.a.b.s.s.i.t.DefaultElasticsearchConnectionTester Testing connection with Elasticsearch failed due to exception
java.util.concurrent.CompletionException: java.net.ConnectException: Connection refused: no further information
at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) ~[na:1.8.0_74]
at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) ~[na:1.8.0_74]
at java.util.concurrent.CompletableFuture.uniApply(Unknown Source) ~[na:1.8.0_74]
at java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source) ~[na:1.8.0_74]
at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) ~[na:1.8.0_74]
at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source) ~[na:1.8.0_74]
at com.atlassian.elasticsearch.client.apache.httpclient.ApacheRequestExecutor$1.failed(ApacheRequestExecutor.java:144) ~[na:na]
at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:134) ~[httpcore-4.4.4.jar:4.4.4]
at org.apache.http.impl.nio.client.AbstractClientExchangeHandler.failed(AbstractClientExchangeHandler.java:414) ~[na:na]
at org.apache.http.impl.nio.client.AbstractClientExchangeHandler.connectionRequestFailed(AbstractClientExchangeHandler.java:330) ~[na:na]
at org.apache.http.impl.nio.client.AbstractClientExchangeHandler.access$100(AbstractClientExchangeHandler.java:61) ~[na:na]
at org.apache.http.impl.nio.client.AbstractClientExchangeHandler$1.failed(AbstractClientExchangeHandler.java:373) ~[na:na]
at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:134) ~[httpcore-4.4.4.jar:4.4.4]
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager$InternalPoolEntryCallback.failed(PoolingNHttpClientConnectionManager.java:503) ~[na:na]
at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:134) ~[httpcore-4.4.4.jar:4.4.4]
at org.apache.http.nio.pool.RouteSpecificPool.failed(RouteSpecificPool.java:165) ~[na:na]
at org.apache.http.nio.pool.AbstractNIOConnPool.requestFailed(AbstractNIOConnPool.java:541) ~[na:na]
at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.failed(AbstractNIOConnPool.java:816) ~[na:na]
at org.apache.http.impl.nio.reactor.SessionRequestImpl.failed(SessionRequestImpl.java:159) ~[na:na]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:175) ~[na:na]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:147) ~[na:na]
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:350) ~[na:na]
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:191) ~[na:na]
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) ~[na:na]
at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_74]
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_74]
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.8.0_74]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:173) ~[na:na]
... 5 common frames omitted
2017-04-25 09:53:33,611 ERROR [Caesium-1-1] c.a.b.s.s.i.p.AutomaticAuthenticationProvisioner Skipping automatic auth configuration: Elasticsearch instance is not available for connection.
2017-04-25 09:53:33,611 INFO [Caesium-1-1] c.a.b.s.i.i.jobs.StartupChecksJob Running startup jobs for search
2017-04-25 09:53:34,643 ERROR [Caesium-1-1] c.a.b.s.i.i.IndexingSynchronizationService Unable to establish a connection to Elasticsearch.
2017-04-25 09:53:34,643 WARN [Caesium-1-1] c.a.b.s.i.i.cluster.ClusterJobRunner Job execution failed. Rescheduling. Job key: com.atlassian.bitbucket.search.internal.indexing.jobs.StartupChecksJob Job id: ec467f44-bd0f-4e24-b256-bf0504e3edda
This error keeps comming up when using with bitbucket. How do you fix this?