Errors with ES after restarting Docker container


(Bob04) #1

Hi, I ran Elasticsearch in Docker container and I mounted a local directory to the container's directory /usr/share/elasticsearch/data/.

docker run -d --name elasticsearch -p 9200:9200 -v /opt/elasticsearch/data/:/usr/share/elasticsearch/data/ docker.elastic.co/elasticsearch/elasticsearch:5.3.0

I also changed owner of local directory to 1000 and permissions to 777.
Everything works good after running container first time but I get errors after restarting the container.

Any ideas how to fix that?

[2017-05-22T19:22:16,366][INFO ][o.e.n.Node               ] [hY2F_6j] starting ...
[2017-05-22T19:22:21,061][WARN ][i.n.u.i.MacAddressUtil   ] Failed to find a usable hardware address from the network interfaces; using random bytes: 7f:ba:15:94:6b:63:03:62
[2017-05-22T19:22:23,616][WARN ][o.e.m.j.JvmGcMonitorService] [hY2F_6j] [gc][young][4][9] duration [1.7s], collections [1]/[1.8s], total [1.7s]/[13.1s], memory [99.7mb]->[33.2mb]/[6.9gb], all_pools {[young] [66.5mb]->[222.2kb]/[66.5mb]}{[survivor] [8.3mb]->[5.9mb]/[8.3mb]}{[old] [24.8mb]->[27.2mb]/[6.9gb]}
[2017-05-22T19:22:23,683][WARN ][o.e.m.j.JvmGcMonitorService] [hY2F_6j] [gc][4] overhead, spent [1.7s] collecting in the last [1.8s]
[2017-05-22T19:22:24,977][INFO ][o.e.t.TransportService   ] [hY2F_6j] publish_address {...:9300}, bound_addresses {[::]:9300}
[2017-05-22T19:22:24,995][INFO ][o.e.b.BootstrapChecks    ] [hY2F_6j] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2017-05-22T19:22:29,001][INFO ][o.e.c.s.ClusterService   ] [hY2F_6j] new_master {hY2F_6j}{hY2F_6j5SvCEfy_mDR-vhg}{DuSL4nXDSDahirjtzmn9IA}{...}{...:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)

[2017-05-22T19:22:36,575][ERROR][o.e.x.m.c.i.IndexStatsCollector] [hY2F_6j] collector [index-stats-collector] failed to collect data
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];
        at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(ClusterBlocks.java:165) ~[elasticsearch-5.3.0.jar:5.3.0]
        at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.checkGlobalBlock(TransportIndicesStatsAction.java:70) ~[elasticsearch-5.3.0.jar:5.3.0]
        at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.checkGlobalBlock(TransportIndicesStatsAction.java:47) ~[elasticsearch-5.3.0.jar:5.3.0]

[2017-05-22T19:22:37,798][ERROR][o.e.x.m.c.i.IndexRecoveryCollector] [hY2F_6j] collector [index-recovery-collector] failed to collect data
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];
        at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(ClusterBlocks.java:165) ~[elasticsearch-5.3.0.jar:5.3.0]
        at org.elasticsearch.action.admin.indices.recovery.TransportRecoveryAction.checkGlobalBlock(TransportRecoveryAction.java:114) ~[elasticsearch-5.3.0.jar:5.3.0]
        at org.elasticsearch.action.admin.indices.recovery.TransportRecoveryAction.checkGlobalBlock(TransportRecoveryAction.java:52) ~[elasticsearch-5.3.0.jar:5.3.0]

[2017-05-22T19:25:49,033][WARN ][o.e.x.m.MonitoringService] [hY2F_6j] monitoring execution failed
org.elasticsearch.xpack.monitoring.exporter.ExportException: Exception when closing export bulk
        at org.elasticsearch.xpack.monitoring.exporter.ExportBulk$1$1.<init>(ExportBulk.java:106) ~[?:?]
        at org.elasticsearch.xpack.monitoring.exporter.ExportBulk$1.onFailure(ExportBulk.java:104) ~[?:?]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_92-internal]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92-internal]
Caused by: org.elasticsearch.xpack.monitoring.exporter.ExportException: failed to flush export bulks
        at org.elasticsearch.xpack.monitoring.exporter.ExportBulk$Compound.lambda$null$0(ExportBulk.java:167) ~[?:?]
        ... 25 more
Caused by: org.elasticsearch.xpack.monitoring.exporter.ExportException: bulk [default_local] reports failures when exporting documents
        at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.throwExportException(LocalBulk.java:124) ~[?:?]
    ... 23 more

(Bob04) #2

That also happened when I didn't mount local directory to the container's directory
/usr/share/elasticsearch/data/
Any suggestions how to fix that issue?


(system) #3

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