首先查看docker启动日志

docker logs -f 容器id

  

查看报错信息

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2019-11-24T11:17:55,311][WARN ][o.e.c.l.LogConfigurator ] [unknown] Some logging configurations have %marker but don't have %node_name. We will automatically add %node_name to the pattern to ease the migration for users who customize log4j2.properties but will stop this behavior in 7.0. You should manually replace `%node_name` with `[%node_name]%marker ` in these locations:
/usr/share/elasticsearch/config/log4j2.properties
[2019-11-24T11:18:02,295][INFO ][o.e.e.NodeEnvironment ] [l6-XUOr] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [11gb], net total_space [37.6gb], types [rootfs]
[2019-11-24T11:18:02,296][INFO ][o.e.e.NodeEnvironment ] [l6-XUOr] heap size [247.6mb], compressed ordinary object pointers [true]
[2019-11-24T11:18:02,319][INFO ][o.e.n.Node ] [l6-XUOr] node name derived from node ID [l6-XUOrfQuSDM1xQLV4irA]; set [node.name] to override
[2019-11-24T11:18:02,319][INFO ][o.e.n.Node ] [l6-XUOr] version[6.5.0], pid[1], build[default/tar/816e6f6/2018-11-09T18:58:36.352602Z], OS[Linux/3.10.0-1062.4.1.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.1/11.0.1+13]
[2019-11-24T11:18:02,319][INFO ][o.e.n.Node ] [l6-XUOr] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.IPIWmr7p, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Des.cgroups.hierarchy.override=/, -Xms256m, -Xmx256m, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=tar]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [aggs-matrix-stats]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [analysis-common]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [ingest-common]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [lang-expression]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [lang-mustache]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [lang-painless]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [mapper-extras]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [parent-join]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [percolator]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [rank-eval]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [reindex]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [repository-url]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [transport-netty4]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [tribe]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-ccr]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-core]
[2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-deprecation]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-graph]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-logstash]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-ml]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-monitoring]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-rollup]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-security]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-sql]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-upgrade]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-watcher]
[2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded plugin [ingest-geoip]
[2019-11-24T11:18:12,065][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded plugin [ingest-user-agent]
[2019-11-24T11:18:32,588][INFO ][o.e.x.s.a.s.FileRolesStore] [l6-XUOr] parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml]
[2019-11-24T11:18:34,749][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [l6-XUOr] [controller/62] [Main.cc@109] controller (64 bit): Version 6.5.0 (Build 71882a589e5556) Copyright (c) 2018 Elasticsearch BV
[2019-11-24T11:18:37,168][INFO ][o.e.d.DiscoveryModule ] [l6-XUOr] using discovery type [zen] and host providers [settings]
[2019-11-24T11:18:40,908][INFO ][o.e.n.Node ] [l6-XUOr] initialized
[2019-11-24T11:18:40,908][INFO ][o.e.n.Node ] [l6-XUOr] starting ...
[2019-11-24T11:18:41,448][INFO ][o.e.t.TransportService ] [l6-XUOr] publish_address {172.17.0.2:9300}, bound_addresses {[::]:9300}
[2019-11-24T11:18:41,488][INFO ][o.e.b.BootstrapChecks ] [l6-XUOr] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2019-11-24T11:18:41,538][INFO ][o.e.n.Node ] [l6-XUOr] stopping ...
[2019-11-24T11:18:41,608][INFO ][o.e.n.Node ] [l6-XUOr] stopped
[2019-11-24T11:18:41,608][INFO ][o.e.n.Node ] [l6-XUOr] closing ...
[2019-11-24T11:18:41,619][INFO ][o.e.n.Node ] [l6-XUOr] closed
[2019-11-24T11:18:41,621][INFO ][o.e.x.m.j.p.NativeController] [l6-XUOr] Native controller process has stopped - no new native processes can be started
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2019-11-24T11:22:59,885][WARN ][o.e.c.l.LogConfigurator ] [unknown] Some logging configurations have %marker but don't have %node_name. We will automatically add %node_name to the pattern to ease the migration for users who customize log4j2.properties but will stop this behavior in 7.0. You should manually replace `%node_name` with `[%node_name]%marker ` in these locations:
/usr/share/elasticsearch/config/log4j2.properties

  

修改配置文件

vim /etc/sysctl.conf

  

添加下面配置:

vm.max_map_count=655360

  

然后重新启动容器

docker start my_es(my_es为容器名称)

  

Centos7使用Docker启动elasticsearch服务秒退的更多相关文章

  1. 【运维技术】VM虚拟机上使用centos7安装docker启动gogs服务教程【含B站视频教程】

    VM虚拟机上使用centos7安装docker启动gogs服务视频教程 BiliBili视频教程链接飞机票,点我 使用VMware Workstation安装Centos7 MinMal系统 第一步: ...

  2. 使用Docker创建Elasticsearch服务

    一.Docker是什么? Docker是一个开源工具,能将一个WEB应用封装在一个轻量级,便携且独立的容器里,然后可以运行在几乎任何服务环境下.Docker的容器能使应用跑在任何服务器上并且表现一致. ...

  3. Linux下,非Docker启动Elasticsearch 6.3.0,安装ik分词器插件,以及使用Kibana测试Elasticsearch,

    Linux下,非Docker启动Elasticsearch 6.3.0 查看java版本,需要1.8版本 java -version yum -y install java 创建用户,因为elasti ...

  4. Error response from daemon ... no space left on device docker启动容器服务报错

    docker 启动容器服务的时候,报错no space left on device 1. 检查磁盘是否用光 3.检查inode是否耗光,从截图看到是inode耗光导致出现问题: 进入到/run里面看 ...

  5. 安装和启动ElasticSearch服务遇到的几个问题

    首先安装和启动服务的教程是参考文章:ES入门之一 安装ElasticSearch 然后在最后的启动es服务时遇到了几个小问题,因此在这里记录一下. 因为我对linux并不是很熟悉,因此文中如果有说错的 ...

  6. Linux使用Docker启动Elasticsearch并配合Kibana使用,安装ik分词器

    注意事项 这里我的Linux虚拟机的IP地址是192.168.1.3 Docker运行Elasticsearch容器之后不会立即有反应,要等一会,等待容器内部启动Elasticsearch,才可以访问 ...

  7. linux centos7使用docker安装elasticsearch,并且用Django连接使用

    一:elasticsearch安装及配置 1:需求分析 当用户在搜索框输入关键字后,我们要为用户提供相关的搜索结果.这种需求依赖数据库的模糊查询like关键字可以实现,但是like关键字的效率极低,而 ...

  8. centos7下docker启动失败解决

    docker启动失败解决 could not change group /var/run/docker.sock to docker: gr... not found 如果出现:Job for doc ...

  9. Centos7查询开机启动项服务

    问题描述: 最近安装了zabbix设置了一些开机启动服务 例如:zabbix-server.service,httpd.service,mariadb.service,或者系统的firework.se ...

随机推荐

  1. Topcoder 15405 - PrettyLiar(可删除背包+前缀和优化 dp)

    题面传送门 题意: 给出两个长度为 \(n\) 的数组 \(a,b\) 和一个整数 \(s\). 你可以任意重排数组 \(a,b\),总共 \((n!)^2\) 种方案. 现在又两个人 A,B 来玩游 ...

  2. Educational Codeforces Round 89 题解

    昨晚简单 vp 了场比赛找了找状态,切了 5 个题(有一个差点调出来),rk57,还算理想吧,毕竟我已经好久没碰过电脑了( A 签到题不多说,直接输出 \(\min\{a,b,\dfrac{a+b}{ ...

  3. C++ and OO Num. Comp. Sci. Eng. - Part 1.

    本文参考自 <C++ and Object-Oriented Numeric Computing for Scientists and Engineers>. 序言 书中主要讨论的问题是面 ...

  4. nginx_update

    软件下载 预编译 编译 配置 [root@MiWiFi-R1CM-srv ~]#wget -c https://nginx.org/download/nginx-1.15.0.tar.gz 通过-V查 ...

  5. 详解工作流框架Activiti的服务架构和组件

    摘要:通过这篇文章,可以对工作流有一个基本的认识,为后续工作流框架Activiti的学习打下坚实的基础. 本文分享自华为云社区<BPMN工作流的基本概念!详解工作流框架Activiti的服务架构 ...

  6. 用原生CSS编写动态字体

    HTML部分: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <t ...

  7. 巩固javaweb的第二十天

    巩固内容: 同一个页面中的多个 form 在同一个页面中可以有多个 form 如果存在多个 form,那么提交信息的时候提交哪些信息,提交给哪个文件处理,这都 与提交按钮的位置有关.如果提交按钮在第一 ...

  8. Shell 管道指令pipe

    目录 管道命令pipe 选取命令 cut.grep cut 取出需要的信息 grep 取出需要行.过滤不需要的行 排序命令 sort.wc.uniq sort 排序 假设三位数,按十位数从小到大,个位 ...

  9. LeetCode移除元素

    LeetCode 移除元素 题目描述 给你一个数组 nums 和一个值 val,你需要原地移除所有数值等于 val 的元素,并返回移除后数组的新长度. 不需要使用额外的数组空间,你必须仅使用 O(1) ...

  10. accommodate, accompany

    accommodate 词源: to make fit, suitable; 近/反义词: adapt, adjust, lodge; disoblige, incommode, misfit Lod ...