docker-swarm

docker swarm create service failed when pull images from private registry

依然范特西╮ 提交于 2019-12-11 17:54:16
问题 As a docker beginner, I have built a swarm cluster on 5 Linux server. (docker version 17.12.0-ce) But when I create a service, I see docker service ps command shows "pulling image failed" error="pull access denied for registry.xxxx.xxx . I'm using a private registry which should be use docker login at first. So, how to do the login action when creating a swarm service ? 回答1: You need to pass the --with-registry-auth flag on docker service create to pass your credentials. Authenticate if you

Replicated services not updating

[亡魂溺海] 提交于 2019-12-11 17:53:13
问题 I have a service which I've configured to have 3 replicas (in a swarm of 3 nodes). When it comes time to update the service to a new version, I run this: docker stack deploy -c docker-compose.yml authentication I've also tried to force an update using: docker service update --force authentication_authentication One instance will get updated, the others will remain on the same version. The update command above hangs here forever: overall progress: 1 out of 3 tasks 1/3: running [===============

Elk on Docker Swarm and glusterFS crash

强颜欢笑 提交于 2019-12-11 16:46:21
问题 I'm trying to deploy an ELK stack on docker swarm. If I bind the elastic data directory to a Docker volume there is no problem. The problems comes as soon as I try to bind the elstastic data directory to a glusterFS volume. I use glusterFS to synchronise the data between all the swarm nodes in the cluster. I deploy ELK using the following code: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3 # container_name: elasticsearch environment: - "http.host=0.0.0.0" -

Is docker swarm a container aware load balancer?

China☆狼群 提交于 2019-12-11 16:45:39
问题 6 node docker swarm(cluster) - 3 mgrs, 3 workers After running below command: docker service create --name psight -p 8080:8080 --replicas 5 <image> We see that, mgr3 does not run the task(shown below) $ docker service ps psight1 ID NAME IMAGE NODE DESIRED_STATE CURRENT_STATE ERROR PORTS yoj psight.1 image wrk2 Running Running 19 minutes ago sjb psight.2 image wrk3 Running Running 19 minutes ago vv6 psight.3 image mgr1 Running Running 19 minutes ago scf psight.4 image mgr2 Running Running 19

`docker stack` specific log locations

醉酒当歌 提交于 2019-12-11 14:39:58
问题 Is there a way to specify logging file on a deployed docker stack with docker-compose.yml file? I've been suffering from intermittent crashes on docker services and stacks running on a docker swarm that leave no log trace behind, and I need some rotating logs that I can look at when these happen my docker info output: $ docker info Containers: 114 Running: 4 Paused: 0 Stopped: 110 Images: 95 Server Version: 17.09.0-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true

golang gRPC update image in docker swarm having to reconnect clients each time

人盡茶涼 提交于 2019-12-11 07:57:41
问题 I have a docker swarm on three nodes plus an external mysql service (outside of the swarm). I am programming micro-services with an API Gateway in golang and gRPC. I have two problems. The first problem is when I push an update a service with docker swarm update --image ... myservice I get the error on my API Gateway from each micro-service transport is closing for three requests to the gateway. (I am assuming each task needs to reconnect on each service?) How can I fix this? Each service has

Reload docker stack network configuration

回眸只為那壹抹淺笑 提交于 2019-12-11 06:56:17
问题 I have multiple docker stacks that are connected over the same network. If I restart one of the stacks the internal ip addresses of the related stack container seems to change. That results in wrong service name resolutions in other stacks and containers. It seems that the internal docker name service doesn't recognize the network change. If try to access other containers with ping from a stack container shell by the service name (for example ping my_stack_my_container_name ) I got a

Nginx retry same end point on http_502 in Docker service Discovery

大城市里の小女人 提交于 2019-12-11 06:12:53
问题 We use docker swarm with service discovery for Backend REST application. The services in swarm are configured with endpoint_mode: vip and are running in global mode. Nginx is proxy passed with service discovery aliases. When we update Backend services sometimes nginx throws 502 as service discovery may point to the updating service. In such case, We wanted to retry the same endpoint again. How can we achieve this? According to this we added upstream with the host's private IP and used proxy

docker swarm: A stack just for shared networks

独自空忆成欢 提交于 2019-12-11 04:38:06
问题 I have many docker compose files which describe multiple stacks (Application, Monitoring infra, Logging Infra, Some other application). Some of these stacks need to share a network. Since the dependencies between the stacks (X needs Y to start fist, Y needs Z) are becoming more and more complicated I wanted to introduce one stack that contains all the networks that will be shared so that I can then deploy all stacks in any order. version: "3.1" networks: iotivity: proxy: Unfortunately a

Docker swarm tries to parse the value of ENV variable in my compose file (because it has a go template in it) and gives me an error

时光怂恿深爱的人放手 提交于 2019-12-11 01:29:52
问题 The error I try to launch a logspout container and set the log format (an ENV variable) via a docker-compose file. Not too difficult, and if I launch it with docker-compose up , everything works fine. But when I try to launch it with docker swarm init and docker stack deploy -c docker-compose.yml mystack , I get an error: Error response from daemon: rpc error: code = InvalidArgument desc = expanding env failed: expanding env "RAW_FORMAT={ \"container\" : \"{{ .Container.Name }}\", \"labels\":