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

Getsockopt: connection refused #2008

Closed
tesla747 opened this Issue Sep 19, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@tesla747
Copy link

tesla747 commented Sep 19, 2016

What did you do?

Started Prometheus to monitor linux host.

What did you expect to see?

I was expecting the target status to be in UP Status.

What did you see instead? Under which circumstances?

I'm getting the below error:

image

Environment

Linux

  • System information:

Linux 2.6.32-573.12.1.el6.x86_64 x86_64

  • Prometheus version:
    prometheus, version 1.1.2 (branch: master, revision: 36fbdcc)
    build user: root@a74d279a0d22
    build date: 20160908-13:12:43
    go version: go1.6.3
  • Alertmanager version:

NA

  • Prometheus configuration file:
global:
  scrape_interval:     5s
  evaluation_interval: 5s
scrape_configs:
- job_name: linux
  static_configs:
  - targets:
    - '172.19.36.189:9104'
    labels:
      alias: db1

  • Alertmanager configuration file:
NA
  • Logs:
time="2016-09-19T15:26:27+05:30" level=info msg="Completed maintenance sweep through 3 in-memory fingerprints in 30.000431023s." source="storage.go:1086"
time="2016-09-19T15:26:57+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.000186292s." source="storage.go:1086"
time="2016-09-19T15:27:27+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.000233901s." source="storage.go:1086"
time="2016-09-19T15:27:57+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.00023597s." source="storage.go:1086"
time="2016-09-19T15:28:27+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.000197688s." source="storage.go:1086"
time="2016-09-19T15:28:57+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.000228615s." source="storage.go:1086"
time="2016-09-19T15:29:27+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.0002949s." source="storage.go:1086"
time="2016-09-19T15:29:57+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.000235757s." source="storage.go:1086"
time="2016-09-19T15:30:27+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.000243498s." source="storage.go:1086"
time="2016-09-19T15:30:47+05:30" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:548"
time="2016-09-19T15:30:47+05:30" level=info msg="Done checkpointing in-memory metrics and chunks in 3.36598ms." source="persistence.go:572"
time="2016-09-19T15:30:57+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.000284943s." source="storage.go:1086"
time="2016-09-19T15:31:27+05:30" level=info msg="Completed maintenance sweep through 2 in-memory fingerprints in 20.000241069s." source="storage.go:1086"

@brancz

This comment has been minimized.

Copy link
Member

brancz commented Sep 19, 2016

I'm guessing by "monitor linux host" you meant, that you have the node_exporter running on that particular host? Can you curl the /metrics endpoint?

@tesla747

This comment has been minimized.

Copy link
Author

tesla747 commented Sep 19, 2016

Yes, node exporter and prometheus server is running on the same server. The page http://172.19.36.189:9104/metrics is not opening. It says Unable to connect. Curl gives the same error "couldn't connect to host"

@brancz

This comment has been minimized.

Copy link
Member

brancz commented Sep 19, 2016

Can you curl localhost:9104/metrics from the server? If you only have one Prometheus and one node_exporter then configuring it with localhost would suffice, other than that there seems to be an issue non-related to Prometheus.

@tesla747

This comment has been minimized.

Copy link
Author

tesla747 commented Sep 20, 2016

[root@NOVABANK189 prometheus_exporters]# curl localhost:9104/metrics
curl: (7) couldn't connect to host

It isn't connecting. Any idea where I should look at to narrow down the issue?

@tesla747

This comment has been minimized.

Copy link
Author

tesla747 commented Sep 20, 2016

Once I had mysql exporter started, it seems to show as UP. Thanks for the help!!

@tesla747 tesla747 closed this Sep 20, 2016

@kaarthikeyan1987

This comment has been minimized.

Copy link

kaarthikeyan1987 commented Nov 3, 2017

I am getting the below error after creating deployment

image
But when I do curl localhost:2379/metrics it is working fine as it loads inside.

Below is my configuration
image

please help

@stefano-pogliani

This comment has been minimized.

Copy link

stefano-pogliani commented Nov 7, 2017

@kaarthikeyan1987: Since the curlcommand works with localhost is etcd listening only on the localhost interface?
If so you can configure Prometheus to scrape http://localhost:2379/metrics and it should work.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.