Git Product home page Git Product logo

Comments (16)

 avatar commented on May 24, 2024

+1

Things were working for me, and then all of a sudden, registrator gave up listening to any other events after registering consul server -- not even stopped a consul container will get registrator to log any changes.

docker events has, also, confirmed for me that events are properly firing.

This may have something to do with progrium/consul using docker v1.2.0. I'm going to try updating to v1.4.1 to see if that helps.

from registrator.

 avatar commented on May 24, 2024

Alas, as your reference above points out. This is not docker failing to emit the event, this is registrator failing to capture the event. (If I understand the problem correctly.)

from registrator.

progrium avatar progrium commented on May 24, 2024

Hmm, make sure it's connecting to Consul correctly, this sounds like it's blocked on trying to register the first service found after listening.

from registrator.

 avatar commented on May 24, 2024

One way for me to reproduce this is to start up registrator. You'll see that it registers consul -- great -- and any thing else afterward. UNTIL you start quickly starting and stopping services really quickly. And then it craps out...

from registrator.

progrium avatar progrium commented on May 24, 2024

Can you reproduce at all using docker events and if you're familiar with
Go, can you reproduce with the docker client library we're using. There
shouldn't be anything specific to registrator causing this...

On Tue, Feb 3, 2015 at 10:49 AM, Jonathan Pollack [email protected]
wrote:

One way for me to reproduce this is to start up registrator. You'll see
that it registers consul -- great -- and any thing else afterward. UNTIL
you start quickly starting and stopping services really quickly. And then
it craps out...


Reply to this email directly or view it on GitHub
https://github.com/progrium/registrator/issues/94#issuecomment-72709897.

Jeff Lindsay
http://progrium.com

from registrator.

blalor avatar blalor commented on May 24, 2024

Might be relevant: fsouza/go-dockerclient#206

from registrator.

progrium avatar progrium commented on May 24, 2024

So registrator probably just needs a new release...

On Tue, Feb 3, 2015 at 10:54 AM, Brian Lalor [email protected]
wrote:

Might be relevant: fsouza/go-dockerclient#206


Reply to this email directly or view it on GitHub
https://github.com/progrium/registrator/issues/94#issuecomment-72710734.

Jeff Lindsay
http://progrium.com

from registrator.

 avatar commented on May 24, 2024

Sadly, I am not familiar with Go, so reproduction will be a little harder; but I'm thinking @blalor might be on to something.

from registrator.

blalor avatar blalor commented on May 24, 2024

I was seeing regular hangs with Registrator before using that fix, and have seen no further ones, since. =

from registrator.

johnrengelman avatar johnrengelman commented on May 24, 2024

Any chance we could get a release with the above fix?

from registrator.

itn3rd77 avatar itn3rd77 commented on May 24, 2024

👍 for a release with this fix

from registrator.

francesco- avatar francesco- commented on May 24, 2024

+1 for a fix

from registrator.

jimmcslim avatar jimmcslim commented on May 24, 2024

You can build this quite easily yourself using CenturyLink labs 'golang-builder', read about it at http://www.centurylinklabs.com/small-docker-images-for-go-apps/

These steps worked for me...

Get the Docker image.

docker pull centurylink/golang-builder

Check out the source of registrator

cd ~/src #Making an assumption here!
git clone https://github.com/progrium/registrator.git

Edit registrator.go, append the text // import "github.com/progrium/registrator" to the first line after package main

cd src
vi registrator.go

Run golang-builder, this will compile the go source, and build a container that runs the go executable as its entry point.

docker run --rm -v $(pwd):/src -v /var/run/docker.sock:/var/run/docker.sock centurylink/golang-builder:latest

Then run the registrator image that is built locally

docker run -d -v /var/run/docker.sock:/tmp/docker.sock -h $HOST registration:latest consul://xx.xx.xx.xx:8500

The resulting image appears to be correctly responsive to container start/stop events and passes them onto consul.

I'll submit a PR for the change to registrator.go.

from registrator.

davidadale avatar davidadale commented on May 24, 2024

+1 for a fix

from registrator.

progrium avatar progrium commented on May 24, 2024

New release (and automated release system): https://github.com/gliderlabs/registrator/releases/tag/v5

Also we moved to gliderlabs/registrator ... you can still pull from progrium/registrator, but builds are no longer automated. I triggered a build there for this release.

from registrator.

davidadale avatar davidadale commented on May 24, 2024

thanks so much.... really appreciate it

from registrator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.