问题:
Caused by: java.lang.RuntimeException: can not run elasticsearch as root

[root@localhost logs]# adduser es
[root@localhost logs]# passwd es
Changing password for user es.
New password:
BAD PASSWORD: The password is shorter than 7 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost soft]# chown -R es elasticsearch-6.1.1
[root@localhost soft]# chown -R es file
[root@localhost soft]# su es
[es@localhost bin]$ ./elasticsearch
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
[2018-01-10T14:30:10,728][INFO ][o.e.n.Node ] [node-1] initializing ...
[2018-01-10T14:30:10,954][INFO ][o.e.e.NodeEnvironment ] [node-1] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [41.7gb], net total_space [45gb], types [rootfs]
[2018-01-10T14:30:10,955][INFO ][o.e.e.NodeEnvironment ] [node-1] heap size [503.6mb], compressed ordinary object pointers [true]
[2018-01-10T14:30:10,956][INFO ][o.e.n.Node ] [node-1] node name [node-1], node ID [6mBr8gIiRiy3IXtZBE1p6A]
[2018-01-10T14:30:10,956][INFO ][o.e.n.Node ] [node-1] version[6.1.1], pid[29969], build[bd92e7f/2017-12-17T20:23:25.338Z], OS[Linux/3.10.0-693.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_131/25.131-b12]
[2018-01-10T14:30:10,956][INFO ][o.e.n.Node ] [node-1] JVM arguments [-Xms512m, -Xmx512m, -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, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/soft/elasticsearch-6.1.1, -Des.path.conf=/opt/soft/elasticsearch-6.1.1/config]
[2018-01-10T14:30:13,063][INFO ][o.e.p.PluginsService ] [node-1] loaded module [aggs-matrix-stats]
[2018-01-10T14:30:13,063][INFO ][o.e.p.PluginsService ] [node-1] loaded module [analysis-common]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ingest-common]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-expression]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-mustache]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-painless]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [mapper-extras]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [parent-join]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [percolator]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [reindex]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [repository-url]
[2018-01-10T14:30:13,064][INFO ][o.e.p.PluginsService ] [node-1] loaded module [transport-netty4]
[2018-01-10T14:30:13,065][INFO ][o.e.p.PluginsService ] [node-1] loaded module [tribe]
[2018-01-10T14:30:13,065][INFO ][o.e.p.PluginsService ] [node-1] no plugins loaded
[2018-01-10T14:30:16,339][INFO ][o.e.d.DiscoveryModule ] [node-1] using discovery type [zen]
[2018-01-10T14:30:17,426][INFO ][o.e.n.Node ] [node-1] initialized
[2018-01-10T14:30:17,426][INFO ][o.e.n.Node ] [node-1] starting ...
[2018-01-10T14:30:17,699][INFO ][o.e.t.TransportService ] [node-1] publish_address {192.168.20.168:9300}, bound_addresses {[::]:9300}
[2018-01-10T14:30:17,721][INFO ][o.e.b.BootstrapChecks ] [node-1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2018-01-10T14:30:17,801][INFO ][o.e.n.Node ] [node-1] stopping ...
[2018-01-10T14:30:17,871][INFO ][o.e.n.Node ] [node-1] stopped
[2018-01-10T14:30:17,871][INFO ][o.e.n.Node ] [node-1] closing ...
[2018-01-10T14:30:17,886][INFO ][o.e.n.Node ] [node-1] closed

问题:
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
解决方法:切换到root用户,进入vi /etc/security/limits.conf ,增加配置(保存后注意切回work用户的时候才能生效,sudo 修改的不能立即生效):
es soft nofile 819200
es hard nofile 819200

问题:
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2018-01-10T15:09:44,884][INFO ][o.e.n.Node ] [node-1] stopping ...
[2018-01-10T15:09:44,954][INFO ][o.e.n.Node ] [node-1] stopped
[2018-01-10T15:09:44,955][INFO ][o.e.n.Node ] [node-1] closing ...
[2018-01-10T15:09:44,970][INFO ][o.e.n.Node ] [node-1] closed
[es@localhost bin]$ cat /etc/sysctl.conf | grep vm.max_map_count
[es@localhost bin]$ echo "vm.max_map_count=262144" >>/etc/sysctl.conf
bash: /etc/sysctl.conf: Permission denied
[es@localhost bin]$ su root
Password:
[root@localhost bin]# echo "vm.max_map_count=262144" >>/etc/sysctl.conf
[root@localhost bin]# cat /etc/sysctl.conf | grep vm.max_map_count
vm.max_map_count=262144

问题:
Elasticsearch在linux下使用命令sh elasticsearch start,按键ctrl+c的时候程序就会stop掉,如何将程序在后台启动呢?
需要使用:./elasticsearch -d
这时执行的时候会出现没有权限./elasticsearch: Permission denied
需要授权执行命令:chmod +x bin/elasticsearch
再次执行./elasticsearch -d即可启动
使用ps aux|grep elasticsearch可以查看是否启动

elasticsearch6.1 安装问题的更多相关文章

  1. ElasticSearch-6.2安装head插件

    环境 Windows10企业版X64 JDK-1.8 ElasticSearch-6.2.4 node-v10.1 git客户端 步骤 安装node到K盘.如K:\nodejs. 把NODE_HOME ...

  2. centors7 elasticsearch6.3安装以及问题记录

    1.安装elasticsearch . 安装系统:centors7 1.下载安装包 官网地址:https://www.elastic.co/downloads/past-releases 2.mac文 ...

  3. Elasticsearch6.5安装&&常见问题与答案解释

    ElasticSearch是一个用Java开发的基于Lucene的搜索服务器.它可以提供一个分布式多用户能力的全文搜索引擎,基于RESTfulweb接口.现阶段它主要为Apache许可条款下的开放源码 ...

  4. windows下elasticsearch6.X安装IK分词器

    文章来源:https://www.cnblogs.com/hts-technology/category/1167823.html (一)到官网下载https://github.com/medcl/e ...

  5. elasticsearch6.6及其插件安装记录(较详细)

    借鉴网上资料并实施验证结果 elasticsearch6.6安装 安装包下载路径 https://www.elastic.co/downloads/elasticsearch 本文使用安装包 elas ...

  6. kibana和中文分词器analysis-ik的安装使用

    Centos7安装elasticSearch6 上面讲述了elasticSearch6的安装和使用教程. 下面讲一下elasticsearch6的管理工具Kibana. Kibana是一个开源的分析和 ...

  7. elk+kafka+zookeeper+filebeat安装

    ElasticSearch6.0 ElasticSearch6.0安装 #依赖jdk8 rpm -ivh elasticsearch-.rpm vim /etc/elasticsearch/elast ...

  8. elasticsearch数据库使用

    elasticsearch的一个最为显著的优点:快速全文检索.关于elasticsearch 全文检索的原理,请看:https://blog.csdn.net/wolfcode_cn/article/ ...

  9. Elasticsearch6.0及其head插件安装

    Elasticsearch6.0及其head插件安装 1.下载并解压elasticsearch 2.修改elasticsearch.yml文件 # 集群的名字 cluster.name: my-app ...

随机推荐

  1. JavaScript初学者必看“new”

    译者按: 本文简单的介绍了new, 更多的是介绍原型(prototype),值得一读. 原文: JavaScript For Beginners: the 'new' operator 译者: Fun ...

  2. thinkphp链接多个数据库时怎么调用M方法?

    老项目tp3.1.3,有N个数据库,thinkphp好久没用了,不知道怎么用M方法了,代码测验成功! 数据库名称: 2.直接上代码 $custom = M('base','branch_','shop ...

  3. python之黏包和黏包解决方案

    黏包现象主要发生在TCP连接, 基于TCP的套接字客户端往服务端上传文件,发送时文件内容是按照一段一段的字节流发送的,在接收方看来,根本不知道该文件的字节流从何处开始,在何处结束. 两种黏包现象: 1 ...

  4. JavaScript按IP地址排序

    JavaScript按IP地址列表排序,主要思路就是分割每个点号部分,然后ip1和ip2分别对不够三位数的进行补0操作,然后转换为数字类型进行一一比较. 上代码: 正序: var arr=[ {ip: ...

  5. ios开发GCD(2)-dispatch_semaphore_t信号量计数器

    思考:现在有多个线程异步执行,我们想要同时最多只能执行2个或n个,该怎么办? dispatch_semaphore_t 看代码解析: NSLog(@"开始"); dispatch_ ...

  6. springcloud 入门 11 (Hystrix Dashboard)

    hystrix: 断路器我在前面已经介绍,不了解的可以参考 :springcloud 入门 6 (断路器hystrix)  关于搭建,测试我都在这里面进行说明了,这章介绍的是  Hystrix Das ...

  7. python学习第一周(1)

    备注:一般规范代码,可以操作code-reformat code 1. #!/usr/bin/env python 脚本语言第一行 作用:文件中代码用指定可执行程序运行,在unix类的操作系统才有意义 ...

  8. Django中ORM介绍和字段及字段参数 Object Relational Mapping(ORM)

    Django中ORM介绍和字段及字段参数   Object Relational Mapping(ORM) ORM介绍 ORM概念 对象关系映射(Object Relational Mapping,简 ...

  9. ubuntu通过apt-get安装JDK8

    安装python-software-properties apt-get install python-software-properties apt-get install software-pro ...

  10. Linux查看服务器配置常用

    1. 内存: free:查看内存   total:总共内存 2. 处理器数量: cat /proc/cpuinfo | grep "processor" | wc -l 3.处理器 ...