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

hsflowd does not work on Debian 11 #47

Open
mehrdade opened this issue Jan 20, 2022 · 4 comments
Open

hsflowd does not work on Debian 11 #47

mehrdade opened this issue Jan 20, 2022 · 4 comments

Comments

@mehrdade
Copy link

mehrdade commented Jan 20, 2022

I compiled with "make deb" then "dpkg -i hsflowd_2.0.36-2_amd64.deb" and the service is running but it does not work.
nothing is being sent to 6343 UDP( checked via "tcpdump -n -i lo port 6343")

cat /etc/hsflowd.conf
sflow {
collector { ip = 127.0.0.1 UDPPort=6343 }
sampling=100
sampling.10G=100
pcap { speed = 1- }
tcp {}
}

cat /etc/hsflowd.auto
rev_start=1
hostname=xxxxxxxxxx
sampling=100
header=128
datagram=1400
polling=30
sampling.10G=100
agentIP=xxxxxxxxxxx
agent=ens1f0
ds_index=1
collector=127.0.0.1 6343
rev_end=1

@sflow
Copy link
Owner

sflow commented Jan 20, 2022

sFlow is over UDP, not TCP.

Looks like you need make deb FEATURES="PCAP TCP" to satisfy your hsflowd.conf config. And you might need to apt install libpcap-dev first.

@mehrdade
Copy link
Author

libpcap-dev has already been installed, and when UDP or TCP is not Specified in tcpdump command line it captures both modes.
anyway, this time I executed "tcpdump -n -i lo port 6343 and udp" but nothing changes

I install hsflowd (exactly the same step) on ubuntu and it works but on Debian 11 hsflowd service is up and running now but it has no functionality.

I Compiled with "make deb " and "make deb FEATURES="PCAP TCP" but nothing changes

@sflow
Copy link
Owner

sflow commented Jan 20, 2022

OK. I'll try to reproduce what you are seeing...

@sflow
Copy link
Owner

sflow commented Jan 20, 2022

It's working for me. Here is what I tried:
(1) downloaded Debian 11 and built a VM (with web-server and ssh-server checked)
(2) apt install build-essential
(3) apt install git libpcap-dev
(4) make deb
(5) dpkg -i hsflowd_2.0.36-2_amd64.deb
(6) hsflowd -ddd

In another window "tcpdump -i lo udp port 6343" sees a packet every 30 seconds, as expected. I tried it with your config file, and via systemd. All combinations worked.

I suggest you run "sudo systemctl stop hsflowd" to stop the service and then run "sudo hsflowd -ddd" to see the debugging output. Maybe there is a clue in there as to what is happening?

Another option would be to run sflowtool instead of tcpdump, just in case there is something awry with the tcpdump mechanism on your system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants