Quoting collectd-requ...@verplant.org:

Send collectd mailing list submissions to
        collectd@verplant.org

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


Hello,

the server shows correct collectd service started on UDP port 22061

##### server
netstat -ulpn  22061

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address   State   PID/Program name
..etc..
udp       0     0 x.x.x.x:22061     0.0.0.0:*               25902/collectd
..etc..

Is there a specific option to tcpdump the UDP packet ?

The hereafter command tcpdump on the server only shows the incoming TCP packets from the telnet test,
and no UDP packets from the client collectd.

##### server
/usr/sbin/tcpdump  port 22061 and host YYYY.lws-hosting.com
18:34:27.250666 IP YYYY.lws-hosting.com.22061 > ip-178-254-84-212.dyn.luxdsl.pt.lu.43638: Flags [R.], seq 0, ack 3650284349, win 0, length 0
...

##### client
18:46:42.833891 IP aspire4750.local.36537 > YYYY.22061: UDP, length 891
18:46:52.829244 IP aspire4750.local.36537 > YYYY.22061: UDP, length 916
18:46:52.833500 IP aspire4750.local.36537 > YYYY.22061: UDP, length 894
18:47:02.828826 IP aspire4750.local.36537 > YYYY.22061: UDP, length 914
..etc..

The telnet is TCP, collectd use UDP.
Both server and client shows no firewall :

###### server
iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

##### client
/sbin/iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Same on the router.


The collectd logs on server and client shows that all seems to work fine.

##### server
[2011-10-12 17:50:25] [info] perl: Initializing Perl interpreter...
[2011-10-12 17:50:25] [info] perl: Initializing Perl interpreter...
[2011-10-12 17:50:25] [info] Initialization complete, entering read-loop.

##### client
[2011-10-12 17:51:32] [info] Initialization complete, entering read-loop.


Well, from here, I have no more idea why the collectd server sees nothing from the client.
Many thanks for your attention and any clue.

Bye,
Bruno


_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd

Reply via email to