Testing connection with Elasticsearch failed due to exception java.util.concurrent.CompletionException: java.net.ConnectException: Connection refused: no further information


(Dirk) #1
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?


(David Pilato) #2

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

There is absolutely no code in the stacktrace coming from elasticsearch.

Connection refused

Is probably the important message here. Check if elasticsearch is running and if port 9200 is accessible from your machine.


(Dirk) #3

sorry edited.

Elasticseach is running and port 9200 is accesible.
If you go to 127.0.0.1:9200 it will download a json file.


(Dirk) #4

Fixed it, bitbucket was automaticly going to port 7992. So i changed that to 9200 and now its working. Before this i had to do a lot of other stuff to even get the service running. So i am happy now, thanks for the help


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.