Kismet Wireless

Kismet Forums

 

Posted by:IntuitiveNipple
Subject:FATAL: Reading packet from pcap failed, interface is no longer up
Date:15:04:48 07/08/2008

I have been hunting down the cause of this error on Ubuntu Hardy with an iwl3945.

Initially, after having just installed 2008-05-R1 from the Ubuntu debian package I have created (available from my Ubuntu PPA at https://edge.launchpad.net/~intuitivenipple/+archive) I was seeing another message:

$ sudo kismet
...
FATAL: Could not connect to localhost:2501.
...

I did some investigations and confirmed the issue wasn't related to 'localhost' name resolution but the fact that localhost:2501 (in kismet_server) wasn't listening when kismet_client tried to connect.

I therefore ran kismet_server separately:

$ sudo kismet_server
...
FATAL: Reading packet from pcap failed, interface is no longer up.
...

This is the cause of "could not connect to localhost:2501" error.

I saw in the README Troubleshooting section this could be to do with the DHCP client closing the connection so I killed the dhclient on the interface:

$ sudo kill -s TERM $(cat /var/run/dhclient.wlan0.pid)
$ sudo kismet_server
...
FATAL: Reading packet from pcap failed, interface is no longer up.
...

I then decided to investigate the NetworkManager Dbus "sleep" method-call. I tried simulating it:

$ sudo kill -s TERM $(cat /var/run/dhclient.wlan0.pid)
$ ps -ef | grep dhc
root 6760 1 0 14:42 ? 00:00:01 /usr/sbin/dhcdbd --system
tj 12706 20995 0 22:06 pts/2 00:00:00 grep dhc
$ dbus-send --system --dest=org.freedesktop.NetworkManager --type=method_call /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.sleep

And instantly the interface went off-line. In the daemon.log messages I saw:

NetworkManager: <info> Going to sleep.
avahi-daemon[6010]: Interface wlan0.IPv4 no longer relevant for mDNS.
avahi-daemon[6010]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 10.254.251.51.
avahi-daemon[6010]: Withdrawing address record for fe80::219:d2ff:fe1a:1849 on wlan0.
avahi-daemon[6010]: Withdrawing address record for 10.254.251.51 on wlan0.

I then introduced the step of killing avahi-daemon:

$ sudo /etc/init.d/avahi-daemon stop
$ sudo kill -s TERM $(cat /var/run/dhclient.wlan0.pid)
$ ps -ef | egrep 'avahi|dhc'
root 6760 1 0 14:42 ? 00:00:01 /usr/sbin/dhcdbd --system
tj 17999 20995 0 22:27 pts/2 00:00:00 egrep avahi|dhc
$ dbus-send --system --dest=org.freedesktop.NetworkManager --type=method_call /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.sleep

Instantly, the interface disappears. The log shows:

NetworkManager: <info> Going to sleep.

dpkg-query -s network-manager | egrep 'Version:'
Version: 0.6.6-0ubuntu5

So it looks as if this procedure might need to be re-investigating since it seems NetworkManager takes down the interface in response to the "sleep" command.

Disabling the use of NetworkManager "sleep" in kismet.conf fixes the problem:

networkmanagersleep=false

Gathering packets...
Thu Aug 7 22:34:10 2008 Found new network "tjworld.net" bssid 00:16:B6:DA:68:15 Crypt Y Ch 1 @ 54.00 mbit
Thu Aug 7 22:34:10 2008 Found new network "tjworld.net" bssid 00:06:25:4A:89:5A Crypt Y Ch 13 @ 54.00 mbit
Accepted interface connection from 127.0.0.1

I've updated my Ubuntu package to do this since all Ubuntu installations have NetworkManager installed by default.


Reply to this message