You may need to add a Server line to the network plugin:
# server
<Plugin "network">
 Server "192.168.122.40"
 Listen "192.168.122.40"
</Plugin>

Other things to check since I am not familiar with your setup:

If you run netstat, is the carbon port listening on 0.0.0.0:2003?  (from a 
remote machine, `telnet x.x.x.x 2003`)
Do you have iptables running?
Check either /var/log/messages or /var/log/audit/audit.log for avc selinux 
denials.



> From: [email protected]
> To: [email protected]
> Date: Sun, 19 Oct 2014 12:26:58 +0800
> Subject: [collectd] collectd[3112]: write_graphite plugin: Connecting to      
> localhost:2003 via tcp failed
> 
> Hi there,
> 
> I am running collectd on centos 7. collectd and collectd-rrdtool are
> installed from the EPEL repo. I keep getting this error:
> 
>         Oct 19 12:02:12 boss collectd[3112]: write_graphite plugin: 
> Connecting to localhost:2003 via tcp failed. The last error was: Permission 
> denied
> 
> Here is the conf I added to /etc/collectd.d/server.conf and no other
> changes are made:
> 
>   LoadPlugin "network"
>   LoadPlugin "write_graphite"
>   
>   # server
>   <Plugin "network">
>     Listen "192.168.122.40"
>   </Plugin>
>   
>   <Plugin write_graphite>
>    <Node "example">
>      Host "localhost"
>      Port "2003"
>      Protocol "tcp"
>      LogSendErrors true
>      Prefix "collectd"
>      Postfix "collectd"
>      StoreRates true
>      AlwaysAppendDS false
>      EscapeCharacter "_"
>    </Node>
>   </Plugin>
> 
> Both collectd and carbon-cache are run on the same machine (KVM).
> 
> I can verify carbon-cache is listening on port 2003/tcp and it is
> working. I tested its working by using the example-client.py from carbon
> git repo from another machine as evidenced by the carbon's listener.log:
> 
>         19/10/2014 10:59:59 :: MetricLineReceiver connection with 
> 127.0.0.1:57222 established
>         19/10/2014 11:00:00 :: MetricLineReceiver connection with 
> 127.0.0.1:57222 closed cleanly
> 
> Could someone help me resolve this issue? Thanks.
> 
> Leo
> 
> _______________________________________________
> collectd mailing list
> [email protected]
> http://mailman.verplant.org/listinfo/collectd
                                          
_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to