Debugging

Local deployment

You can spin up an instance of daisy (lp:daisy), the Ubuntu error tracker database, for development and debugging.

Note: this does not yet provide retracing of the reported crashes or a local copy of http://errors.ubuntu.com

First, install and configure juju. Then run the following commands:

mkdir -p ~/bzr/precise/daisy
bzr branch lp:~ev/charms/precise/daisy/trunk ~/bzr/precise/daisy
juju deploy rabbitmq-server
juju deploy cassandra
juju deploy -u --repository ~/bzr local:daisy
juju add-relation rabbitmq-server daisy
juju add-relation daisy:db cassandra:database
juju status 2>/dev/null

None of the relations or nodes should be in the failure state. Get the IP address of the daisy server and start watching the apache error log:

juju ssh daisy/0
tail -f /var/log/apache2/error.log -f /var/log/apache2/access.log

Set up an SSH tunnel to your daisy server, then point whoopsie at it:

sudo stop whoospie
ssh -N -L 8080:$IP_ADDRESS_OF_DAISY:80 $IP_ADDRESS_OF_DAISY
sudo CRASH_DB_URL=http://localhost:8080 whoopsie -f

Create a crash report:

evince &; PID="$\\!"; sleep 3; kill -SEGV $PID

Apport should launch automatically. Make sure the "report this problem" box is checked, then press continue. A 0-byte .upload file should be created in /var/crash, your terminal window running whoopsie should show it uploading to the daisy server, and the apache logs should output the results:

10.55.60.56 - - [31/May/2012:10:52:19 +0000] "POST /a378de8de1bb41bf7454f8fc8a67
1283233e32a321d197a5ff2f0888a2da2363e1bfdd3eb41257638145a57c08de9693f0ceaa33f66f
bd633b1bf66224eb256e HTTP/1.1" 200 226 "-" "-"

To see if the crash was completely processed into the database, run the following commands:

juju ssh cassandra/0
cassandra-cli
connect $ETH0_IP_ADDRESS/9160;
use crashdb;
list OOPS;

Monitoring txstatsd traffic

nc -l -u 8125

ErrorTracker/Debugging (last edited 2012-06-01 15:53:01 by ev)