0
0
Elasticsearchquery~20 mins

Installation and setup in Elasticsearch - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Elasticsearch Installation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
Elasticsearch service status check
After installing Elasticsearch on a Linux system, you run the command systemctl status elasticsearch. What output indicates that Elasticsearch is running correctly?
AFailed to start elasticsearch.service: Unit elasticsearch.service not found.
BActive: inactive (dead) since Mon 2024-06-10 10:00:00 UTC; 5min ago
CActive: active (running) since Mon 2024-06-10 10:00:00 UTC; 5min ago
DActive: activating (start) since Mon 2024-06-10 10:00:00 UTC; 5min ago
Attempts:
2 left
💡 Hint
Look for the word 'active' and 'running' in the status output.
🧠 Conceptual
intermediate
1:00remaining
Default Elasticsearch port
What is the default port number Elasticsearch listens on for HTTP requests after installation?
A9200
B9300
C8080
D5601
Attempts:
2 left
💡 Hint
This port is used to send REST API requests to Elasticsearch.
🔧 Debug
advanced
3:00remaining
Elasticsearch JVM memory setting error
You set ES_JAVA_OPTS="-Xms2g -Xmx2g" in your environment but Elasticsearch fails to start. Which option shows a likely cause?
AThe system has only 1GB of RAM available, so Elasticsearch cannot allocate 2GB.
BThe syntax for ES_JAVA_OPTS is incorrect; it should be <code>ES_JAVA_OPTS=-Xms2g -Xmx2g</code> without quotes.
CElasticsearch requires at least 4GB of RAM to start, so 2GB is too low.
DThe environment variable ES_JAVA_OPTS is ignored; memory must be set in elasticsearch.yml.
Attempts:
2 left
💡 Hint
Check if the system has enough memory to allocate the requested heap size.
📝 Syntax
advanced
3:00remaining
Correct syntax for Elasticsearch repository installation on Debian
Which command correctly adds the Elasticsearch GPG key and repository on a Debian-based system?
Asudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch && sudo yum-config-manager --add-repo https://artifacts.elastic.co/packages/8.x/yum stable main && sudo yum update
Bcurl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - && sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" > /etc/apt/sources.list.d/elastic-8.x.list' && sudo apt update
Csudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys https://artifacts.elastic.co/GPG-KEY-elasticsearch && sudo add-apt-repository 'deb https://artifacts.elastic.co/packages/8.x/apt stable main' && sudo apt update
Dwget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - && sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" > /etc/apt/sources.list.d/elastic-8.x.list' && sudo apt update
Attempts:
2 left
💡 Hint
Debian uses apt-key and sources.list.d for repositories.
🚀 Application
expert
3:00remaining
Elasticsearch cluster initial master nodes setting
You are setting up a new Elasticsearch cluster with 3 nodes. To avoid split-brain issues, which setting must you add to elasticsearch.yml on each node before starting the cluster?
Adiscovery.seed_hosts: ["node1", "node2", "node3"]
Bcluster.initial_master_nodes: ["node1", "node2", "node3"]
Cnode.master: true
Dcluster.name: my-cluster
Attempts:
2 left
💡 Hint
This setting tells Elasticsearch which nodes can be elected as master during the first cluster formation.