mojolingo / sippy_cup

Create SIP load test scenarios the easy way
http://mojolingo.github.io/sippy_cup
MIT License
219 stars 78 forks source link

Runtime error on Debian Jessie: UDPPacket (NameError) #91

Closed ghost closed 7 years ago

ghost commented 8 years ago

I'm getting the error sippy_cup/media.rb:117:innew_packet': uninitialized constant PacketFu::UDPPacket (NameError)` when running sippy_cup on Debian 8.6, Ruby 2.1.5 installed via apt-get. I'm using a basic sippy_cup file and running sippy_cup as root. This is my first time attempting to use this software. Please advise for user error if that's the root cause.

root@docker-sms:~# uname -r
3.16.0-4-amd64
root@docker-sms:~# cat /etc/debian_version
8.6
root@docker-sms:~# ruby --version
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
root@docker-sms:~# sippy_cup --version
SippyCup version 0.7.2
root@docker-sms:~# cat test.yml

---
source: 10.93.56.25
destination: 10.50.55.101
max_concurrent: 10
calls_per_second: 5
number_of_calls: 20
steps:
  - invite
  - wait_for_answer
  - ack_answer
  - sleep 3
  - hangup
root@docker-sms:~# sippy_cup --compile test.yml
Compiling media to /root/test.pcap.../var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:117:in `new_packet': uninitialized constant PacketFu::UDPPacket (NameError)
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:49:in `block (2 levels) in compile!'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:48:in `times'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:48:in `block in compile!'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:41:in `each'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:41:in `compile!'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/scenario.rb:792:in `compile_media'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/scenario.rb:699:in `compile!'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/bin/sippy_cup:64:in `<top (required)>'
    from /usr/local/bin/sippy_cup:23:in `load'
    from /usr/local/bin/sippy_cup:23:in `<main>'
root@docker-sms:~# sippy_cup --run test.yml
/var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:117:in `new_packet': uninitialized constant PacketFu::UDPPacket (NameError)
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:49:in `block (2 levels) in compile!'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:48:in `times'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:48:in `block in compile!'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:41:in `each'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:41:in `compile!'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/scenario.rb:792:in `compile_media'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/scenario.rb:726:in `to_tmpfiles'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/lib/sippy_cup/runner.rb:36:in `run'
    from /var/lib/gems/2.1.0/gems/sippy_cup-0.7.2/bin/sippy_cup:75:in `<top (required)>'
    from /usr/local/bin/sippy_cup:23:in `load'
    from /usr/local/bin/sippy_cup:23:in `<main>'
root@docker-sms:~#
root@docker-sms:~#
root@docker-sms:~# gcc --version
gcc (Debian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@docker-sms:~# make --version
GNU Make 4.0
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@docker-sms:~#
gemasergey commented 7 years ago

It looks like the last version of packetfu isn't compatible with sippy_cup. Adding gem 'packetfu', '1.1.11' into Gemfile resolves the issue.

leifmadsen commented 7 years ago

@bklang you can close this issue as you've resolved it in #90

bklang commented 7 years ago

Thanks @gemasergey for reporting it and @leifmadsen for the fix!