[collectd] Server does not receive client data (network between both looks OK).

Toni Ylenius toniylenius at gmail.com
Wed Oct 12 08:27:40 CEST 2011


On Wednesday 12 October 2011 08:25 Abhishek Amberkar [अभिषेक] wrote:
> On Tue, Oct 11, 2011 at 10:11 PM, Bruno Costacurta
>
> <techie at costacurta.org> wrote:
> > Hello,
> >
> > I'm trying to setup a server / client collectd config.
> > The server is running and produces data as expected as shown via
> > Apache website.
> > The client is also running and sending data but apparently server
> > receives nothing. However a test using a telnet between client and
> > server looks OK.
> >
> > Here-after the config and tcpdump output.
> > Maybe my server config is missing something to act as a listener ?
> > Maybe a Interface setup ?
> > Thanks for your attention and clue.
> >
> > ##### server config:
> > Mode server
> > Hostname "YYYYY.lws-hosting.com"
> > BaseDir "/var/lib/collectd"
> > PIDFile "/var/collectd.pid"
> > PluginDir "/usr/lib/collectd"
> > TypesDB "/usr/share/collectd/types.db"
> >
> > LoadPlugin logfile
> > <Plugin "logfile">
> >  LogLevel "debug"
> >  File "/var/log/collectd.log"
> >  Timestamp true
> >  PrintSeverity true
> > </Plugin>
> >
> > LoadPlugin network
> > <Plugin "network">
> >  Listen "YYYYY.lws-hosting.com" "22061"
> >  Server "YYYYY.lws-hosting.com" "22061"
> > </Plugin>
> >
> > LoadPlugin rrdtool
> > <Plugin "rrdtool">
> >  DataDir "/var/lib/collectd/rrd"
> >  CacheTimeout 900
> >  CacheFlush 120
> >  WritesPerSecond 50
> > </Plugin>
> >
> > LoadPlugin cpu
> > LoadPlugin load
> >
> > <LoadPlugin "perl">
> >  Globals true
> > </LoadPlugin>
> >
> > <Plugin "perl">
> >  BaseName "Collectd::Plugins"
> >  LoadPlugin "OpenVZ"
> > </Plugin>
> >
> >
> > ##### client config:
> > Mode client
> > Hostname "aspire4750"
> > BaseDir "/var/lib/collectd"
> > PluginDir "/usr/lib/collectd"
> > TypesDB "/usr/share/collectd/types.db"
> >
> > LoadPlugin logfile
> > <Plugin logfile>
> >  LogLevel "debug"
> >  File "/var/log/collectd.log"
> >  Timestamp true
> >  PrintSeverity true
> > </Plugin>
> >
> > LoadPlugin rrdtool
> > LoadPlugin cpu
> > LoadPlugin df
> > LoadPlugin disk
> > LoadPlugin entropy
> > LoadPlugin hddtemp
> > LoadPlugin load
> > LoadPlugin memory
> > LoadPlugin network
> >
> > <Plugin "network">
> >  Server "vps622YYYYY.lws-hosting.com" "22061"
> > </Plugin>
> >
> > LoadPlugin processes
> > LoadPlugin swap
> > ..etc..
> > ..etc..
> >
> >
> > ##### IP packets send by the client to the server:
> > tcpdump -i wlan0 port 22061 and host YYYYY.lws-hosting.com
> > tcpdump: verbose output suppressed, use -v or -vv for full protocol
> > decode listening on wlan0, link-type EN10MB (Ethernet), capture
> > size 65535 bytes 18:17:19.480429 IP aspire4750.local.54746 >
> > XXXXX.22061: UDP, length 881 18:17:29.476113 IP
> > aspire4750.local.54746 > XXXXX.22061: UDP, length 912
> > 18:17:39.476338 IP aspire4750.local.54746 > XXXXX.22061: UDP,
> > length 871 18:17:39.476787 IP aspire4750.local.54746 > XXXXX.22061:
> > UDP, length 883 18:17:49.472704 IP aspire4750.local.54746 >
> > XXXXX.22061: UDP, length 913 18:17:49.473126 IP
> > aspire4750.local.54746 > XXXXX.22061: UDP, length 908 ..etc..
> > ..etc..
> >
> > ##### telnet to test connection between client and server:
> >
> > ## client side:
> >  telnet XXXXX 22061
> > Trying 93.184.47.217...
> > telnet: Unable to connect to remote host: Connection refused (note
> > : correct as no telnetd on server port 22061)
>
> No. You should be able to connect to the port. Telnetd is not
> required. This indicates that your client is not able to connect to
> the server. May be there's a firewall issue. Or check if "collectd"
> is running on server. Also check logs.
>
> > ## server side:
> > /usr/sbin/tcpdump  port 22061 and host XXXXX
> > listening on venet0, link-type LINUX_SLL (Linux cooked), capture
> > size 65535 bytes
> > 18:24:23.964418 IP YYYYY.lws-hosting.com.22061 >
> > ip-78-141-130-18.dyn.luxdsl.pt.lu.44760: Flags [R.], seq 0, ack
> > 1528218477, win 0, length 0
> >
> > -> so connection between client to server looks correct as server
> > received the telnet try from client, correct ?
> >
> > However the collectd log neither the Apache website shows data from
> > client. The data from the server are shown correctly.
> >
> > I suppose my server config is missing something to act as a
> > listener ? Thanks for your attention and clue.
> > Bye,
> > Bruno

First, collectd uses UDP and you cannot telnet (TCP) to this port. In my 
opinion Bruno's test was fine and indicates that the client can reach 
the server.

Bruno, have you tried to tcpdump the UDP packets on the server side?

Second, I think that it is instructed [1] to use only the Listen 
statement in the server configuration. However, I don't know if this 
makes any difference.

[1] http://collectd.org/wiki/index.php/Networking_introduction

Toni



More information about the collectd mailing list