Hi, is anyone using ElasticSearch 6.1.4 + X-Pack. I have an Access Denied with Graylog 2.5.1 bootstap. It seems that graylog tried to get _all/_aliases which was dropped in elastic 6.1.
I had dumped all traffic and it looks like Graylog doesn’t perform PUT /_template/graylog-internal during bootstrapping. When I tried to perform it manually as graylog user it works so it’s not a wrong X-Pack configuration.
With xpack.security.enabled=false during graylog bootstrap (from tcpdump):
1. GET /_cluster/health/_all?local=true&timeout=60s -> 200 OK
2. GET /_cluster/health/graylog_*?timeout=60s -> 200 OK
3. GET /_cat/nodes?h=name%2Chost%2Cip%2CfileDescriptorMax&full_id=true&format=json -> 200 OK
4. PUT /_template/graylog-internal -> 200 OK
5. PUT /graylog_0 -> 200 OK
6. GET /_cluster/health/graylog_0?wait_for_status=yellow -> 200 OK
7. POST /_aliases -> 200 OK
8. GET /graylog_*/_alias?expand_wildcards=open -> 200 OK
9. POST /_bulk -> 200 OK
Than I turned on X-Pack and dump looks like:
1. GET /_cluster/health/_all?local=true&timeout=60s -> 200 OK
2. GET /_cluster/health/graylog_*?timeout=60s -> 200 OK
3. GET /graylog_deflector/_settings -> 404 Not Found
4. GET /graylog_*/_alias?expand_wildcards=open -> 404 Not Found
5. GET /_cat/nodes?h=name%2Chost%2Cip%2CfileDescriptorMax&full_id=true&format=json -> 200 OK
6. GET /_all/_alias -> 404 Not Found
7. POST /_bulk -> 200 OK
As I said It’s not permission issue, all requests I can perform manually as graylog user.
I wonder why graylog doesn’t even try to PUT /_template/graylog-internal or /graylog_0
2019-01-14T14:44:55.368+01:00 INFO [MongoIndexSet] Did not find a deflector alias. Setting one up now.
2019-01-14T14:44:55.370+01:00 ERROR [IndexRotationThread] Couldn't point deflector to a new index
org.graylog2.indexer.IndexNotFoundException: Couldn't collect aliases for index pattern graylog_*
Index not found for query: . Try recalculating your index ranges.
at org.graylog2.indexer.cluster.jest.JestUtils.buildIndexNotFoundException(JestUtils.java:118) ~[graylog.jar:?]
at org.graylog2.indexer.cluster.jest.JestUtils.specificException(JestUtils.java:84) ~[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.getIndexNamesAndAliases(Indices.java:316) ~[graylog.jar:?]
at org.graylog2.indexer.MongoIndexSet.getNewestIndexNumber(MongoIndexSet.java:151) ~[graylog.jar:?]
at org.graylog2.indexer.MongoIndexSet.getNewestIndex(MongoIndexSet.java:146) ~[graylog.jar:?]
at org.graylog2.indexer.MongoIndexSet.setUp(MongoIndexSet.java:252) ~[graylog.jar:?]
at org.graylog2.periodical.IndexRotationThread.checkAndRepair(IndexRotationThread.java:138) ~[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_191]
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_191]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_191]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_191]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Than I set the template, index and alias manually and rotate the index from the Graylog.
2019-01-14T15:29:24.141+01:00 INFO [DeflectorResource] Cycling deflector for index set <5c165a96ab04d33ff4a69aa6>. Reason: REST request.
2019-01-14T15:29:24.183+01:00 INFO [MongoIndexSet] Cycling from <graylog_0> to <graylog_1>.
2019-01-14T15:29:24.183+01:00 INFO [MongoIndexSet] Creating target index <graylog_1>.
2019-01-14T15:29:24.234+01:00 INFO [Indices] Successfully created index template graylog-internal
2019-01-14T15:29:24.441+01:00 INFO [MongoIndexSet] Waiting for allocation of index <graylog_1>.
2019-01-14T15:29:24.527+01:00 INFO [MongoIndexSet] Index <graylog_1> has been successfully allocated.
2019-01-14T15:29:24.527+01:00 INFO [MongoIndexSet] Pointing index alias <graylog_deflector> to new index <graylog_1>.
2019-01-14T15:29:24.589+01:00 INFO [SystemJobManager] Submitted SystemJob <ca640bb0-1808-11e9-96d8-0800270c2c16> [org.graylog2.indexer.indices.jobs.SetIndexReadOnlyAndCalculateRangeJob]
2019-01-14T15:29:24.589+01:00 INFO [MongoIndexSet] Successfully pointed index alias <graylog_deflector> to index <graylog_1>.
2019-01-14T15:29:54.826+01:00 INFO [SetIndexReadOnlyJob] Flushing old index <graylog_0>.
2019-01-14T15:29:55.002+01:00 INFO [SetIndexReadOnlyJob] Setting old index <graylog_0> to read-only.
2019-01-14T15:29:55.155+01:00 INFO [SystemJobManager] Submitted SystemJob <dc9c3320-1808-11e9-96d8-0800270c2c16> [org.graylog2.indexer.indices.jobs.OptimizeIndexJob]
2019-01-14T15:29:55.222+01:00 INFO [OptimizeIndexJob] Optimizing index <graylog_0>.
2019-01-14T15:29:55.255+01:00 INFO [SystemJobManager] SystemJob <dc9c3320-1808-11e9-96d8-0800270c2c16> [org.graylog2.indexer.indices.jobs.OptimizeIndexJob] finished in 99ms.
2019-01-14T15:29:55.284+01:00 INFO [CreateNewSingleIndexRangeJob] Calculating ranges for index graylog_0.
2019-01-14T15:29:55.551+01:00 INFO [MongoIndexRangeService] Calculated range of [graylog_0] in [260ms].
2019-01-14T15:29:55.626+01:00 INFO [CreateNewSingleIndexRangeJob] Created ranges for index graylog_0.
2019-01-14T15:29:55.626+01:00 INFO [SystemJobManager] SystemJob <ca640bb0-1808-11e9-96d8-0800270c2c16> [org.graylog2.indexer.indices.jobs.SetIndexReadOnlyAndCalculateRangeJob] finished in 1034ms.
That’s why I’m sure the problem lies the bootstrap