# Rotation of active write index

**URL:** <https://community.graylog.org/t/rotation-of-active-write-index/6509>\
**Category:** Graylog Central (peer support)\
**Created:** [August 20, 2018, 12:25pm UTC](https://community.graylog.org/t/rotation-of-active-write-index/6509 "2018-08-20T12:25:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwe123345](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@pwe123345](https://community.graylog.org/u/pwe123345)\
**Post date:** [August 20, 2018, 12:25pm UTC](https://community.graylog.org/t/rotation-of-active-write-index/6509/1 "2018-08-20T12:25:37Z")

</div>

Hello,

since today, I have problems rotating the active write index.

My setup contains:

- 3 Nodes
- 4 Shards
- 1 Index Set
- Graylog 2.4.6
- EL 2.4.5

Here is the output of the logfile:

```
2018-08-20T14:21:03.413+02:00 INFO [DeflectorResource] Cycling deflector for index set <592edf5abd2d5662613a0fe7>. Reason: REST request.
2018-08-20T14:21:03.418+02:00 INFO [MongoIndexSet] Cycling from <graylog_589> to <graylog_590>.
2018-08-20T14:21:03.418+02:00 INFO [MongoIndexSet] Creating target index <graylog_590>.
2018-08-20T14:21:03.551+02:00 INFO [Indices] Successfully created index template graylog-internal
2018-08-20T14:21:04.198+02:00 INFO [MongoIndexSet] Waiting for allocation of index <graylog_590>.
2018-08-20T14:21:04.354+02:00 ERROR [IndexRotationThread] Couldn't point deflector to a new index
org.graylog2.indexer.ElasticsearchException: Couldn't read health status for index graylog_589

    at org.graylog2.indexer.cluster.jest.JestUtils.specificException(JestUtils.java:95) ~[graylog.jar:?]
    at org.graylog2.indexer.cluster.jest.JestUtils.execute(JestUtils.java:57) ~[graylog.jar:?]
    at org.graylog2.indexer.cluster.jest.JestUtils.execute(JestUtils.java:62) ~[graylog.jar:?]
    at org.graylog2.indexer.indices.Indices.waitForStatus(Indices.java:642) ~[graylog.jar:?]
    at org.graylog2.indexer.indices.Indices.waitForRecovery(Indices.java:633) ~[graylog.jar:?]
    at org.graylog2.periodical.IndexRotationThread.checkAndRepair(IndexRotationThread.java:163) ~[graylog.jar:?]
    at org.graylog2.periodical.IndexRotationThread.lambda$doRun$0(IndexRotationThread.java:76) ~[graylog.jar:?]
    at java.lang.Iterable.forEach(Iterable.java:75) [?:1.8.0_181]
    at org.graylog2.periodical.IndexRotationThread.doRun(IndexRotationThread.java:73) [graylog.jar:?]
    at org.graylog2.plugin.periodical.Periodical.run(Periodical.java:77) [graylog.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
2018-08-20T14:21:04.367+02:00 WARN [IndexRotationThread] Deflector is pointing to [graylog_587], not the newest one: [graylog_590]. Re-pointing.
2018-08-20T14:21:13.410+02:00 ERROR [AnyExceptionClassMapper] Unhandled exception in REST resource
java.net.SocketTimeoutException: timeout
    at okio.Okio$4.newTimeoutException(Okio.java:230) ~[graylog.jar:?]
    at okio.AsyncTimeout.exit(AsyncTimeout.java:285) ~[graylog.jar:?]
    at okio.AsyncTimeout$2.read(AsyncTimeout.java:241) ~[graylog.jar:?]
    at okio.RealBufferedSource.indexOf(RealBufferedSource.java:345) ~[graylog.jar:?]
    at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:217) ~[graylog.jar:?]
    at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:211) ~[graylog.jar:?]
    at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:187) ~[graylog.jar:?]
    at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[graylog.jar:?]
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[graylog.jar:?]
    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[graylog.jar:?]
    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[graylog.jar:?]
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[graylog.jar:?]
    at org.graylog2.rest.RemoteInterfaceProvider.lambda$get$0(RemoteInterfaceProvider.java:59) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[graylog.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[graylog.jar:?]
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) ~[graylog.jar:?]
    at okhttp3.RealCall.execute(RealCall.java:77) ~[graylog.jar:?]
    at retrofit2.OkHttpCall.execute(OkHttpCall.java:180) ~[graylog.jar:?]
    at org.graylog2.rest.resources.cluster.ClusterDeflectorResource.cycle(ClusterDeflectorResource.java:75) ~[graylog.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) ~[graylog.jar:?]
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) ~[graylog.jar:?]
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) ~[graylog.jar:?]
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:143) ~[graylog.jar:?]
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ~[graylog.jar:?]
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[graylog.jar:?]
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[graylog.jar:?]
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[graylog.jar:?]
    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [graylog.jar:?]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [graylog.jar:?]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [graylog.jar:?]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [graylog.jar:?]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [graylog.jar:?]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [graylog.jar:?]
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [graylog.jar:?]
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [graylog.jar:?]
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [graylog.jar:?]
    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384) [graylog.jar:?]
    at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) [graylog.jar:?]
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) [graylog.jar:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: java.net.SocketException: Socket closed
    at java.net.SocketInputStream.read(SocketInputStream.java:204) ~[?:1.8.0_181]
    at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_181]
    at okio.Okio$2.read(Okio.java:139) ~[graylog.jar:?]
    at okio.AsyncTimeout$2.read(AsyncTimeout.java:237) ~[graylog.jar:?]
    ... 51 more
```

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [August 20, 2018, 3:42pm UTC](https://community.graylog.org/t/rotation-of-active-write-index/6509/2 "2018-08-20T15:42:43Z")

</div>

did you checked the health of your elasticsearch and that it response in time for Graylog?

---

<div class="post-metadata">

**Author:** ![pwe123345](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@pwe123345](https://community.graylog.org/u/pwe123345)\
**Post date:** [August 21, 2018, 5:41am UTC](https://community.graylog.org/t/rotation-of-active-write-index/6509/3 "2018-08-21T05:41:21Z")

</div>

Hello,

here is the health:

```
{
  "cluster_name" : "graylog",
  "status" : "red",
  "timed_out" : false,
  "number_of_nodes" : 3,
  "number_of_data_nodes" : 3,
  "active_primary_shards" : 1456,
  "active_shards" : 1456,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 12,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 99.1825613079019
}

```

How do I find out the response time?

kind regards  
Philipp

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [August 21, 2018, 8:46am UTC](https://community.graylog.org/t/rotation-of-active-write-index/6509/4 "2018-08-21T08:46:57Z")

</div>

you should read our short description about the different status messages in the documentation:

[http://docs.graylog.org/en/2.4/pages/configuration/elasticsearch.html#cluster-status-explained](http://docs.graylog.org/en/2.4/pages/configuration/elasticsearch.html#cluster-status-explained)

As you have unassigned shard != 0 you might want to check with the following articel that you have no unassigned shards and your status is green again.

> **[Modern monitoring & analytics | Datadog](https://www.datadoghq.com/blog/elasticsearch-unassigned-shards/)**
>
> See metrics from all of your apps, tools & services in one place with Datadog's cloud monitoring as a service solution. Try it for free.

After the status is green again, your Graylog will be able to rotate the index.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [September 4, 2018, 8:46am UTC](https://community.graylog.org/t/rotation-of-active-write-index/6509/5 "2018-09-04T08:46:59Z")

</div>

Closed on September 4, 2018, 8:46am UTC

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