question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stuck in state "Pending"

See original GitHub issue

Hello,

I have just created a docker swarm from scratch, and I am not able to run the visualizer, since its stuck in pending.

$ docker service ls && docker service ps viz
ID                  NAME                MODE                REPLICAS            IMAGE                             PORTS
ylpdkfqjv0o8        viz                 replicated          0/1                 dockersamples/visualizer:latest   *:9090->8080/tcp
ID                  NAME                IMAGE                             NODE                DESIRED STATE       CURRENT STATE           ERROR               PORTS
j7z2l72rlf46        viz.1               dockersamples/visualizer:latest                       Running             Pending 4 minutes ago                       

Docker version:

$ docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64
 Experimental: false

apt-cache policy docker-engine
docker-engine:
  Installed: 17.05.0~ce-0~ubuntu-xenial
  Candidate: 17.05.0~ce-0~ubuntu-xenial

Same setup on 17.03 works, so I suspect the 17.05 is not supported yet?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
BretFishercommented, Dec 29, 2017

Yea the problem is the newer node-based healthcheck @ManoMarks I’ve had the same issue when it’s a service, the service eventually fails. The HC always exits 1 so it won’t cause issues in docker run, but you’ll see it marked unhealthy eventually. As a service, it will recreate itself after 30s or so, which may not be noticed until someone looks at docker events or service ps history.

I’ll dig in this weekend and see how to fix healthcheck.

service create --name=viz --publish=8080:8080/tcp --constraint=node.role==manager \
--mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock dockersamples/visualizer
docker service ps viz
ID                  NAME                IMAGE                             NODE                    DESIRED STATE       CURRENT STATE                 ERROR               PORTS
ooyk54naneyj        viz.1               dockersamples/visualizer:latest   linuxkit-025000000001   Running             Starting 8 seconds ago
nglubswi5cf5         \_ viz.1           dockersamples/visualizer:latest   linuxkit-025000000001   Shutdown            Complete 13 seconds ago
301a9jeiutcy         \_ viz.1           dockersamples/visualizer:latest   linuxkit-025000000001   Shutdown            Complete about a minute ago
kf577tbbc7wc         \_ viz.1           dockersamples/visualizer:latest   linuxkit-025000000001   Shutdown            Complete 3 minutes ago
lnxkrv8i8sza         \_ viz.1           dockersamples/visualizer:latest   linuxkit-025000000001   Shutdown            Complete 31 minutes ago
docker events
2017-12-29T15:59:23.306820374-05:00 container exec_create: /bin/sh -c node healthcheck.js || exit 1 942ee4deecc85f26d2183ea462d88fd221bf363b181cb34801910653d8e0617c (com.docker.swarm.node.id=jpbc36i0269bw5pi9bcfd5eha, com.docker.swarm.service.id=q4b55ufsaz0sxye0yhx4m9ntw, com.docker.swarm.service.name=viz, com.docker.swarm.task=, com.docker.swarm.task.id=ik21gw5zfvm6kg3znc5s3vyxl, com.docker.swarm.task.name=viz.1.ik21gw5zfvm6kg3znc5s3vyxl, image=dockersamples/visualizer:latest@sha256:868b83d5fb2aff628f6dfaeb081b0e0124cdaf06354bf252d92d878b75193f7e, name=viz.1.ik21gw5zfvm6kg3znc5s3vyxl)
2017-12-29T15:59:23.307154557-05:00 container exec_start: /bin/sh -c node healthcheck.js || exit 1 942ee4deecc85f26d2183ea462d88fd221bf363b181cb34801910653d8e0617c (com.docker.swarm.node.id=jpbc36i0269bw5pi9bcfd5eha, com.docker.swarm.service.id=q4b55ufsaz0sxye0yhx4m9ntw, com.docker.swarm.service.name=viz, com.docker.swarm.task=, com.docker.swarm.task.id=ik21gw5zfvm6kg3znc5s3vyxl, com.docker.swarm.task.name=viz.1.ik21gw5zfvm6kg3znc5s3vyxl, image=dockersamples/visualizer:latest@sha256:868b83d5fb2aff628f6dfaeb081b0e0124cdaf06354bf252d92d878b75193f7e, name=viz.1.ik21gw5zfvm6kg3znc5s3vyxl)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Amazon ECS tasks stuck in the PENDING state
Some common scenarios that can cause your ECS task to be stuck in the PENDING state include the following: The Docker daemon is...
Read more >
Troubleshooting Kubernetes Pods: Stuck in a "Pending" State
If your pods are stuck in pending state, you may need to do some quick troubleshooting. Here are the steps to follow to...
Read more >
Pod Stuck in Pending State – Runbooks - GitHub Pages
Detailed Steps · 1) Gather information · 2) Examine pod Events output. · 3) Check the kubelet logs · 4) Is this a...
Read more >
Pipeline stuck in "pending" state · Issue #6615 - GitHub
We have a pipeline which has a full pipeline in pending state. Steps to reproduce. Hardly possible to deterministically reproduce unfortunately.
Read more >
Process stuck in pending state | Blue Prism Product
I have a process scheduled to run every 5 mins, however, every once in a while it gets stuck in the pending state...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found