GithubHelp home page GithubHelp logo

Comments (1)

candlerb avatar candlerb commented on August 26, 2024

I found the problem.

When I run exporter_exporter, without specifying -web.listen-address, by default it tries to start a server on :9999. But I already had exporter_exporter running on this port, so the HTTP server fails to bind.

Hence the HTTP server immediately terminates, without printing an error but returning an err value. But when a member of an errgroup terminates with an error, all the other members of the group are cancelled. (Possibly the TLS goroutine was cancelled before it even started).

I tried using eg.Wait() but couldn't get it to work - it just hung. But converting the HTTP server to invoke Fatalf() sorts it:

root@ldex-mon2:~# ./exporter_exporter -config.file=/etc/prometheus/exporter_exporter.yml -config.dirs=/etc/prometheus/exporter_exporter.d -web.tls.listen-address ':9998' -web.tls.cert=/path/to/cert.pem -web.tls.key=/path/to/privkey.pem
FATA[0000] Failed starting HTTP server, listen tcp :9999: bind: address already in use  source="main.go:236"

I will submit a PR.

from exporter_exporter.

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.