Comments (10)
If I start the consul container mounting -v /var/run/docker.sock:/var/run/docker.sock
, it dies immediately. The logs only say this:
$ docker logs -f consul
Consul v0.5.0
Consul Protocol: 2 (Understands back to: 1)
from docker-consul.
You should not be calling Docker in your health script. It's already running in that container, no need to start a new one from inside it.
The second issue seems unrelated, but if you learn more let me know.
from docker-consul.
so, learning points for me -- the IP I PUT
to is the consul agent that executes the check. So, it makes sense that my check should actually be something like this:
curl -XPUT -d '{"Name": "test", "Check": { "script": "check-http e1d219c59ded 2368 / -L", "interval": "10s" }}' http://127.0.0.1:8500/v1/agent/service/register -v
But even with this, it means I needed to start my local consul container with -v /var/run/docker.sock:/var/run/docker.sock
, which makes the container die immediately with the output I mentioned previously. So if I execute the PUT
I mentioned here, it still results with the error message:
time="2015-03-29T04:02:14Z" level="fatal" msg="Post http:///var/run/docker.sock/v1.17/containers/create: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?"
from docker-consul.
Ok, so, I finally got docker.sock
mounted, but when I do:
curl -XPUT -d '{"Name": "test", "Check": { "script": "check-http e1d219c59ded 2368 / -L", "interval": "10s" }}' http://127.0.0.1:8500/v1/agent/service/register -v
it adds the check in consul, but I don't see it listed under checks in consul, only under services.
from docker-consul.
I had to deregister first before re-registering the service. Is there another recommended way to add a service health check other than the HTTP API?
from docker-consul.
strange, I'm getting passes and fails from running check-http. Here's an example of a fail:
HTTP/1.1 301 Moved Permanently
X-Powered-By: Express
Location: https://www.beaneighbor.org/
Vary: Accept, Accept-Encoding
Content-Type: text/plain; charset=utf-8
Content-Length: 62
Date: Tue, 31 Mar 2015 04:11:06 GMT
Connection: keep-alive
HTTP/1.1 200 OK
Server: nginx/1.7.10
Date: Tue, 31 Mar 2015 04:11:06 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 3614
Connection: keep-alive
X-Powered-By: Express
Cache-Control: public, max-age=0
ETag: W/"eNI8enDoQrRPnnvUdAtWbw=="
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
time="2015-03-31T04:11:06Z" level="fatal" msg="Error response from daemon: Cannot destroy container 10c6a50d8c042eff041404025a3560c53f881366d5426a9dc84a05a036036004: Driver aufs failed to remove root filesystem 10c6a50d8c042eff041404025a3560c53f881366d5426a9dc84a05a036036004: rename /var/lib/docker/aufs/mnt/10c6a50d8c042eff041404025a3560c53f881366d5426a9dc84a05a036036004 /var/lib/docker/aufs/mnt/10c6a50d8c042eff041404025a3560c53f881366d5426a9dc84a05a036036004-removing: device or resource busy"
When it passes, it leaves off that last section. Any thoughts?
from docker-consul.
That is an error from Docker not the check.
On Mon, Mar 30, 2015 at 11:13 PM, John Jelinek IV [email protected]
wrote:
strange, I'm getting passes and fails from running check-http. Here's an
example of a fail:HTTP/1.1 301 Moved Permanently
X-Powered-By: Express
Location: https://www.beaneighbor.org/
Vary: Accept, Accept-Encoding
Content-Type: text/plain; charset=utf-8
Content-Length: 62
Date: Tue, 31 Mar 2015 04:11:06 GMT
Connection: keep-aliveHTTP/1.1 200 OK
Server: nginx/1.7.10
Date: Tue, 31 Mar 2015 04:11:06 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 3614
Connection: keep-alive
X-Powered-By: Express
Cache-Control: public, max-age=0
ETag: W/"eNI8enDoQrRPnnvUdAtWbw=="
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000time="2015-03-31T04:11:06Z" level="fatal" msg="Error response from daemon: Cannot destroy container 10c6a50d8c042eff041404025a3560c53f881366d5426a9dc84a05a036036004: Driver aufs failed to remove root filesystem 10c6a50d8c042eff041404025a3560c53f881366d5426a9dc84a05a036036004: rename /var/lib/docker/aufs/mnt/10c6a50d8c042eff041404025a3560c53f881366d5426a9dc84a05a036036004 /var/lib/docker/aufs/mnt/10c6a50d8c042eff041404025a3560c53f881366d5426a9dc84a05a036036004-removing: device or resource busy"
When it passes, it leaves off that last section. Any thoughts?
—
Reply to this email directly or view it on GitHub
#64 (comment)
.
Jeff Lindsay
http://progrium.com
from docker-consul.
I wonder why an error message from docker would display at the end of the http check.
from docker-consul.
Because it uses Docker: https://github.com/progrium/docker-consul/blob/master/check-http#L20
from docker-consul.
😆 got it. So the container failed to delete, I guess.
from docker-consul.
Related Issues (20)
- error: No cluster leader when reboot HOT 4
- Build 0.6.3 - server HOT 4
- Consul container immediately shuts down HOT 5
- Failed to heartbeat after deliberately killing cluster leader
- Docker Hub failed to build consul-server and consul-agent against 0.6.4 HOT 4
- consul on swarm multi-node
- Tag for 0.6.4
- docker consul-server not exposing port HOT 3
- Docker deployment of services, can not modify the registered address of docker-consul
- Docker deployment of services, can not modify the registered address of docker-consul
- Add a DEPRECATION notice HOT 2
- Add nc to image?
- Error 500 when accesing web UI
- [ERR] agent: failed to sync remote state: No cluster leader
- I wonder if any notes on how to consul supports scalability HOT 1
- Dockerfiles not exposing ports
- How to configure the docker-consul for security ?
- CONSUL_BIND_INTERFACE not working?
- advertise flag ignored HOT 1
- Need help with "docker swarm init" and Consul HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-consul.