Graylog works fine (index incoming message, search, etc…) just after start, but after ~9-16 hours it stops to receive new messages and starts to log error KafkaJournal - Cannot write /usr/share/graylog/data/journal/graylog2-committed-read-offset to disk.
every second.
I do not think that this is the permission issue. Graylog receives and parse about 100 Gb of data in day, 1k-2k messages/second. There are no errors on System/Overview page (Elastic cluster is green, no failed indexing attempts, no errors in System messages).
2018-12-19 04:16:42,906 INFO : org.apache.directory.api.ldap.codec.standalone.CodecFactoryUtil - Registered pre-bundled extended operation factory: 1.3.6.1.4.1.1466.20037
2018-12-19 04:17:59,513 ERROR: org.graylog2.shared.journal.KafkaJournal - Cannot write /usr/share/graylog/data/journal/graylog2-committed-read-offset to disk.
java.io.FileNotFoundException: /usr/share/graylog/data/journal/graylog2-committed-read-offset (Permission denied)
at java.io.FileOutputStream.open0(Native Method) ~[?:1.8.0_181]
at java.io.FileOutputStream.open(FileOutputStream.java:270) ~[?:1.8.0_181]
at java.io.FileOutputStream.<init>(FileOutputStream.java:213) ~[?:1.8.0_181]
at java.io.FileOutputStream.<init>(FileOutputStream.java:162) ~[?:1.8.0_181]
at org.graylog2.shared.journal.KafkaJournal$OffsetFileFlusher.run(KafkaJournal.java:763) [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-12-19 04:18:00,501 ERROR: org.graylog2.shared.journal.KafkaJournal - Cannot write /usr/share/graylog/data/journal/graylog2-committed-read-offset to disk.
java.io.FileNotFoundException: /usr/share/graylog/data/journal/graylog2-committed-read-offset (Permission denied)
at java.io.FileOutputStream.open0(Native Method) ~[?:1.8.0_181]
at java.io.FileOutputStream.open(FileOutputStream.java:270) ~[?:1.8.0_181]
at java.io.FileOutputStream.<init>(FileOutputStream.java:213) ~[?:1.8.0_181]
at java.io.FileOutputStream.<init>(FileOutputStream.java:162) ~[?:1.8.0_181]
at org.graylog2.shared.journal.KafkaJournal$OffsetFileFlusher.run(KafkaJournal.java:763) [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]
docker-compose.yml
version: '3.7'
networks:
graylog:
services:
graylog-mongodb:
image: mongo:3
container_name: graylog-mongodb
networks:
- graylog
volumes:
- mongo_data:/data/db
graylog-elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.3
container_name: graylog-elasticsearch
networks:
- graylog
volumes:
- es_data_graylog:/usr/share/elasticsearch/data
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- xpack.security.enabled=false
- xpack.watcher.enabled=false
- xpack.monitoring.enabled=false
- xpack.security.audit.enabled=false
- xpack.ml.enabled=false
- xpack.graph.enabled=false
- "ES_JAVA_OPTS=-Xms26g -Xmx26g"
ulimits:
memlock:
soft: -1
hard: -1
graylog:
image: graylog/graylog:2.5
container_name: graylog
volumes:
- graylog_journal:/usr/share/graylog/data/journal
- ./graylog/config:/usr/share/graylog/data/config
networks:
- graylog
depends_on:
- graylog-mongodb
- graylog-elasticsearch
ports:
- 514:514
- 514:514/udp
- 20101:20101/udp
- 20103:20103/udp
- 20151:20151/udp
volumes:
mongo_data:
driver: local
driver_opts:
type: none
o: bind
device: /mnt/sas/data/graylog/mongo
es_data_graylog:
driver: local
driver_opts:
type: none
o: bind
device: /mnt/sas/data/graylog/elastic
graylog_journal:
driver: local
driver_opts:
type: none
o: bind
device: /mnt/sas/data/graylog/graylog_journal