Docker Community Forums

Share and learn in the Docker community.

Error response from daemon: rpc error: code = FailedPrecondition desc = network


(Alexandre Gonçalves Monteiro da Silva) #1

HI,

When I enter the network parameter in the docker it always returns me the message:
“Error response from daemon: rpc error: code = FailedPrecondition desc = network …”

I have already changed the parameter several times, but it is always in the “network” parameter. Could it be something about the docker version?

Here’s my project:

root@tux1-VirtualBox:/opt/lab# docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
iazgeu3im7dyhpp2d1jsjagwt * tux1-VirtualBox.lab.com.br Ready Active Leader
j4db96kyoi0zwif9wwrb6klde tux2-VirtualBox Ready Active Reachable
1argods4kiod5m5v3ep76fqcx tux3-VirtualBox Ready Active

root@tux1-VirtualBox:/opt/lab# docker network ls
NETWORK ID NAME DRIVER SCOPE
ioza91zbwb5o ale overlay swarm
04e198a72dc6 bridge bridge local
d94ff6494484 docker_gwbridge bridge local
8055b4818a61 host host local
9c754aa37e7e none null local

root@tux1-VirtualBox:/opt/lab# docker service create --name wordpress-db01 --replicas 1 --network ale -p 3001:3306/tcp -e MYSQL_ROOT_PASSWORD=pAssw0rd -e MYSQL_DATABASE=wordpress --mount type=bind,src=/srv/swarm/wordpress01/db,dst=/var/lib/mysql mysql:latest

Error response from daemon: rpc error: code = FailedPrecondition desc = service needs ingress network, but no ingress network is present

Error in /var/log/syslog:

Jan 11 23:49:14 tux1-VirtualBox dockerd[1339]: time=“2018-01-11T23:49:14.632563438-02:00” level=info msg="Ignoring extra error returned from registry: unauthorized: authentication required"
Jan 11 23:49:14 tux1-VirtualBox dockerd[1339]: time=“2018-01-11T23:49:14.633860740-02:00” level=error msg=“pulling image failed” error=“pull access denied for network, repository does not exist or may require ‘docker login’” module=node/agent/taskmanager node.id=iazgeu3im7dyhpp2d1jsjagwt service.id=zqw2d0q7reoameuqk93kpcfin task.id=gopquwnk6ht0maz1gdypam1p8
Jan 11 23:49:14 tux1-VirtualBox dockerd[1339]: time=“2018-01-11T23:49:14.636972162-02:00” level=error msg=“fatal task error” error=“No such image: network:latest” module=node/agent/taskmanager node.id=iazgeu3im7dyhpp2d1jsjagwt service.id=zqw2d0q7reoameuqk93kpcfin task.id=gopquwnk6ht0maz1gdypam1p8

I already used many “docker create” to mount a wordpress with docker swarm and all without exception gave an error. So far I have not been able to create a Swarm with wordpress and Mysql or MariaDB.

Can someone please support me?

INFOS:

root@tux1-VirtualBox:/opt/lab# docker version
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:11:19 2017
OS/Arch: linux/amd64

Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:09:53 2017
OS/Arch: linux/amd64
Experimental: false