java.lang.RuntimeException: can not run elasticsearch as root
忘写了一个错误:
[o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.2.jar:5.6.2]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:195) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.2.jar:5.6.2]
... 6 more
这个错误,是因为使用root用户启动elasticsearch,elasticsearch是不允许使用root用户启动的,所以我们需要添加用户。
adduser *** //添加用户
passwd *** //给用户赋值
添加完用户之后:
用root用户执行 : chown -R 文件夹名 用户名
将这几个压缩包所在的文件夹及解压完的文件夹权限给你新建的用户。之后再使用新用户启动就OK了。
参考链接:http://www.cnblogs.com/xd502djj/archive/2011/11/23/2260094.html
java.lang.RuntimeException: can not run elasticsearch as root的更多相关文章
- [o.e.b.ElasticsearchUncaughtExceptionHandler] [unknown] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
这是因为不知从哪个版本后,elasticsearch为了安全性,是不能用root用户启动的. 解决的办法:当然是创建一个用户,用创建的用户启动啦,注意权限的问题,目录也应该改为创建的用户权限! 我是用 ...
- elasticsearch: can not run elasticsearch as root
进入bin目录启动elasticsearch: lunadeMacBook-Air:elasticsearch-6.1.0 luna$ cd bin/ lunadeMacBook-Air:bin lu ...
- nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoSupport': ...
- hive脚本出现Error: java.lang.RuntimeException: Error in configuring object和Caused by: java.lang.IndexOutOfBoundsException: Index: 9, Size: 9
是在reduce阶段报的错误,详细错误信息是 朱传豪 19:04:48 Diagnostic Messages for this Task: Error: java.lang.RuntimeExcep ...
- eclipse 4 rcp: java.lang.RuntimeException: No application id has been found.
错误详情: java.lang.RuntimeException: No application id has been found. at org.eclipse.equinox.internal. ...
- [JAVA][RCP]Clean project之后报错:java.lang.RuntimeException: No application id has been found.
Clean了一下Project,然后就报了如下错误 !ENTRY com.release.nattable.well_analysis 2 0 2015-11-20 17:04:44.609 !MES ...
- java.lang.RuntimeException: java.lang.ClassNotFoundException: cmd.CmdWordCount$MyMapper解决方法
14/02/28 20:29:48 INFO mapred.JobClient: Task Id : attempt_201402281833_0004_m_000000_1, Status : FA ...
- storm supervisor启动报错java.lang.RuntimeException: java.io.EOFException
storm因机器断电或其他异常导致的supervisor意外终止,再次启动时报错: 1. 2013-09-24 09:15:44,361 INFO [main] daemon.supervisor ( ...
- Android Studio 首次安装报错 Java.lang.RuntimeException:java.lang.NullPointerException...错
下次安装报:Java.lang.RuntimeException: java.lang.NullPointerException......错 只需在文件..\Android Studio\bin\i ...
随机推荐
- CentOS 系列安装 Docker
CentOS6对于 CentOS6,可以使用 EPEL 库安装 Docker,命令如下$ sudo yum install http://mirrors.yun-idc.com/epel/6/i386 ...
- what's the python之python介绍
其实这一篇文章的大部分都是啰嗦话,大部分在百度百科中都有详尽的叙述.既然决定学python了就要风雨兼程,你不用洞悉python到底是什么,你只要知道这是一门编程语言,跟Java.C++等语言一样都是 ...
- Win7各版本功能对比
- IconMoon图标字体制作
官网:https://icomoon.io/ 点击右上角“IconMoon APP” 点击左上角“import Icons”按钮 选中小图标 - 选择右下角“Generate Font”生成图标字体 ...
- python的join用法
1.使用方式: 字符串.join(序列) date = "".join(["2018-12-28", "00:00:00"])
- 常用笔记:Web前端
[HTML] <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> ...
- DL中epoch、batch等的意义【转载】
转自:深度学习中 number of training epochs 中的 epoch到底指什么? - 知乎 https://www.zhihu.com/question/43673341 1. (1 ...
- CMB面试准备-基础
1.简述 private. protected. public. internal 修饰符的访问权限 private : 在类的内部才可以访问. protected : 保护成员,该类内部和继承类中可 ...
- Java语言基础问题
1. 一个Java类文件中可以有几个公有类 在eclipse中测试代码时会出现上图所示的错误,此处只允许用final或abstract来修饰类,也就是一个类文件中只能有一个public修饰的类,此下对 ...
- ES6之箭头表达式
ES2015新增的特性箭头表达式,省去了关键词function,文中``双撇号和${}是Typescript的语法.以下是一些学习笔记: 1.单行箭头表达式: var foo = (arg1,arg2 ...