docker userland proxy error without description - docker

I'm trying to start 3 containers (Grafana, Chronograf, and InfluxDB) on my Ubuntu server.
I always get this nothing saying error message with my InfluxDB container:
root#h2860848:/docker/pp# docker start pp_influxdb
Error response from daemon: driver failed programming external connectivity on endpoint pp_influxdb (9e09cff68d7106f06e2dbb02c73a200ed435ee243e25f0963296ef6ced3a5d54): Error starting userland proxy:
Error: failed to start containers: pp_influxdb
I use this docker-compose file:
version: "3.9"
services:
influxdb:
image: influxdb: latest
restart: always
container_name: pp_influxdb
ports:
- "4083:8083"
- "4086:8086"
- "4090:8090"
- "4003:2003"
env_file:
- 'env.influxdb'
volumes:
- /docker/pp/influxdb/data:/var/lib/influxdb
chronograf:
image: chronograf:latest
container_name: pp_chronograf
restart: always
ports:
- '8888:8888'
volumes:
- /docker/pp/chronograf/data:/var/lib/chronograf
depends_on:
- influxdb
env_file:
- 'env.chronograf'
grafana:
image: grafana/grafana:latest
restart: always
container_name: pp_grafana
ports:
- "3000:3000"
env_file:
- 'env.grafana'
volumes:
- /docker/pp/grafana/data:/var/lib/grafana
As you can see, I already tried to change the ports, but nothing changed. The other containers are running perfectly. So, what's the problem?

Related

Pass a dynamic ip of a service as environment variable in docker-compose

So I'm trying to connect two docker services in docker-compose. I read this question but it doesn't work for me. I print the env variable in my code and it's just displays 'mariadb' somewhy. It works for PMA but not for my custom app. How can I use it properly?
version: '3'
services:
mariadb:
image: mariadb
restart: always
environment:
MARIADB_ROOT_PASSWORD: password
volumes:
- mariadb-data:/var/lib/mysql
myproject:
build: .
environment:
- DBHOST=mariadb
depends_on:
- mariadb
phpmyadmin:
image: phpmyadmin
restart: always
ports:
- "8000:80"
environment:
- PMA_ARBITRARY=1
- PMA_HOST=mariadb
depends_on:
- mariadb
volumes:
mariadb-data:
Log:
SocketException: Failed host lookup: 'mariadb' (OS Error: System error, errno = -11)
I'm using this package.
The build is just a simple dart dockerfile as in dockerhub.
This is how I want to connect:
final settings = ConnectionSettings(host: 'mariadb',user: 'root',password: EnvStore.dbpass);
conn = await MySqlConnection.connect(settings);
```

docker-compose gives error: no such service

Im trying to deploy with docker compose an app; mi yml is:
version: '3.9'
services:
db:
image: mongo
restart: always
volumes:
- 'dbdata:/data/db'
container_name: database
server:
build: .
restart: always
ports:
- '2000:2000'
depends_on:
- db
container_name: api
links:
- database
frontend:
build: ./client
restart: always
ports:
- '3000:3000'
depends_on:
- server
container_name: client
links:
- api
volumes:
dbdata:
When i docker compose up -d this in my PC it works correctly, but when i do the same thing in a oracle linux 8.6 fedora; seems like is working fine until came to the lines:
Network soccer_default Created
no such service: database
And stop the process. Is something related with the machine or docker version?

Docker compose unsupported config option

I'm trying to setup a docker to run mysql Mosquitto and node red but keep getting the unsupported config option errors..
Services:
mysql:
image: mysql
container_name: mysql
restart: always
ports:
- “6603:3306”
Environment:
MYSQL_ROOT_PASSWORD: “abcd1234”
volumes:
- mysql-data
node-red:
image: nodered/node-red:latest
restart: always
container_name: nodered
environment:
-TZ=Europe/London
depends_on:
- mysql
ports:
- “1880:1880”
links:
- mysql:mysql
- mosquitto:mosquitto
volumes:
- node-red-data
mosquitto:
image: eclipse-mosquitto
hostname: mosquitto
container_name: mosquitto
restart: always
ports:
- "1883:1883"
volumes:
mysql-data:
node-red-data:
Any thoughts on why im getting these errors?
Unsupported config option for Services: 'mosquitto'
Unsupported config option for volumes: 'mysql-data'

docker-compose: zipkin cannot connect to elasticsearch

I try to setup zipkin, elasticsearch, prometheus and grafana with docker-compose.yml
When I run dockers, see in the log:
dependencies_zipkin | 19/09/30 14:37:09 ERROR NetworkClient: Node [172.28.0.2:9200] failed (java.net.ConnectException: Connection refused (Connection refused)); no other nodes left - aborting...
I'm on MacOS X with docker 2.1.0.3
the content of my docker-compose.yml is this one:
version: '3.7'
services:
storage:
image: openzipkin/zipkin-elasticsearch7
container_name: elasticsearch
ports:
- "9200:9200"
environment:
- "xpack.security.enabled=false"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- $PWD/prometheus:/etc/prometheus/
- /tmp/prometheus:/prometheus/data:rw
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- "9090:9090"
restart: unless-stopped
zipkin:
image: openzipkin/zipkin
container_name: zipkin
depends_on:
- dependencies
- storage
environment:
- "STORAGE_TYPE=elasticsearch"
- "ES_HOSTS=storage"
ports:
- "9411:9411"
restart: unless-stopped
grafana:
image: grafana/grafana
container_name: grafana
ports:
- "3000:3000"
restart: unless-stopped
dependencies:
image: openzipkin/zipkin-dependencies
container_name: dependencies_zipkin
depends_on:
- storage
environment:
- "STORAGE_TYPE=elasticsearch"
- "ES_HOSTS=storage"
When I connect to localhost:9200, I see that elasticsearch is working fine and on port 9411, zipkin is deployed but I have the error:
ERROR: cannot load service names: server error (Service Unavailable)(due to the network error
In the log, I have this information:
105 ^[[35mdependencies_zipkin |^[[0m 19/09/30 14:45:20 ERROR NetworkClient: Node [172.28.0.2:9200] failed (java.net.ConnectException: Connection refused (Connection refused)); no other nodes left - aborting...
and this one
^[[31mzipkin |^[[0m java.lang.IllegalStateException: couldn't connect any of [Endpoint{storage:80, ipAddr=172.28.0.2, weight=1000}]
Any idea?
UPDATE
by using mysql it is working fine, so the problem is at the level of elastic search.
I tried alsoo by using
"STORAGE_PORT_9200_TCP_ADDR=127.0.0.1"
but the issue still occurs.
UPDATE
As mention is the solution gave by Brian, I have to use:
ES_HOSTS=http://storage:9300
the key is on port, I was using the port 9200
The error disappear between zipkin and es but still occurs between es and zipkin-dependencies.
The problem lies in your ES_HOSTS variable, from the docs here:
ES_HOSTS: A comma separated list of elasticsearch base urls to connect to ex. http://host:9200.
Defaults to "http://localhost:9200".
So you will need: ES_HOSTS=http://storage:9200
Finally I have this file:
version: '3.7'
services:
storage:
image: openzipkin/zipkin-elasticsearch7
container_name: elasticsearch
ports:
- 9200:9200
zipkin:
image: openzipkin/zipkin
container_name: zipkin
environment:
- STORAGE_TYPE=elasticsearch
- "ES_HOSTS=elasticsearch:9300"
ports:
- 9411:9411
depends_on:
- storage
dependencies:
image: openzipkin/zipkin-dependencies
container_name: dependencies
entrypoint: crond -f
depends_on:
- storage
environment:
- STORAGE_TYPE=elasticsearch
- "ES_HOSTS=elasticsearch:9300"
- "ES_NODES_WAN_ONLY=true"
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- $PWD/prometheus:/etc/prometheus/
- /tmp/prometheus:/prometheus/data:rw
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- "9090:9090"
grafana:
image: grafana/grafana
container_name: grafana
depends_on:
- prometheus
ports:
- "3000:3000"
Main differences are the usage of
"ES_HOSTS=elasticsearch:9300"
instead of
"ES_HOSTS=storage:9300"
and in the dependencies configuration I add the entrypoint in dependencies:
entrypoint: crond -f
This one is really the key to not have the exception when I start docker-compose.
To solve this issue, I check the this project: https://github.com/openzipkin/docker-zipkin
The remaining question is: why do I need to use entrypoint: crond -f

Error : Unable to use host type networking with links

I am new to the Docker World.I have got my db and server connected. Now i want to connect my frontend with server. I an unable to use network mode with link. Without using network mode, i am unable to view my frontend site on localhost:8080.
How can i connect my front and server?
version: '2.2'
services:
front:
build: ../Devops/operations-portal
ports:
- "127.0.0.1:8080:8080"
network_mode: "host"
volumes:
- ../Devops/operations-portal
links:
- server
server:
build: ../Devops/data-mining-backend
ports:
- "5000:5000"
volumes:
- ../Devops/data-mining-backend/:/app
links:
- db
db:
image: mongo:3.6.5
ports:
- "27017:27017"
volumes:
- '../database:/data/db'
command: mongod --smallfiles --logpath=/dev/null # --quiet

Resources