Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-61577

JIRA throws exception with 500 code for rest/api/2/reindex/progress call

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Summary

      JIRA throws exception with 500 code for REST API rest/api/2/reindex/progress call after locked re-index failed.

      Steps to Reproduce

      1. Run re-index
        curl -v -u admin:pass -X POST  http://127.0.0.1:8080/rest/api/2/reindex?type=FOREGROUND
        
      2. While re-indexing running, delete some part of Lucene data: rm -rf jira_6.4/caches/indexes/comments/*cfs
      3. Check status using REST API /rest/api/2/reindex/progress, it should return something like:
        {"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=11311","currentProgress":65,"currentSubTask":"Currently working on: Issue index","type":"FOREGROUND","submittedTime":"2016-06-20T15:11:03.867+0200","startTime":"2016-06-20T15:11:03.868+0200","success":false}
        
      4. Wait for Index completes (with errors)
      5. Call REST API /rest/api/2/reindex/progress

      Expected Results

      Call doesn't fail and returns valid data:

      {"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=11312","currentProgress":100,"currentSubTask":"Currently working on: PortalPage index","type":"FOREGROUND","submittedTime":"2016-06-20T18:09:14.081+0200","startTime":"2016-06-20T18:09:14.084+0200","finishTime":"2016-06-20T18:09:27.658+0200","success":true}
      

      Actual Results

      Call fails with 500 error:

      org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.atlassian.jira.util.SimpleErrorCollection and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) )
              at org.codehaus.jackson.map.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:52)
              at org.codehaus.jackson.map.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:25)
              at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:610)
              at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256)
              at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1604)
              at org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:558)
              at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437)
              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
              at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
      ...
      

      Notes

      (Optional - If Necessary)

      Workaround

      1. After initiating reindex job, remember "progressUrl" link from reply, eg: "/secure/admin/jira/IndexProgress.jspa?taskId=11312"
      2. If call to /rest/api/2/reindex/progress returns error 500, check progressUrl for possible related error.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ayakovlev@atlassian.com Andriy Yakovlev [Atlassian]
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: