I am using a basic license of elastic stack and would like to confirm whether the basic license of elastic stack supports basic authentication like a prompt for basic username and password to be entered before accessing elastic stack on the web gui.
Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.
Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.
It would be great if you could update your post to solve this.
Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.
Or use markdown style like:
```
CODE
```
This is the icon to use if you are not using markdown format:
There's a live preview panel for exactly this reasons.
Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
I am getting this message when i try to run bin/elasticsearch
root@ip-x-x-x-x:/usr/share/elasticsearch# bin/elasticsearch
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Exception in thread "main" 2020-03-23 01:34:35,347 main ERROR No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2
SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: JsonParseException[Duplicate field 'xpack.security.enabled'
at [Source: sun.nio.ch.ChannelInputStream@23941fb4; line: 94, column: 23]];
at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1139)
at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1112)
at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:100)
at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:95)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)
Caused by: com.fasterxml.jackson.core.JsonParseException: Duplicate field 'xpack.security.enabled'
at [Source: sun.nio.ch.ChannelInputStream@23941fb4; line: 94, column: 23]
at com.fasterxml.jackson.core.json.JsonReadContext._checkDup(JsonReadContext.java:204)
at com.fasterxml.jackson.core.json.JsonReadContext.setCurrentName(JsonReadContext.java:198)
at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:372)
at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:52)
at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:675)
at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:650)
at org.elasticsearch.common.settings.Settings.access$500(Settings.java:82)
at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1135)
... 8 more
i am encountering the similar issue as https://discuss.elastic.co/t/error-java-lang-runtimeexception-can-not-run-elasticsearch-as-root/191818 and i am still getting the same error message even though my key store is not owned by root.
root@ip-x-x-x-x:/usr/share/elasticsearch# ./bin/elasticsearch
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2020-03-23T05:42:06,935][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [unknown] 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:163) ~[elasticsearch-6.8.7.jar:6.8.7]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.8.7.jar:6.8.7]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.8.7.jar:6.8.7]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.8.7.jar:6.8.7]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.8.7.jar:6.8.7]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.8.7.jar:6.8.7]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.8.7.jar:6.8.7]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) ~[elasticsearch-6.8.7.jar:6.8.7]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170) ~[elasticsearch-6.8.7.jar:6.8.7]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.8.7.jar:6.8.7]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.8.7.jar:6.8.7]
root@ip-x-x-x-x:/usr/share/elasticsearch/bin# ls -l
total 17908
-rwxr-xr-x 1 elasticsearch elasticsearch 1777 Feb 26 14:47 elasticsearch
-rwxr-xr-x 1 elasticsearch elasticsearch 491 Feb 26 14:47 elasticsearch-certgen
-rwxr-xr-x 1 elasticsearch elasticsearch 613 Feb 26 14:47 elasticsearch-certgen.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 483 Feb 26 14:47 elasticsearch-certutil
-rwxr-xr-x 1 elasticsearch elasticsearch 605 Feb 26 14:47 elasticsearch-certutil.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 984 Feb 26 14:47 elasticsearch-cli
-rwxr-xr-x 1 elasticsearch elasticsearch 433 Feb 26 14:47 elasticsearch-croneval
-rwxr-xr-x 1 elasticsearch elasticsearch 555 Feb 26 14:47 elasticsearch-croneval.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 2189 Feb 26 14:47 elasticsearch-env
-rwxr-xr-x 1 elasticsearch elasticsearch 121 Feb 26 14:47 elasticsearch-keystore
-rwxr-xr-x 1 elasticsearch elasticsearch 440 Feb 26 14:47 elasticsearch-migrate
-rwxr-xr-x 1 elasticsearch elasticsearch 562 Feb 26 14:47 elasticsearch-migrate.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 172 Feb 26 14:47 elasticsearch-plugin
-rwxr-xr-x 1 elasticsearch elasticsearch 431 Feb 26 14:47 elasticsearch-saml-metadata
-rwxr-xr-x 1 elasticsearch elasticsearch 553 Feb 26 14:47 elasticsearch-saml-metadata.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 438 Feb 26 14:47 elasticsearch-setup-passwords
-rwxr-xr-x 1 elasticsearch elasticsearch 560 Feb 26 14:47 elasticsearch-setup-passwords.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 118 Feb 26 14:47 elasticsearch-shard
-rwxr-xr-x 1 elasticsearch elasticsearch 427 Feb 26 14:47 elasticsearch-sql-cli
-rwxr-xr-x 1 elasticsearch elasticsearch 18205025 Feb 26 14:47 elasticsearch-sql-cli-6.8.7.jar
-rwxr-xr-x 1 elasticsearch elasticsearch 649 Feb 26 14:47 elasticsearch-sql-cli.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 426 Feb 26 14:47 elasticsearch-syskeygen
-rwxr-xr-x 1 elasticsearch elasticsearch 548 Feb 26 14:47 elasticsearch-syskeygen.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 124 Feb 26 14:47 elasticsearch-translog
-rwxr-xr-x 1 elasticsearch elasticsearch 426 Feb 26 14:47 elasticsearch-users
-rwxr-xr-x 1 elasticsearch elasticsearch 548 Feb 26 14:47 elasticsearch-users.bat
drwxr-xr-x 2 elasticsearch elasticsearch 4096 Mar 13 05:26 x-pack
-rwxr-xr-x 1 elasticsearch elasticsearch 306 Feb 26 14:47 x-pack-env
-rwxr-xr-x 1 elasticsearch elasticsearch 303 Feb 26 14:47 x-pack-env.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 354 Feb 26 14:47 x-pack-security-env
-rwxr-xr-x 1 elasticsearch elasticsearch 307 Feb 26 14:47 x-pack-security-env.bat
-rwxr-xr-x 1 elasticsearch elasticsearch 353 Feb 26 14:47 x-pack-watcher-env
-rwxr-xr-x 1 elasticsearch elasticsearch 306 Feb 26 14:47 x-pack-watcher-env.bat
Mentioned below are some of the steps which i have done and i am still getting the same message can not run elasticsearch as root when i try to run bin/elasticsearch
i've changed ownership of all ES from root to elasticsearch using the command below
i've edited /etc/default/elasticsearch file and did the following things
a)JAVA_HOME=your/java/home/path
b)add the following entries at the end
i) START_DAEMON=true
ii) ES_USER=elasticsearch
iii) ES_GROUP=elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.