Docker for windows: 2.0.0.3(31259)
I run a elasticsearch and kibana in docker. elasticsearch is run .But kibana can not run . It always try to connected http://elasticsearch:9200 .I set
the ELASTICSEARCH_URL kibana command. But not work
request http://localhost:5601/. Kibana server is not ready yet
docker run -d --name d-elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.1.1
docker run -d --name d-kibana -e ELASTICSEARCH_URL=http://192.168.0.73:9200 -p 5601:5601 docker.elastic.co/kibana/kibana:7.1.1
kibana docker log:
{"type":"log","#timestamp":"2019-06-05T08:21:26Z","tags":["warning","elasticsearch","data"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
In version 7, Kibana uses a different environment variable: ELASTICSEARCH_HOSTS
docker run -d --name d-kibana -e "ELASTICSEARCH_HOSTS=http://192.168.0.73:9200" -p 5601:5601 docker.elastic.co/kibana/kibana:7.1.1
Related
this is my first time using elasticsearch and I use this link but when I run this command
docker run --name es-node01 --net elastic -p 9200:9200 -p 9300:9300 -t docker.elastic.co/elasticsearch/elasticsearch:8.6.1
I got this error
ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
Try to disable swapping.
-e "bootstrap.memory_lock=true" --ulimit memlock=-1:-1
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_disable_swapping
EDIT:
To use it:
docker run --name es-node01 --net elastic -p 9200:9200 -p 9300:9300 -e "bootstrap.memory_lock=true" --ulimit memlock=-1:-1 -t docker.elastic.co/elasticsearch/elasticsearch:8.6.1
This is how I start elasticsearch with Kibana in "Docker for Windows":
docker network create --driver bridge elastic
docker run -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 --name elasticsearch -v elasticsearch-data:/usr/share/elasticsearch/data -e "discovery.type=single-node" -e ELASTIC_USER=Andreas -e ELASTIC_PASSWORD=Hirsebrei docker.elastic.co/elasticsearch/elasticsearch:8.5.2
docker run --name kib-01 -p 5601:5601 docker.elastic.co/kibana/kibana:8.5.3
This all runs fine and I can open the Kibana pagein the browser which requests an enrollment token.
I use the following from a command line to generate the enrollment token:
docker exec -it elasticsearch /bin/sh
then in the shell I do this:
cd /usr/share/elasticsearch/bin/
./elasticsearch-create-enrollment-token --scope kibana
which results in the following error message:
ERROR: [xpack.security.enrollment.enabled] must be set to `true` to create an enrollment token
Now I am lost.
Can someone please help me out and explain to me how to set [xpack.security.enrollment.enabled] to true?
I’m trying to install Sonarqube Developer Edition server but after installation, in footer page, it shows that it’s the Community Edition that is installed.
Here is my docker command:
docker run -d --name sonarqube --restart=always -p 9000:9000 -e sonar.jdbc.url=<my_jdbc_url> -e sonar.jdbc.username=<my_db_user> -e sonar.jdbc.password=<my_db_password> --network sonarqube_network --volume sonarqube:/opt/sonarqube sonarqube:9.7.1-developer
Thanks for you help !
Can you try:
docker run -d -p 9000:9000 -p 9092:9092 sonarqube:developer
Navigate to http://localhost:9000
Or you may be able pass your variables directly in by running:
docker run -d -e SONAR_TOKEN=<YOUR_TOKEN> -e SONAR_EDITION=developer -p 9000:9000 -p 9092:9092 sonarqube:developer
Maybe I missed something in my script, but otherwise I managed to solve my problem with docker compose
version: "3"
services:
sonarqube:
image: sonarqube:9.7.1-developer
environment:
SONAR_JDBC_URL: <my_jdbc_url>
SONAR_JDBC_USERNAME: <my_db_username>
SONAR_JDBC_PASSWORD: <my_db_password>
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_logs:/opt/sonarqube/logs
ports:
- "9000:9000"
volumes:
sonarqube_data:
sonarqube_extensions:
sonarqube_logs:
Just trying to learn to setup Kibana and Elastic search using native docker command (i.e. not using Docker-Compose).
Below are the commands I run
docker network create es-net
docker run -d --name es-cluster \
--net es-net -p 9200:9200 \
-e "xpack.security.enabled=false" \
-e "discovery.type=single-node" \
docker.elastic.co/elasticsearch/elasticsearch:7.2.0
docker run -d --net es-net -p 5601:5601 \
-e ELASTICSEARCH_URL=http://es-cluster:9200 \
docker.elastic.co/kibana/kibana:7.2.0
Somehow Kibana is not loading the elastic search up when I run http://localhost:5601/ and always with the message Kibana server is not ready yet
I follow the answer as per Kibana on Docker cannot connect to Elasticsearch, to ensure the ELASTICSEARCH_URL is correctly set, but it is still not coming up. Anything I miss?
note: tested with curl 0.0.0.0:9200, the elastic search is already running
Looks like since I'm in version 7.2.0 of Kibana, it has changed from ELASTICSEARCH_URL to ELASTICSEARCH_HOSTS
as per https://www.elastic.co/guide/en/kibana/current/docker.html
docker run -d --net es-net -p 5601:5601 \
-e ELASTICSEARCH_HOSTS=http://es-cluster:9200 \
docker.elastic.co/kibana/kibana:7.2.0
With this in place, all should work then.
For local development, I want to run an ElasticSearch (5.5.2) container using Docker, but I don't want to have to deal with authentication.
I have read https://www.elastic.co/guide/en/x-pack/5.5/anonymous-access.html, and it seems that the container comes with X-Pack which adds security (requiring a username and password).
Previously I have been running:
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --name es docker.elastic.co/elasticsearch/elasticsearch:5.5.
How can I allow anonymous access?
Add the environmental variable xpack.security.enabled=false to the docker run command.
Complete command:
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" --name es docker.elastic.co/elasticsearch/elasticsearch:5.5.2
Reference: https://discuss.elastic.co/t/how-do-i-disable-x-pack-security-on-the-elasticsearch-5-2-2-docker-image/78183/4