问答详情
源自:2-1 Elasticsearch安装与演示

执行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-06-09T14:48:07,132][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]

在执行bin/elasticsearch时碰到的问题,希望能够帮助解决下,谢谢

提问者:qq_良好_0 2018-06-09 14:53

个回答

  • rockybean
    2018-06-11 10:30:34
    已采纳

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

    不能以 root 来运行 es,新建一个 elasticsearch 的用户来运行


  • rockybean
    2018-06-09 21:27:41

    就这些报错吗?没看出有价值的信息,你贴一下更详细的信息

  • qq_南城以北_2
    2018-09-03 16:43:45

      楼主解决了吗


  • qq_良好_0
    2018-06-12 10:25:01

    [root@localhost elasticsearch]# sudo  -u  elasticsearch  ./bin/elasticsearch
    Exception in thread "main" java.nio.file.AccessDeniedException: /usr/local/elasticsearch-6.2.4/config/jvm.options
     at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
     at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
     at java.nio.file.Files.newByteChannel(Files.java:361)
     at java.nio.file.Files.newByteChannel(Files.java:407)
     at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
     at java.nio.file.Files.newInputStream(Files.java:152)
     at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:58)

    大神帮我看看这个,遇到了新的难题。

  • 当下的时光
    2018-06-11 23:12:02

    https://img3.mukewang.com/5b1e91320001ed4f14240290.jpg我也是的


  • qq_良好_0
    2018-06-11 09:58:50

    [root@localhost elasticsearch-6.2.4]# ./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-06-11T09:56:25,893][WARN ][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:125) ~[elasticsearch-6.2.4.jar:6.2.4]
     at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.4.jar:6.2.4]
     at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.2.4.jar:6.2.4]
     at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
     at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
     at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.4.jar:6.2.4]
     at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.4.jar:6.2.4]
    Caused by: java.lang.RuntimeException: can not run elasticsearch as root
     at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:105) ~[elasticsearch-6.2.4.jar:6.2.4]
     at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:172) ~[elasticsearch-6.2.4.jar:6.2.4]
     at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.4.jar:6.2.4]
     at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.4.jar:6.2.4]
     ... 6 more

    这是我执行./bin/elasticsearch  后输出的结果,没出现你所说的startd。