Failed to connect to Local Host port 8003: Connection refused

Hi ,
I have configured both grafana and graphite in my icingaweb2 , iam getting the graphs but in graphite it showing like Failed to connect to 10.1.10.122(local host) port 8003: Connection refused

Hi,

you’ll need to pass in the real IP address for the host/VM as it would be accessible from your client. localhost will point to your client’s address which is wrong. Also, why are you using port 8003?

Within Grafana this likely works since it provides its own server which fetches the data directly from the same host.

Cheers,
Michael

1 Like

Hi ,
i have changed but still the issue persists

The port is missing in the Graphite Web URL

2 Likes

@homerjay thanks for the reply
i changed and tried but it still it showing like connection refused

Hi again.

Maybe this clears it up a little bit:

/etc/icinga2/features-enbled/graphite.conf
config for icinga2 graphite Module to write data to.
If icinga2 and carbon-cache run on the same machine, you can use localhost as address, or better, 127.0.0.1.

/etc/icingaweb2/modules/graphite/config.ini
Address used by icingaweb2 to address graphite-graphs, which are presented by graphite-web. Usually a webserver with a configured port which points to graphite-web, for example port 8080, 65535, or whatever you have configured. This is the address where clients (using icingaweb2) get the graphs from.

Please verify, that the port and address you configured in the /etc/icingaweb2/modules/graphite/config.ini is correct. You could do the following on the server with the target ip:
(for example if you configured port 54321):

lsof -i tcp:54321 -P -n

You can also simply put the url (address and port) in a browser and check if graphite(-web) is reachable from a client.

I hope this points in a helpful direction.

3 Likes