After upgrading to Bitbucket Server 4.6+, Elasticsearch does not start automatically and the search returns "Search is currently unavailable"

XMLWordPrintable

    • Type: Bug
    • Resolution: Handled by Support
    • Priority: Medium
    • None
    • Affects Version/s: 4.6.0
    • Component/s: Search

      Summary

      After upgrading to Bitbucket Server 4.6+, Elasticsearch does not start automatically and the search returns "Search is currently unavailable".

      Steps to Reproduce

      1. Upgrade Bitbucket Server to a version including the Code Search functionality (4.6+)
      2. Search for an item

      Expected Results

      The search runs successfully, and the expected results are returned.

      Actual Results

      The "Search is currently unavailable" is displayed in the user interface, and the following appears in the atlassian-bitbucket.log file:

      ERROR [search-indexing:thread-1]  c.a.b.s.i.i.e.DefaultIndexEventWorker Indexing - Failed for repository <repository_name> (id: <repository_id>) with error: java.net.ConnectException: Connection refused
      java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
      	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[na:1.8.0_65]
      	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) ~[na:1.8.0_65]
      ...
      java.net.ConnectException: Connection refused
      	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_65]
      	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_65]
      

      Workaround

      Manually start the search by using:

      sudo service atlbitbucket_search start
      

        1. server config.png
          server config.png
          21 kB
        2. server busy.png
          server busy.png
          10 kB
        3. search not available.png
          search not available.png
          13 kB

            Assignee:
            Paul Thompson (Inactive)
            Reporter:
            Caterina Curti
            Votes:
            2 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: