Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59271

Statistics Gatherer Plugin - org.json.JSONException: A JSONArray text must start with '['

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins version: 2.164.3
      Statistics Gatherer version: 2.0.3
      CentOS 7.x

      When the plugin is sending 'queue' requests to Logstash, we are seeing the following messages in the Jenkins log:

      The request for url http://logstashserver:5000/jenkins_queue/ has failed.
      org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
      	at org.json.JSONTokener.syntaxError(JSONTokener.java:433)
      	at org.json.JSONArray.<init>(JSONArray.java:105)
      	at org.json.JSONArray.<init>(JSONArray.java:144)
      	at com.mashape.unirest.http.JsonNode.<init>(JsonNode.java:48)
      Caused: java.lang.RuntimeException
      	at com.mashape.unirest.http.JsonNode.<init>(JsonNode.java:51)
      	at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:95)
      Caused: java.lang.RuntimeException
      	at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:106)
      	at com.mashape.unirest.http.HttpClientHelper$1.completed(HttpClientHelper.java:82)
      	at com.mashape.unirest.http.HttpClientHelper$1.completed(HttpClientHelper.java:75)
      	at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119)
      	at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:173)
      	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:355)
      	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:242)
      	at org.apache.http.impl.nio.client.LoggingAsyncRequestExecutor.inputReady(LoggingAsyncRequestExecutor.java:87)
      	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:264)
      Caused: com.mashape.unirest.http.exceptions.UnirestException
      	at com.mashape.unirest.http.HttpClientHelper$1.failed(HttpClientHelper.java:86)
      	at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:134)
      	at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.failed(DefaultClientExchangeHandlerImpl.java:258)
      	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.exception(HttpAsyncRequestExecutor.java:123)
      	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:275)
      	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:73)
      	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:37)
      	at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:113)
      	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:159)
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:338)
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316)
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277)
      	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105)
      	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:584)
      	at java.lang.Thread.run(Thread.java:748)
      

            lucamilanesio Luca Domenico Milanesio
            leoqa Lee Leibke
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: