I tried this time with the multipass way
Steps taken:
1)multipass exec mininet -- ./sflow-rt/start.sh -Dscript.file=../ryu.js
2)multipass exec mininet -- sudo mn --custom sflow-rt/extras/sflow.py --link tc,bw=10 --topo tree,depth=2
3)multipass exec mininet -- ryu-manager ryu.app.simple_switch,ryu.app.ofctl_rest
4)When i launch attack i see the following in the ryu controller.
mininet> h1 hping3 --flood --udp -k -s 53 h3
HPING 10.0.0.3 (h1-eth0 10.0.0.3): udp mode set, 28 headers + 0 data bytes
hping in flood mode, no replies will be shown
snehas-MacBook-Pro:mininet sneha$ multipass exec mininet -- ./sflow-rt/start.sh -Dscript.file=../ryu.js
2020-12-03T17:55:30-05:00 INFO: Starting sFlow-RT 3.0-1538
2020-12-03T17:55:31-05:00 INFO: Version check, running latest
2020-12-03T17:55:31-05:00 INFO: Listening, sFlow port 6343
2020-12-03T17:55:32-05:00 INFO: Listening, HTTP port 8008
2020-12-03T17:55:32-05:00 INFO: ../ryu.js started
2020-12-03T17:55:32-05:00 INFO: app/mininet-dashboard/scripts/metrics.js started
2020-12-03T17:58:19-05:00 WARNING: ../ryu.js ../ryu.js#37 not found
2020-12-03T17:58:19-05:00 INFO: ../ryu.js stopped
snehas-MacBook-Pro:~ sneha$ multipass exec mininet -- ryu-manager ryu.app.simple_switch,ryu.app.ofctl_rest
loading app ryu.app.simple_switch
loading app ryu.app.ofctl_rest
loading app ryu.controller.ofp_handler
instantiating app None of DPSet
creating context dpset
creating context wsgi
instantiating app ryu.app.simple_switch of SimpleSwitch
instantiating app ryu.app.ofctl_rest of RestStatsApi
instantiating app ryu.controller.ofp_handler of OFPHandler
(12097) wsgi starting up on http://0.0.0.0:8080
(12097) accepted ('127.0.0.1', 44758)
No such Datapath: 2
127.0.0.1 - - [03/Dec/2020 17:58:19] "POST /stats/flowentry/add HTTP/1.1" 404 141 0.070637