This article provides a work-around for correcting the error condition.
This is environment specific issue where packet_db is missing from show databases list.
Workaround:
Step 1: Verify the databases list, if the packet_db is missing from the list then follow below workaround.
# mysql -uroot -p$(grep mysql.root /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') -e 'show databases';
Step 2: Create missing packet_db manually and verify it
# mysql -uroot -p$(grep mysql.root /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') -e 'create database packet_db'; # mysql -uroot -p$(grep mysql.root /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') -e 'show databases';
Step 3: Create missing tables under packet_db through below command and verify
# mysql -uroot -p$(grep mysql.root /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') packet_db < /usr/local/packet-capture/mysql/packetDB.sql # mysql -uroot -p$(grep mysql.root /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') packet_db -e 'show tables'; mysql: [Warning] Using a password on the command line interface can be insecure. +---------------------+ | Tables_in_packet_db | +---------------------+ | domains | | packets | | purging | +---------------------+
Step 4: Make sure packets are getting stored under packets table
Example: # mysql -uroot -p$(grep mysql.root /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') packet_db -e 'select count(*) from packets'; mysql: [Warning] Using a password on the command line interface can be insecure. +----------+ | count(*) | +----------+ | 15 | +----------+
Step 5: Restart Jboss service by following KB31228 [juniper.net]Step 6: Verify if pcap's are visible under SD UI -> monitor -> packet capture page
Please Note: If you are using dedicated DB nodes into the fabric cluster then you need to copy packetDB.sql file from Jboss VIP node to DB VIP node to create packet_db tables as this file won’t be available on DB nodes by default
# cd /usr/local/packet-capture/mysql/ # scp packetDB.sql admin@DBVIP:/tmp/ While running the step 3 you need to run below command on DB-VIP node # mysql -uroot -p$(grep mysql.root /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') packet_db < /tmp/packetDB.sql
Note : If you face any issues, please contact JUNIPER JTAC Support for assistance.