解決:Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.
Linux7.4 使用elasticsearch2.2.1,啟動遇到:
[root@ncx bin]# Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.
原因:
出於系統安全考慮的設定 ,不允許root賬號啟動
解決:
建立一個新使用者,用於啟動elasticsearch
實操:
1)建立新使用者es
useradd es
2)賦予es使用者elasticsearch目錄許可權
chown -R es .../elasticsearch
3)切換至使用者es
su es
4)啟動elasticsearch
相關文章
- Exception in thread “main” 終極解決方案ExceptionthreadAI
- Exception in thread “main“ java.lang.ArrayStoreException解決方案(記錄一下)ExceptionthreadAIJava
- Exception in thread "main" java.lang.NullPointerException: Cannot invokeExceptionthreadAIJavaNull
- jmeter報錯“Uncaught exception in thread Thread[AWT-EventQueue-0,6,main]“JMeterExceptionthreadAI
- Java報錯:Exception in thread "main" java.lang.UnsupportedClassVersionErrorJavaExceptionthreadAIError
- Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission deniedUseExceptionthreadAIApacheHadoop
- Appcrawler 執行報錯 Exception in thread "main" java.lang.NullPointerExceptionAPPExceptionthreadAIJavaNull
- Exception in thread “main“ java.lang.NoClassDefFoundError: org/apache/http/conn/socket/LayeredConnecExceptionthreadAIJavaErrorApacheHTTP
- PostgreSQL DBA(109) - pgAdmin(Don't do this:Don't use BETWEEN)SQL
- PostgreSQL DBA(117) - pgAdmin(Don't do this: Don't use serial)SQL
- 解決elasticsearch:Exception BindTransportException[Failed to bind to [9300-9400]]ElasticsearchExceptionAI
- PostgreSQL DBA(108) - pgAdmin(Don't do this:Don't use upper names)SQL
- PostgreSQL DBA(112) - pgAdmin(Don't do this:Don't use timestamptz(0))SQL
- PostgreSQL DBA(113) - pgAdmin(Don't do this:Don't use char(n))SQL
- myeclipse執行tomcat報錯Exception in thread "main" java.lang.OutOfMemoryError: PermGen space...EclipseTomcatExceptionthreadAIJavaError
- PostgreSQL DBA(110) - pgAdmin(Don't do this: Don't use timestamp without tz)SQL
- PostgreSQL DBA(116) - pgAdmin(Don't do this:Don't use money&serial)SQL
- PostgreSQL DBA(115) - pgAdmin(Don't do this:Don't use varchar(n) by default)SQL
- PostgreSQL DBA(111) - pgAdmin(Don't do this:Don't use CURRENT_TIME)SQL
- You don't know CSSCSS
- You don't know css(2)CSS
- PostgreSQL DBA(106) - pgAdmin(Don't do this:NOT IN)SQL
- go run main.go undefined? golang main包那點事AIUndefinedGolang
- PostgreSQL DBA(104) - pgAdmin(Don't do this:Rule)SQL
- PostgreSQL DBA(103) - pgAdmin(Don't do this:Encoding)SQLEncoding
- PostgreSQL DBA(107) - pgAdmin(Don't do this:NOT IN vs NOT EXISTS)SQL
- 網站提示:You Don’t Have Permission To Access網站
- You don't have write permissions for the /usr/bin directory.
- PostgreSQL DBA(105) - pgAdmin(Don't do this:psql&inheritance)SQL
- Exception in thread “main” com.sun.xml.internal.ws.model.RuntimeModelerException: 必須在沒有程式包的類上指定 @WebService.targetNamespace。ExceptionthreadAIXMLWebnamespace
- 2018-03-24 Why Don't Students Like School? 005
- 為啥呼叫new Thread().start()方法會呼叫run()方法?thread
- Thread中run和start方法的模板設計模式thread設計模式
- Elasticsearch 別管原理,先run起來Elasticsearch
- NPM run dev 失敗解決辦法NPMdev
- PostgreSQL DBA(140) - PG 12(Don't log incomplete startup packet if it's empty)SQL
- 解決pycharm問題:module 'pip' has no attribute 'main'PyCharmAI
- PostgreSQL DBA(114) - pgAdmin(Don't use char(n) even for fixed-length id)SQL