I am trying to connect Grafana with InfluxDB, but it throws
InfluxDB Error: Bad Request
Both i have in docker, and I am using this tutorial where he wrote download and run
docker pull influxdb
docker run \
-d \
--name influxdb \
-p 8086:8086 \
-e INFLUXDB_DB=sensordata \
-e INFLUXDB_ADMIN_USER=root \
-e INFLUXDB_ADMIN_PASSWORD=toor \
-e INFLUXDB_HTTP_AUTH_ENABLED=true \
influxdb
and about Grafana
docker pull grafana/grafana
docker run -d --name=grafana -p 3000:3000 grafana/grafana
In Grafana setting I wrote all as were show in tutorial
url: http://10.0.1.76:8086/
database: sensordata
user: root
passwd: toor
Could please somebody help me with this ? Thank you !
In the tutorial you pointed out, is using influxdb version prior to 2.0
Try
docker pull influxdb:1.8.4-alpine
and use this image to start your influxdb container and it should work.
Thanks
Related
With influxdb2 and telegraf docker container, I want to read some value from a device by modbutcp. For that I use the telegraf modbus plugin.
When I use the telegraf run command
docker run -d --name=telegraf \
-v $(pwd)/telegraf.conf:/etc/telegraf/telegraf.conf \
-v /var/run/docker.sock:/var/run/docker.sock \
--net=influxdb-net \
--user telegraf:$(stat -c '%g' /var/run/docker.sock) \
--env INFLUX_TOKEN=EcoDMFzGnFkeCLsHiyoaTA-m3VXHl_RG7QqYt6Wt7D5Bdq6Bk9BQlmdO2S47OXaOA-wIz2dLu1aebiZCf2JmFQ==\
telegraf
Everything is ok, I get my device values in influxdb dashboard.
Now I want to use a docker-compose.yml file.
I have a problem with the following command part:
--user telegraf:$(stat -c '%g' /var/run/docker.sock)
My yml file
telegraf:
image: telegraf:latest
container_name: telegraf2
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
- /var/run/docker.sock:/var/run/docker.sock
environment:
INFLUX_TOKEN : Lweb-ZjlKzpA6VFSPqNC5CLy86ntIlvGbqMGUvIS1zrA==
user: telegraf$("stat -c '%g' /var/run/docker.sock")
When run the command docker-compose up -d I have an error
Error response from daemon: unable to find user telegraf$("stat -c '%g' /var/run/docker.sock"): no matching entries in passwd file
Can you tell where is my mistake. Why with the first method it's ok and not with the second.
I am working through the Docker tutorial from here: https://docs.docker.com/language/python/develop/
I have done the first few steps from the tutorial to create a MYSQL container:
$ docker volume create mysql
$ docker volume create mysql_config
$ docker network create mysqlnet
$ docker run --rm -d -v mysql:/var/lib/mysql \
-v mysql_config:/etc/mysql -p 3307:3306 \
### (note: I used 3307:3306 here instead of the specified 3306:3306 because port 3306 was already being used on my machine) ###
--network mysqlnet \
--name mysqldb \
-e MYSQL_ROOT_PASSWORD=p#ssw0rd1 \
mysql
I then followed the next step to check if the mysql container was running:
$ docker exec -ti mysqldb mysql -u root -p
the terminal then prompts:
Enter password:
and I am unable to enter anything. no commands seem to work. ctrl+C didn't even register. the only thing I could do was kill the terminal itself. I am very confused since I have been following the documentation very closely though I am sure it's something very dumb.
Thanks in advance!
Try:
$ docker exec -ti mysqldb bash
then:
mysql -u root -p
I think you can connect with shell first
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.
I'm trying to make MySQL instance available to other containers, I'm following this documentation mysql and this wordpress official documentation, I get this error
MySQL Connection Error: (1045) Access denied for user 'root'#'172.17.0.3' (using password: YES)
Code for MySQL instance
docker run -d --restart on-failure -v hatchery:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=Kerrigan \
-e MYSQL_DATABASE=zerglings --name spawning-pool mysql
Code for WordPress instance
docker run -d --name lair -p 8080:80 --link spawning-pool:mysql wordpress
How can I successfully link wordpress and mysql containers?
you need to pass in your database connection credentials via environment variables to wordpress:
docker run -d --name lair -p 8080:80 --link spawning-pool:mysql \
-e WORDPRESS_DB_HOST=mysql \
-e WORDPRESS_DB_NAME=zerglings \
-e WORDPRESS_DB_PASSWORD=zerglings wordpress
I have solved it by deleting everything and try starting it up again.
docker rm -v spawning-pool # -v Remove the volumes associated with the container
Remove the volume too
docker volume rm hatchery
Then I created the containers again
# create the volume
docker volume create hatchery
# MySQL instance
docker run -it -d --restart on-failure -v hatchery:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=Kerrigan \
-e MYSQL_DATABASE=zerglings --name spawning-pool mysql
# creating wordpress
docker run -d --name lair -p 8080:80 --link spawning-pool:mysql \
-e WORDPRESS_DB_HOST=mysql -e WORDPRESS_DB_NAME=zerglings
-e WORDPRESS_DB_PASSWORD=Kerrigan wordpress
I have updated my windows OS 10 from Home to Pro. I have installed windows docker toolbox on my machine.
I try to run the apache kafka in docker using following command :
docker run --rm -it \
-p 2181:2181 -p 3030:3030 -p 8081:8081 \
-p 8082:8082 -p 8083:8083 -p 9092:9092 \
-e ADV_HOST=192.168.99.100 \
landoop/fast_data_dev
But when I run the above program, it gives me following error :
Unable to find image 'landoop/fast_data_dev:latest' locally
F:...\Docker Toolbox\docker.exe: Error response from daemon: repository landoop/fast_data_dev not found: does not exist or no pull access.
See:'F:...\Docker Toolbox\docker.exe run --help.
Please let me know what is the problem over here.
The image name appears to be incorrect. I think you are looking for https://hub.docker.com/r/landoop/fast-data-dev/. The correct command should be (notice the - instead of _):
docker run --rm -it -p 2181:2181 -p 3030:3030 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 9092:9092 -e ADV_HOST=192.168.99.100 landoop/fast-data-dev