Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to receive any stats. #64

Open
danhanly opened this issue Jul 6, 2016 · 3 comments
Open

Unable to receive any stats. #64

danhanly opened this issue Jul 6, 2016 · 3 comments

Comments

@danhanly
Copy link

danhanly commented Jul 6, 2016

I'm using docker-compose to build this, here's my config:

  graphite-statsd:
    image: hopsoft/graphite-statsd
    ports:
      - "5000:80"
      - "2003-2004:2003-2004"
      - "2023-2024:2023-2024"
      - "8125:8125/udp"
      - "8126:8126"

I'm able to access the graphite interface at http://localhost:5000 however, using the test command in the readme, I'm unable to send any stats to graphite.

If I run (echo "counters" | nc localhost 8126) > counters then I see my stats. The issue is that I'm unable to see any of this from within Graphite.

Is there a step I'm not seeing in the Readme to getting this up and running?

If I purposefully misconfigure the port, I get connection refused every millisecond, so I know the

@Kosta-Github
Copy link

I have the same issue, but for me even the counters command does not show the counter getting through:

$ echo counters | nc localhost 8126
{ 'statsd.bad_lines_seen': 0, 'statsd.packets_received': 0 }
END

started with:

$ docker run -d --name graphite --restart=always \
    -p 8080:80 -p 2003-2004:2003-2004 \
    -p 2023-2024:2023-2024 -p 8125:8125/udp -p 8126:8126 \
    hopsoft/graphite-statsd

The graphite dashboard page is accessible, just the example counters are not coming through...

$ while true; do echo -n "example:$((RANDOM % 100))|c" | nc -w 1 -u localhost 8125; done

I already verified with:

$ ngrep -d any -W byline port 8125

that the UDP packages are being generated...

Any tips appreciated...

@tejom
Copy link
Contributor

tejom commented Jan 13, 2017

For some reason 'localhost' didn't work, replacing it with 127.0.0.1 did...

I'm pretty sure this is from localhost resolving to ::1. If you connect to the container it self and run the command it wont work either. Edit /etc/hosts and remove ip6 line for localhost and run the example command, you should hopefully see data.

@andreicioromila
Copy link

@tejom, can you can create a pull request to update the docs? your solution using 127.0.0.1 works for me too 👍

tejom added a commit to tejom/docker-graphite-statsd that referenced this issue May 8, 2017
localhost can be resolved to an ipv6 address. Ensuring that ipv4 is used by using the ip address works around some issues people are having in hopsoft#64
Cactusbone pushed a commit to F4-Group/docker-graphite-statsd that referenced this issue Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants