scylladb / seastar

High performance server-side application framework
http://seastar.io
Apache License 2.0
8.28k stars 1.54k forks source link

Prometheus: when Seastar run native stack on DPDK, metrics result page couldn't open. #804

Open Gfrom2016 opened 3 years ago

nyh commented 3 years ago

By "metrics result page", I guess you are talking about http://ipaddress:9180/? Note that this is not enabled by default in a Seastar application, you need to run the server in your own code (see example in apps/httpd/main.cc). Did you? Does it work with the default Linux stack and just not with DPDK? Finally, is your TCP working with DPDK at all? Maybe it's not just port 9180 that's not working, or not visible as expected in your setup?

Gfrom2016 commented 3 years ago

Sorry I didn't make myself clear. When I run httpd with native stack on DPDK, like this: ./build/release/apps/httpd/httpd --network-stack native --dpdk-pmd --dhcp 0 --smp 4 --dpdk-port-index 2 --host-ipv4-addr 10.157.7.217 --gw-ipv4-addr 10.157.7.192 --netmask-ipv4-addr 255.255.255.192 -m 4G I can't open http://10.157.7.217:9180/. But it works fine with the default Linux stack and native stack on DPDK works fine too.

Gfrom2016 commented 3 years ago

By the way, if I start a Prometheus server on a different server, say 10.157.7.154, and set targets to 10.157.7.217:9180. At this point I can open the web page http://10.157.7.154:9090/ successfully and get the collected metrics. The problem is I can't access http://10.157.7.217:9180/, the origin exposed port by Seastar.