diff --git a/src/main/java/org/elasticsearch/rest/action/admin/cluster/tasks/RestPendingClusterTasksAction.java b/src/main/java/org/elasticsearch/rest/action/admin/cluster/tasks/RestPendingClusterTasksAction.java index 6ae8e6edfac..add1f0d3fad 100644 --- a/src/main/java/org/elasticsearch/rest/action/admin/cluster/tasks/RestPendingClusterTasksAction.java +++ b/src/main/java/org/elasticsearch/rest/action/admin/cluster/tasks/RestPendingClusterTasksAction.java @@ -52,6 +52,7 @@ public class RestPendingClusterTasksAction extends BaseRestHandler { XContentBuilder builder = RestXContentBuilder.restContentBuilder(request); builder.startObject(); response.toXContent(builder, request); + builder.endObject(); channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder)); } catch (Throwable e) { onFailure(e); diff --git a/src/main/java/org/elasticsearch/river/RiversService.java b/src/main/java/org/elasticsearch/river/RiversService.java index b992f7023fd..b32a1bff871 100644 --- a/src/main/java/org/elasticsearch/river/RiversService.java +++ b/src/main/java/org/elasticsearch/river/RiversService.java @@ -172,6 +172,7 @@ public class RiversService extends AbstractLifecycleComponent { builder.field("name", clusterService.localNode().name()); builder.field("transport_address", clusterService.localNode().address().toString()); builder.endObject(); + builder.endObject(); client.prepareIndex(riverIndexName, riverName.name(), "_status") .setConsistencyLevel(WriteConsistencyLevel.ONE)