Hi All,
Running pcapsipdump from head at version 124 on a rasberry pi 2 with freeswitch compiled from source.
I was able to compile pcapsipdump without any errors and copied over the init file to /etc/init.d directory, also without any issues.
The problem is when I attempt to start up the program, nothing happens. It sits at a starting stage but never advances beyond that.
Here's it starting up:
$ sudo /etc/init.d/pcapsipdump start
+ . /etc/default/pcapsipdump
++ PCAPSIDUMP_ENABLE=true
++ DEVICE=eth0
++ SPOOLDIR=/var/spool/pcapsipdump
++ RETENTION=7
+ NAME=pcapsipdump
+ DAEMON=/usr/sbin/pcapsipdump
+ DAEMON_ARGS='-d /var/spool/pcapsipdump -i eth0'
+ PIDFILE=/var/run/pcapsipdump.pid
+ case "$1" in
+ start
+ echo -n 'Starting pcapsipdump: '
Starting pcapsipdump: + start-stop-daemon --start --pidfile /var/run/pcapsipdump.pid --exec /usr/sbin/pcapsipdump --test
+ start-stop-daemon --start --pidfile /var/run/pcapsipdump.pid --exec /usr/sbin/pcapsipdump -- -d /var/spool/pcapsipdump -i eth0
/var/spool/pcapsipdump is root:root. Is that fine? Does pcapsipdump need to run as someone else?
When I run pcapsipdump just from the cli and without any arguments, the same issue happens as above, the cli never returns and no pcap files are generated, even if I set -d to something local.
4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux
$ cc -v
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.2 (Raspbian 4.9.2-10)
Any suggestions?
Sorry, that formatting is terrible. I can't find a way to edit my original post. Hopefully we'll be able to live with it.
Fixed in [r126], thanks for reporting!
Wow, that was a nice one. Of all things, this turned out to be an "unsigned char" issue [1]. Library function getopt() returns -1 when done, but having an unsigned-by-default char (as it happens to be the case on Raspbian jessie) means arguments parsing loop never sees it. Hence program just hangs there forever.
By the way, you don't have to copy initscripts by hand, "sudo make install" should detect a debian-like system and do it for you.
[1] http://stackoverflow.com/questions/2054939/is-char-signed-or-unsigned-by-default
Related
Commit: [r126]
Hi Alex,
Thanks for taking a look at this so quickly!
All is good and files are saved as expected.
Last edit: jungle boogie 2016-12-05