Sniffer troubleshooting: Difference between revisions

From VoIPmonitor.org
(Add Step 12: Benign Database Errors When Features Are Disabled (explains that missing table errors for disabled features like ss7 are harmless))
(Remove illogical Step numbering, convert pre to syntaxhighlight, fix internal links)
Line 1: Line 1:
{{DISPLAYTITLE:Troubleshooting: No Calls Being Sniffed}}
{{DISPLAYTITLE:Troubleshooting: No Calls Being Sniffed}}


'''This guide provides a systematic, step-by-step process to diagnose why the VoIPmonitor sensor might not be capturing any calls. Follow these steps in order to quickly identify and resolve the most common issues.'''
'''This guide provides a systematic process to diagnose why the VoIPmonitor sensor might not be capturing any calls. Use it to quickly identify and resolve the most common issues.'''


== Step 1: Is the VoIPmonitor Service Running Correctly? ==
== Is the VoIPmonitor Service Running Correctly? ==
First, confirm the sensor process is active and loaded the correct configuration file.
First, confirm the sensor process is active and loaded the correct configuration file.


;1. Check the service status (for modern systemd systems):
;1. Check the service status (for modern systemd systems):
<pre>systemctl status voipmonitor</pre>
<syntaxhighlight lang="bash">systemctl status voipmonitor</syntaxhighlight>
Look for a line that says <code>Active: active (running)</code>. If it is inactive or failed, try restarting it with `systemctl restart voipmonitor` and check the status again.
Look for a line that says <code>Active: active (running)</code>. If it is inactive or failed, try restarting it with <code>systemctl restart voipmonitor</code> and check the status again.


;2. Service Fails to Start with "Binary Not Found" After Crash:
;2. Service Fails to Start with "Binary Not Found" After Crash:
If the VoIPmonitor service fails to start after a crash or watchdog restart with an error message indicating the binary cannot be found (e.g., "No such file or directory" for `/usr/local/sbin/voipmonitor`), the binary may have been renamed with an underscore suffix during the crash recovery process.
If the VoIPmonitor service fails to start after a crash or watchdog restart with an error message indicating the binary cannot be found (e.g., "No such file or directory" for <code>/usr/local/sbin/voipmonitor</code>), the binary may have been renamed with an underscore suffix during the crash recovery process.


Check for a renamed binary:
Check for a renamed binary:
<pre>
<syntaxhighlight lang="bash">
# Check if the standard binary path exists
# Check if the standard binary path exists
ls -l /usr/local/sbin/voipmonitor
ls -l /usr/local/sbin/voipmonitor
Line 20: Line 20:
# If not found, look for a renamed version with underscore suffix
# If not found, look for a renamed version with underscore suffix
ls -l /usr/local/sbin/voipmonitor_*
ls -l /usr/local/sbin/voipmonitor_*
</pre>
</syntaxhighlight>


If you find a renamed binary (e.g., `voipmonitor_`, `voipmonitor_20250104`, etc.), rename it back to the standard name:
If you find a renamed binary (e.g., <code>voipmonitor_</code>, <code>voipmonitor_20250104</code>, etc.), rename it back to the standard name:
<pre>
<syntaxhighlight lang="bash">
mv /usr/local/sbin/voipmonitor_ /usr/local/sbin/voipmonitor
mv /usr/local/sbin/voipmonitor_ /usr/local/sbin/voipmonitor
</pre>
</syntaxhighlight>


Then restart the service:
Then restart the service:
<pre>
<syntaxhighlight lang="bash">
systemctl start voipmonitor
systemctl start voipmonitor
</pre>
</syntaxhighlight>


Verify the service starts correctly:
Verify the service starts correctly:
<pre>
<syntaxhighlight lang="bash">
systemctl status voipmonitor
systemctl status voipmonitor
</pre>
</syntaxhighlight>


;3. Sensor Becomes Unresponsive After GUI Update:
;3. Sensor Becomes Unresponsive After GUI Update:
If the sensor service fails to start or becomes unresponsive after updating a sensor through the Web GUI, the update process may have left the service in a stuck state. The solution is to forcefully stop the service and restart it using these commands:
If the sensor service fails to start or becomes unresponsive after updating a sensor through the Web GUI, the update process may have left the service in a stuck state. The solution is to forcefully stop the service and restart it using these commands:
<pre>
<syntaxhighlight lang="bash">
# SSH into the sensor host and execute:
# SSH into the sensor host and execute:
killall voipmonitor
killall voipmonitor
systemctl stop voipmonitor
systemctl stop voipmonitor
systemctl start voipmonitor
systemctl start voipmonitor
</pre>
</syntaxhighlight>
After running these commands, verify the sensor status in the GUI to confirm it is responding correctly. This sequence ensures: (1) Any zombie or hung processes are terminated with `killall`, (2) systemd is fully stopped, and (3) a clean start of the service.
After running these commands, verify the sensor status in the GUI to confirm it is responding correctly. This sequence ensures: (1) Any zombie or hung processes are terminated with <code>killall</code>, (2) systemd is fully stopped, and (3) a clean start of the service.


;4. Verify the running process:
;4. Verify the running process:
<pre>ps aux | grep voipmonitor</pre>
<syntaxhighlight lang="bash">ps aux | grep voipmonitor</syntaxhighlight>
This command will show the running process and the exact command line arguments it was started with. Critically, ensure it is using the correct configuration file, for example: <code>--config-file /etc/voipmonitor.conf</code>. If it is not, there may be an issue with your startup script.
This command will show the running process and the exact command line arguments it was started with. Critically, ensure it is using the correct configuration file, for example: <code>--config-file /etc/voipmonitor.conf</code>. If it is not, there may be an issue with your startup script.


== Step 2: Is Network Traffic Reaching the Server? ==
== Is Network Traffic Reaching the Server? ==
If the service is running, the next step is to verify if the VoIP packets (SIP/RTP) are actually arriving at the server's network interface. The best tool for this is `tshark` (the command-line version of Wireshark).
If the service is running, verify if the VoIP packets (SIP/RTP) are actually arriving at the server's network interface. The best tool for this is <code>tshark</code> (the command-line version of Wireshark).


;1. Install tshark:
;1. Install tshark:
<pre>
<syntaxhighlight lang="bash">
# For Debian/Ubuntu
# For Debian/Ubuntu
apt-get update && apt-get install tshark
apt-get update && apt-get install tshark
Line 61: Line 61:
# For CentOS/RHEL/AlmaLinux
# For CentOS/RHEL/AlmaLinux
yum install wireshark
yum install wireshark
</pre>
</syntaxhighlight>


;2. Listen for SIP traffic on the correct interface:
;2. Listen for SIP traffic on the correct interface:
Replace `eth0` with the interface name you have configured in `voipmonitor.conf`.
Replace <code>eth0</code> with the interface name you have configured in <code>voipmonitor.conf</code>.
<pre>
<syntaxhighlight lang="bash">
tshark -i eth0 -Y "sip || rtp" -n
tshark -i eth0 -Y "sip || rtp" -n
</pre>
</syntaxhighlight>
*'''If you see a continuous stream of SIP and RTP packets''', it means traffic is reaching the server, and the problem is likely in VoIPmonitor's configuration (see Step 4).
*'''If you see a continuous stream of SIP and RTP packets''', it means traffic is reaching the server, and the problem is likely in VoIPmonitor's configuration (see [[#Check the VoIPmonitor Configuration|Check the VoIPmonitor Configuration]]).
*'''If you see NO packets''', the problem lies with your network configuration. Proceed to Step 3.
*'''If you see NO packets''', the problem lies with your network configuration. See [[#Troubleshoot Network and Interface Configuration|Troubleshoot Network and Interface Configuration]].


;3. Advanced: Capture to PCAP File for Definitive Testing
;3. Advanced: Capture to PCAP File for Definitive Testing
Line 75: Line 75:


'''Method 1: Using tcpdump (Recommended)'''
'''Method 1: Using tcpdump (Recommended)'''
<pre>
<syntaxhighlight lang="bash">
# Start capture on the correct interface (replace eth0)
# Start capture on the correct interface (replace eth0)
tcpdump -i eth0 -s 0 -w /tmp/test_capture.pcap port 5060
tcpdump -i eth0 -s 0 -w /tmp/test_capture.pcap port 5060
Line 87: Line 87:
# Analyze the capture file:
# Analyze the capture file:
tshark -r /tmp/test_capture.pcap -Y "sip"
tshark -r /tmp/test_capture.pcap -Y "sip"
</pre>
</syntaxhighlight>


'''Method 2: Using tshark to capture to file'''
'''Method 2: Using tshark to capture to file'''
<pre>
<syntaxhighlight lang="bash">
# Start capture:
# Start capture:
tshark -i eth0 -w /tmp/test_capture.pcap -f "tcp port 5060 or udp"
tshark -i eth0 -w /tmp/test_capture.pcap -f "tcp port 5060 or udp"
Line 98: Line 98:
# Analyze the capture:
# Analyze the capture:
tshark -r /tmp/test_capture.pcap -Y "sip" -V
tshark -r /tmp/test_capture.pcap -Y "sip" -V
</pre>
</syntaxhighlight>


'''Decision Tree for PCAP Analysis:'''
'''Decision Tree for PCAP Analysis:'''
Line 108: Line 108:
** Fix the switch mirroring setup or infrastructure configuration first
** Fix the switch mirroring setup or infrastructure configuration first


* '''If SIP packets ARE present in the .pcap file but missing in the VoIPmonitor GUI:**
* '''If SIP packets ARE present in the .pcap file but missing in the VoIPmonitor GUI:'''
** The problem is with VoIPmonitor's configuration or processing
** The problem is with VoIPmonitor's configuration or processing
** Packets reached the NIC but were not processed correctly
** Packets reached the NIC but were not processed correctly
** Review Step 4 (VoIPmonitor Configuration) and Step 5 (Capture Rules)
** Review [[#Check the VoIPmonitor Configuration|VoIPmonitor Configuration]] and [[#Check GUI Capture Rules (Causing Call Stops)|Capture Rules]]


'''Example Test Call Workflow:'''
'''Example Test Call Workflow:'''
<pre>
<syntaxhighlight lang="bash">
# 1. Start capture
# 1. Start capture
tcpdump -i eth0 -s 0 -w /tmp/test.pcap "sip and host 10.0.1.100"
tcpdump -i eth0 -s 0 -w /tmp/test.pcap "sip and host 10.0.1.100"
Line 132: Line 132:
#    - If packets found in .pcap: VoIPmonitor software issue
#    - If packets found in .pcap: VoIPmonitor software issue
#    - If packets missing from .pcap: Network mirroring issue
#    - If packets missing from .pcap: Network mirroring issue
</pre>
</syntaxhighlight>


== Step 3: Troubleshoot Network and Interface Configuration ==
== Troubleshoot Network and Interface Configuration ==
If `tshark` shows no traffic, it means the packets are not being delivered to the operating system correctly.
If <code>tshark</code> shows no traffic, it means the packets are not being delivered to the operating system correctly.


;1. Check if the interface is UP:
;1. Check if the interface is UP:
Ensure the network interface is active.
Ensure the network interface is active.
<pre>ip link show eth0</pre>
<syntaxhighlight lang="bash">ip link show eth0</syntaxhighlight>
The output should contain the word `UP`. If it doesn't, bring it up with:
The output should contain the word <code>UP</code>. If it doesn't, bring it up with:
<pre>ip link set dev eth0 up</pre>
<syntaxhighlight lang="bash">ip link set dev eth0 up</syntaxhighlight>


;2. Check for Promiscuous Mode (for SPAN/RSPAN Mirrored Traffic):
;2. Check for Promiscuous Mode (for SPAN/RSPAN Mirrored Traffic):
Line 151: Line 151:


For SPAN/RSPAN deployments, check the current promiscuous mode status:
For SPAN/RSPAN deployments, check the current promiscuous mode status:
<pre>ip link show eth0</pre>
<syntaxhighlight lang="bash">ip link show eth0</syntaxhighlight>
Look for the `PROMISC` flag.
Look for the <code>PROMISC</code> flag.


Enable promiscuous mode manually if needed:
Enable promiscuous mode manually if needed:
<pre>ip link set eth0 promisc on</pre>
<syntaxhighlight lang="bash">ip link set eth0 promisc on</syntaxhighlight>
If this solves the problem, you should make the change permanent. The `install-script.sh` for the sensor usually attempts to do this, but it can fail.
If this solves the problem, you should make the change permanent. The <code>install-script.sh</code> for the sensor usually attempts to do this, but it can fail.


;3. Verify Your SPAN/Mirror/TAP Configuration:
;3. Verify Your SPAN/Mirror/TAP Configuration:
Line 164: Line 164:
* If you are monitoring traffic across different VLANs, ensure your mirror port is configured to carry all necessary VLAN tags (often called "trunk" mode).
* If you are monitoring traffic across different VLANs, ensure your mirror port is configured to carry all necessary VLAN tags (often called "trunk" mode).


== Step 4: Check the VoIPmonitor Configuration ==
== Check the VoIPmonitor Configuration ==
If `tshark` sees traffic but VoIPmonitor does not, the problem is almost certainly in `voipmonitor.conf`.
If <code>tshark</code> sees traffic but VoIPmonitor does not, the problem is almost certainly in <code>voipmonitor.conf</code>.


;1. Check the `interface` directive:
;1. Check the <code>interface</code> directive:
:Make sure the `interface` parameter in `/etc/voipmonitor.conf` exactly matches the interface where you see traffic with `tshark`. For example: `interface = eth0`.
:Make sure the <code>interface</code> parameter in <code>/etc/voipmonitor.conf</code> exactly matches the interface where you see traffic with <code>tshark</code>. For example: <code>interface = eth0</code>.


;2. Check the `sipport` directive:
;2. Check the <code>sipport</code> directive:
:By default, VoIPmonitor only listens on port 5060. If your PBX uses a different port for SIP, you must add it. For example:
:By default, VoIPmonitor only listens on port 5060. If your PBX uses a different port for SIP, you must add it. For example:
:<code>sipport = 5060,5080</code>
:<code>sipport = 5060,5080</code>


;3. Check for a restrictive `filter`:
;3. Check for a restrictive <code>filter</code>:
:If you have a BPF `filter` configured, ensure it is not accidentally excluding the traffic you want to see. For debugging, try commenting out the `filter` line entirely and restarting the sensor.
:If you have a BPF <code>filter</code> configured, ensure it is not accidentally excluding the traffic you want to see. For debugging, try commenting out the <code>filter</code> line entirely and restarting the sensor.


== Step 5: Check GUI Capture Rules (Causing Call Stops) ==
== Check GUI Capture Rules (Causing Call Stops) ==
If `tshark` sees SIP traffic and the sniffer configuration appears correct, but the probe stops processing calls or shows traffic only on the network interface, GUI capture rules may be the culprit.
If <code>tshark</code> sees SIP traffic and the sniffer configuration appears correct, but the probe stops processing calls or shows traffic only on the network interface, GUI capture rules may be the culprit.


Capture rules configured in the GUI can instruct the sniffer to ignore ("skip") all processing for matched calls. This includes calls matching specific IP addresses or telephone number prefixes.
Capture rules configured in the GUI can instruct the sniffer to ignore ("skip") all processing for matched calls. This includes calls matching specific IP addresses or telephone number prefixes.
Line 207: Line 207:
For more information on capture rules, see [[Capture_rules]].
For more information on capture rules, see [[Capture_rules]].


== Step 6: Troubleshoot MySQL/MariaDB Database Connection Errors ==
== Troubleshoot MySQL/MariaDB Database Connection Errors ==
If you see "Connection refused (111)" errors or the sensor cannot connect to your database server, the issue is with the MySQL/MariaDB database connection configuration in `/etc/voipmonitor.conf`.
If you see "Connection refused (111)" errors or the sensor cannot connect to your database server, the issue is with the MySQL/MariaDB database connection configuration in <code>/etc/voipmonitor.conf</code>.


Error 111 (Connection refused) indicates that the database server is reachable on the network, but no MySQL/MariaDB service is listening on the specified port, or the connection is being blocked by a firewall. This commonly happens after migrations when the database server IP address has changed.
Error 111 (Connection refused) indicates that the database server is reachable on the network, but no MySQL/MariaDB service is listening on the specified port, or the connection is being blocked by a firewall. This commonly happens after migrations when the database server IP address has changed.
Line 214: Line 214:
;1. Check for database connection errors in sensor logs:
;1. Check for database connection errors in sensor logs:
Verify the specific error from the sensor process:
Verify the specific error from the sensor process:
<pre>
<syntaxhighlight lang="bash">
# For Debian/Ubuntu (systemd journal)
# For Debian/Ubuntu (systemd journal)
journalctl -u voipmonitor --since "1 hour ago" | grep -iE "mysql|database|connection|can.t connect"
journalctl -u voipmonitor --since "1 hour ago" | grep -iE "mysql|database|connection|can.t connect"
Line 223: Line 223:
# For CentOS/RHEL/AlmaLinux
# For CentOS/RHEL/AlmaLinux
tail -f /var/log/messages | grep voipmonitor | grep -iE "mysql|database|connection"
tail -f /var/log/messages | grep voipmonitor | grep -iE "mysql|database|connection"
</pre>
</syntaxhighlight>


Look for errors like:
Look for errors like:
Line 230: Line 230:
* <code>Unknown database 'voipmonitor'</code> - Wrong database name
* <code>Unknown database 'voipmonitor'</code> - Wrong database name


;2. Verify database connection parameters in `voipmonitor.conf`:
;2. Verify database connection parameters in <code>voipmonitor.conf</code>:
Open `/etc/voipmonitor.conf` and check the MySQL connection settings:
Open <code>/etc/voipmonitor.conf</code> and check the MySQL connection settings:
<pre>
<syntaxhighlight lang="ini">
# Database Connection Parameters
# Database Connection Parameters
mysqlhost = 192.168.1.10      # IP address or hostname of MySQL/MariaDB server
mysqlhost = 192.168.1.10      # IP address or hostname of MySQL/MariaDB server
Line 239: Line 239:
mysqlpassword = your_password  # Database password
mysqlpassword = your_password  # Database password
mysqldatabase = voipmonitor    # Database name
mysqldatabase = voipmonitor    # Database name
</pre>
</syntaxhighlight>


Key points:
Key points:
Line 250: Line 250:
;3. Test MySQL connectivity from the sensor host:
;3. Test MySQL connectivity from the sensor host:
Use the <code>mysql</code> command-line client to test if the database is reachable from the sensor:
Use the <code>mysql</code> command-line client to test if the database is reachable from the sensor:
<pre>
<syntaxhighlight lang="bash">
# Test basic TCP connectivity (replace IP and port as needed)
# Test basic TCP connectivity (replace IP and port as needed)
nc -zv 192.168.1.10 3306
nc -zv 192.168.1.10 3306
Line 256: Line 256:
# Or using telnet
# Or using telnet
telnet 192.168.1.10 3306
telnet 192.168.1.10 3306
</pre>
</syntaxhighlight>


If you see "Connection refused", the database service is not running or not listening on that port.
If you see "Connection refused", the database service is not running or not listening on that port.


;4. Test MySQL authentication using credentials from `voipmonitor.conf`:
;4. Test MySQL authentication using credentials from <code>voipmonitor.conf</code>:
Use the same credentials configured in <code>voipmonitor.conf</code> to verify they work:
Use the same credentials configured in <code>voipmonitor.conf</code> to verify they work:
<pre>
<syntaxhighlight lang="bash">
mysql -h 192.168.1.10 -P 3306 -u root -p'your_password' voipmonitor
mysql -h 192.168.1.10 -P 3306 -u root -p'your_password' voipmonitor
</pre>
</syntaxhighlight>


Commands to run inside mysql client to verify:
Commands to run inside mysql client to verify:
<pre>
<syntaxhighlight lang="sql">
# Check if connected correctly
-- Check if connected correctly
SELECT USER(), CURRENT_USER();
SELECT USER(), CURRENT_USER();


# Check database exists
-- Check database exists
SHOW DATABASES LIKE 'voipmonitor';
SHOW DATABASES LIKE 'voipmonitor';


# Test write access
-- Test write access
USE voipmonitor;
USE voipmonitor;
SHOW TABLES;
SHOW TABLES;
EXIT;
EXIT;
</pre>
</syntaxhighlight>


;5. Compare with a working sensor's configuration:
;5. Compare with a working sensor's configuration:
If you have other sensors that successfully connect to the database, compare their configuration files:
If you have other sensors that successfully connect to the database, compare their configuration files:
<pre>
<syntaxhighlight lang="bash">
# Compare database settings between working and failing sensors
# Compare database settings between working and failing sensors
diff <(grep -E "^mysql" /etc/voipmonitor.conf) <(grep -E "^mysql" /path/to/working/sensor/voipmonitor.conf)
diff <(grep -E "^mysql" /etc/voipmonitor.conf) <(grep -E "^mysql" /path/to/working/sensor/voipmonitor.conf)
</pre>
</syntaxhighlight>


Common discrepancies after migration:
Common discrepancies after migration:
Line 295: Line 295:
;6. Check firewall and network connectivity:
;6. Check firewall and network connectivity:
Ensure the sensor can reach the database server and the required port is open:
Ensure the sensor can reach the database server and the required port is open:
<pre>
<syntaxhighlight lang="bash">
# Test network reachability
# Test network reachability
ping -c 4 192.168.1.10
ping -c 4 192.168.1.10
Line 307: Line 307:
# Check firewall rules (if using iptables)
# Check firewall rules (if using iptables)
iptables -L -n | grep 3306
iptables -L -n | grep 3306
</pre>
</syntaxhighlight>


If the port is blocked, you may need to:
If the port is blocked, you may need to:
Line 316: Line 316:
;7. Verify MySQL/MariaDB service is running:
;7. Verify MySQL/MariaDB service is running:
On the database server, check if the service is active:
On the database server, check if the service is active:
<pre>
<syntaxhighlight lang="bash">
# Check MySQL/MariaDB service status
# Check MySQL/MariaDB service status
systemctl status mariadb    # or systemctl status mysql
systemctl status mariadb    # or systemctl status mysql
Line 327: Line 327:
# or
# or
netstat -tulpn | grep mysql
netstat -tulpn | grep mysql
</pre>
</syntaxhighlight>


MySQL should be listening on the interface and port specified in your <code>voipmonitor.conf</code> <code>mysqlhost</code> and <code>mysqlport</code> settings.
MySQL should be listening on the interface and port specified in your <code>voipmonitor.conf</code> <code>mysqlhost</code> and <code>mysqlport</code> settings.
Line 333: Line 333:
;8. Apply configuration changes and restart the sensor:
;8. Apply configuration changes and restart the sensor:
After correcting the database connection settings in <code>/etc/voipmonitor.conf</code>:
After correcting the database connection settings in <code>/etc/voipmonitor.conf</code>:
<pre>
<syntaxhighlight lang="bash">
# Restart the VoIPmonitor service to apply changes
# Restart the VoIPmonitor service to apply changes
systemctl restart voipmonitor
systemctl restart voipmonitor
Line 345: Line 345:
# Check logs for database connection confirmation
# Check logs for database connection confirmation
journalctl -u voipmonitor -n 20
journalctl -u voipmonitor -n 20
</pre>
</syntaxhighlight>


Look for a successful database connection message in the logs, which typically appears within the first few seconds after startup.
Look for a successful database connection message in the logs, which typically appears within the first few seconds after startup.
Line 372: Line 372:


For more detailed information about all <code>mysql*</code> configuration parameters, see [[Sniffer_configuration#Database_Configuration]].
For more detailed information about all <code>mysql*</code> configuration parameters, see [[Sniffer_configuration#Database_Configuration]].
== Step 8: Check for Storage Hardware Errors (HEAP FULL / packetbuffer Issues) ==
 
== Check for Storage Hardware Errors (HEAP FULL / packetbuffer Issues) ==
If the sensor is crashing with "HEAP FULL" errors or showing "packetbuffer: MEMORY IS FULL" messages, you must distinguish between '''actual storage hardware failures''' (requires disk replacement) and '''performance bottlenecks''' (requires tuning).
If the sensor is crashing with "HEAP FULL" errors or showing "packetbuffer: MEMORY IS FULL" messages, you must distinguish between '''actual storage hardware failures''' (requires disk replacement) and '''performance bottlenecks''' (requires tuning).


;1. Check kernel message buffer for storage errors:
;1. Check kernel message buffer for storage errors:
<pre>dmesg -T | grep -iE "ext4-fs error|i/o error|nvram warning|ata.*failed|sda.*error|disk failure|smart error" | tail -50</pre>
<syntaxhighlight lang="bash">dmesg -T | grep -iE "ext4-fs error|i/o error|nvram warning|ata.*failed|sda.*error|disk failure|smart error" | tail -50</syntaxhighlight>


Look for these hardware error indicators:
Look for these hardware error indicators:
Line 395: Line 396:


<b>Check disk I/O performance:</b>
<b>Check disk I/O performance:</b>
<pre>
<syntaxhighlight lang="bash">
# Current I/O wait (should be < 10% normally)
# Current I/O wait (should be < 10% normally)
iostat -x 5
iostat -x 5
Line 404: Line 405:
# Real-time disk latency
# Real-time disk latency
ioping -c 10 .
ioping -c 10 .
</pre>
</syntaxhighlight>


<b>Check NFS latency (if using NFS storage):</b>
<b>Check NFS latency (if using NFS storage):</b>
<pre>
<syntaxhighlight lang="bash">
# Test NFS read/write latency
# Test NFS read/write latency
time dd if=/dev/zero of=/var/spool/voipmonitor/testfile bs=1M count=100
time dd if=/dev/zero of=/var/spool/voipmonitor/testfile bs=1M count=100
Line 415: Line 416:
# Check NFS mount options
# Check NFS mount options
mount | grep nfs
mount | grep nfs
</pre>
</syntaxhighlight>


<b>Common performance solutions:</b>
<b>Common performance solutions:</b>
Line 425: Line 426:
See also [[IO_Measurement]] for comprehensive disk benchmarking tools.
See also [[IO_Measurement]] for comprehensive disk benchmarking tools.


== Step 9: Check for OOM (Out of Memory) Issues ==
== Check for OOM (Out of Memory) Issues ==
If VoIPmonitor suddenly stops processing CDRs and a service restart temporarily restores functionality, the system may be experiencing OOM (Out of Memory) killer events. The Linux OOM killer terminates processes when available RAM is exhausted, and MySQL (`mysqld`) is a common target due to its memory-intensive nature.
If VoIPmonitor suddenly stops processing CDRs and a service restart temporarily restores functionality, the system may be experiencing OOM (Out of Memory) killer events. The Linux OOM killer terminates processes when available RAM is exhausted, and MySQL (<code>mysqld</code>) is a common target due to its memory-intensive nature.


;1. Check for OOM killer events in kernel logs:
;1. Check for OOM killer events in kernel logs:
<pre>
<syntaxhighlight lang="bash">
# For Debian/Ubuntu
# For Debian/Ubuntu
grep -i "out of memory\|killed process" /var/log/syslog | tail -20
grep -i "out of memory\|killed process" /var/log/syslog | tail -20
Line 438: Line 439:
# Also check dmesg:
# Also check dmesg:
dmesg | grep -i "killed process" | tail -10
dmesg | grep -i "killed process" | tail -10
</pre>
</syntaxhighlight>
Typical OOM killer messages look like:
Typical OOM killer messages look like:
<pre>
<syntaxhighlight lang="text">
Out of memory: Kill process 1234 (mysqld) score 123 or sacrifice child
Out of memory: Kill process 1234 (mysqld) score 123 or sacrifice child
Killed process 1234 (mysqld) total-vm: 12345678kB, anon-rss: 1234567kB
Killed process 1234 (mysqld) total-vm: 12345678kB, anon-rss: 1234567kB
</pre>
</syntaxhighlight>


;2. Monitor current memory usage:
;2. Monitor current memory usage:
<pre>
<syntaxhighlight lang="bash">
# Check available memory (look for low 'available' or 'free' values)
# Check available memory (look for low 'available' or 'free' values)
free -h
free -h
Line 455: Line 456:
# Check MySQL memory usage in bytes
# Check MySQL memory usage in bytes
cat /proc/$(pgrep mysqld)/status | grep -E "VmSize|VmRSS"
cat /proc/$(pgrep mysqld)/status | grep -E "VmSize|VmRSS"
</pre>
</syntaxhighlight>
Warning signs:
Warning signs:
* '''Available memory consistently below 500MB during operation'''
* '''Available memory consistently below 500MB during operation'''
Line 467: Line 468:
'''Calculate the correct buffer pool size:'''
'''Calculate the correct buffer pool size:'''
For a server running both VoIPmonitor and MySQL on the same host:
For a server running both VoIPmonitor and MySQL on the same host:
<pre>
<syntaxhighlight lang="text">
Formula: innodb_buffer_pool_size = (Total RAM - VoIPmonitor memory - OS & services overhead - safety margin) / 2
Formula: innodb_buffer_pool_size = (Total RAM - VoIPmonitor memory - OS & services overhead - safety margin) / 2


Line 479: Line 480:
Available for buffer pool = 32GB - 2GB - 2GB = 28GB
Available for buffer pool = 32GB - 2GB - 2GB = 28GB
Recommended innodb_buffer_pool_size = 14G (approximately 50% of available memory)
Recommended innodb_buffer_pool_size = 14G (approximately 50% of available memory)
</pre>
</syntaxhighlight>


'''Edit the MariaDB configuration file:'''
'''Edit the MariaDB configuration file:'''
<pre>
<syntaxhighlight lang="ini">
# Common locations: /etc/mysql/my.cnf, /etc/mysql/mariadb.conf.d/50-server.cnf, /etc/my.cnf.d/
# Common locations: /etc/mysql/my.cnf, /etc/mysql/mariadb.conf.d/50-server.cnf, /etc/my.cnf.d/


innodb_buffer_pool_size = 14G  # Adjust based on your calculation
innodb_buffer_pool_size = 14G  # Adjust based on your calculation
</pre>
</syntaxhighlight>


'''Restart MariaDB to apply:'''
'''Restart MariaDB to apply:'''
<pre>systemctl restart mariadb  # or systemctl restart mysql</pre>
<syntaxhighlight lang="bash">systemctl restart mariadb  # or systemctl restart mysql</syntaxhighlight>


If the OOM events stop after correcting <code>innodb_buffer_pool_size</code>, no hardware upgrade is needed.
If the OOM events stop after correcting <code>innodb_buffer_pool_size</code>, no hardware upgrade is needed.
;4. Solution: Increase physical memory (if buffer pool tuning is insufficient):
If correcting the buffer pool size does not resolve the OOM issues, upgrade the server's physical RAM. After upgrading:
* Verify memory improvements with <code>free -h</code>
* Recalculate and adjust <code>innodb_buffer_pool_size</code> to utilize the additional memory
* Monitor for several days to ensure OOM events stop
Additional mitigation strategies (while planning for RAM upgrade or adjusting configuration):
* Reduce MySQL's memory footprint by lowering <code>innodb_buffer_pool_size</code> (e.g., from 16GB to 8GB)
* Ensure swap space is properly configured as a safety buffer (though swap is much slower than RAM)
* Use <code>sysctl vm.swappiness=10</code> to favor RAM over swap when some memory is still available


;4. Second Fix: Reduce VoIPmonitor buffer memory usage:
;4. Second Fix: Reduce VoIPmonitor buffer memory usage:
Line 518: Line 508:


Edit <code>/etc/voipmonitor.conf</code> and decrease buffer settings:
Edit <code>/etc/voipmonitor.conf</code> and decrease buffer settings:
<pre>
<syntaxhighlight lang="ini">
# Reduce ringbuffer for each interface (e.g., from 50 to 20)
# Reduce ringbuffer for each interface (e.g., from 50 to 20)
ringbuffer = 20
ringbuffer = 20
Line 527: Line 517:
# Alternatively, reduce the number of sniffing interfaces if not all are needed
# Alternatively, reduce the number of sniffing interfaces if not all are needed
interface = eth0,eth1  # Instead of eth0,eth1,eth2,eth3
interface = eth0,eth1  # Instead of eth0,eth1,eth2,eth3
</pre>
</syntaxhighlight>


After making changes, restart the VoIPmonitor service:
After making changes, restart the VoIPmonitor service:
<pre>systemctl restart voipmonitor</pre>
<syntaxhighlight lang="bash">systemctl restart voipmonitor</syntaxhighlight>


'''Important notes:'''
'''Important notes:'''
Line 544: Line 534:
* Monitor for several days to ensure OOM events stop
* Monitor for several days to ensure OOM events stop


== Step 10: Sensor Upgrade Fails with "Permission denied" from /tmp ==
== Sensor Upgrade Fails with "Permission denied" from /tmp ==
If the sensor upgrade process fails with "Permission denied" errors when executing scripts from the `/tmp` directory, or the service fails to restart after upgrade, the `/tmp` partition may be mounted with the `noexec` flag.
If the sensor upgrade process fails with "Permission denied" errors when executing scripts from the <code>/tmp</code> directory, or the service fails to restart after upgrade, the <code>/tmp</code> partition may be mounted with the <code>noexec</code> flag.


The `noexec` mount option prevents execution of any script or binary from the `/tmp` directory for security reasons. However, the VoIPmonitor sensor upgrade process uses `/tmp` for temporary script execution.
The <code>noexec</code> mount option prevents execution of any script or binary from the <code>/tmp</code> directory for security reasons. However, the VoIPmonitor sensor upgrade process uses <code>/tmp</code> for temporary script execution.


;1. Check the mount options for /tmp:
;1. Check the mount options for /tmp:
<pre>mount | grep /tmp</pre>
<syntaxhighlight lang="bash">mount | grep /tmp</syntaxhighlight>
Look for the `noexec` flag in the mount options. Output will show something like:
Look for the <code>noexec</code> flag in the mount options. Output will show something like:
<pre>/dev/sda2 on /tmp type ext4 rw,relatime,noexec,nosuid,nodev</pre>
<syntaxhighlight lang="text">/dev/sda2 on /tmp type ext4 rw,relatime,noexec,nosuid,nodev</syntaxhighlight>


;2. Remount /tmp without noexec (temporary fix):
;2. Remount /tmp without noexec (temporary fix):
<pre>mount -o remount,exec /tmp</pre>
<syntaxhighlight lang="bash">mount -o remount,exec /tmp</syntaxhighlight>
Verify the change:
Verify the change:
<pre>mount | grep /tmp</pre>
<syntaxhighlight lang="bash">mount | grep /tmp</syntaxhighlight>
The output should no longer contain `noexec`.
The output should no longer contain <code>noexec</code>.


;3. Make the change permanent (edit /etc/fstab):
;3. Make the change permanent (edit /etc/fstab):
Open the `/etc/fstab` file and locate the line corresponding to the `/tmp` mount point. Remove the `noexec` option from that line.
Open the <code>/etc/fstab</code> file and locate the line corresponding to the <code>/tmp</code> mount point. Remove the <code>noexec</code> option from that line.
<pre>nano /etc/fstab</pre>
<syntaxhighlight lang="bash">nano /etc/fstab</syntaxhighlight>
Example:
Example:
<pre>
<syntaxhighlight lang="text">
# Before:
# Before:
/dev/sda2  /tmp  ext4  rw,relatime,noexec,nosuid,nodev  0 0
/dev/sda2  /tmp  ext4  rw,relatime,noexec,nosuid,nodev  0 0
Line 570: Line 560:
# After (remove noexec):
# After (remove noexec):
/dev/sda2  /tmp  ext4  rw,relatime,nosuid,nodev  0 0
/dev/sda2  /tmp  ext4  rw,relatime,nosuid,nodev  0 0
</pre>
</syntaxhighlight>
If `/tmp` is a separate partition, you may need to remount it for changes to take effect:
If <code>/tmp</code> is a separate partition, you may need to remount it for changes to take effect:
<pre>mount -o remount /tmp</pre>
<syntaxhighlight lang="bash">mount -o remount /tmp</syntaxhighlight>


;4. Re-run the sensor upgrade:
;4. Re-run the sensor upgrade:
After fixing the mount options, retry the sensor upgrade process.
After fixing the mount options, retry the sensor upgrade process.
== Check VoIPmonitor Logs for General Errors ==
After addressing the specific issues above, check the system logs for other error messages from the sensor process that may reveal additional problems.
<syntaxhighlight lang="bash">
# For Debian/Ubuntu
tail -f /var/log/syslog | grep voipmonitor
# For CentOS/RHEL/AlmaLinux
tail -f /var/log/messages | grep voipmonitor
</syntaxhighlight>
Look for errors like:
* "pcap_open_live(eth0) error: eth0: No such device" (Wrong interface name)
* "Permission denied" (The sensor is not running with sufficient privileges)
* Messages about connection issues (see [[#Troubleshoot MySQL/MariaDB Database Connection Errors|Troubleshoot MySQL/MariaDB Database Connection Errors]])
* Messages about dropping packets
== Benign Database Errors When Features Are Disabled ==
Some VoIPmonitor features may generate harmless database errors when those features are not enabled in your configuration. These errors are '''benign''' (cause no harm to the system) and can be safely ignored.
=== Common Benign Error: Missing Tables ===
If you see MySQL errors stating that a table does not exist (e.g., "Table 'voipmonitor.ss7' doesn't exist") even though the corresponding feature is disabled in your configuration, this is expected behavior.
;Common examples:
* Errors about the <code>ss7</code> table when <code>ss7 = no</code> in <code>voipmonitor.conf</code>
* Errors about the <code>register_failed</code>, <code>register_state</code>, or <code>sip_msg</code> tables when those features are disabled
* Other similar errors for optional features that are not enabled
=== Solution: Ignore or Suppress in Monitoring ===
Since these errors indicate that a feature is simply not active, they do not impact system functionality. The recommended approach is:
# '''Do not change the configuration''' to fix these errors
# '''Add monitoring exceptions''' to suppress warnings for table-not-found errors (MySQL error code 1146)
# Configure alerting systems to exclude these specific SQL errors from notifications
This prevents alert noise while keeping your logs intact for real issues that require attention.
=== When to Take Action ===
You only need to take action in the following situations:
* If you actually want to use the feature (enable the corresponding configuration option)
* If errors persist about tables for features that '''are''' explicitly enabled in <code>voipmonitor.conf</code>
Otherwise, these database errors are simply informational and confirm that optional features remain inactive as configured.


== Appendix: tshark Display Filter Syntax for SIP ==
== Appendix: tshark Display Filter Syntax for SIP ==
When using `tshark` to analyze SIP traffic, it is important to use the '''correct Wireshark display filter syntax'''. Below are common filter examples:
When using <code>tshark</code> to analyze SIP traffic, it is important to use the '''correct Wireshark display filter syntax'''. Below are common filter examples:


=== Basic SIP Filters ===
=== Basic SIP Filters ===
<pre>
<syntaxhighlight lang="bash">
# Show all SIP INVITE messages
# Show all SIP INVITE messages
tshark -r capture.pcap -Y "sip.Method == INVITE"
tshark -r capture.pcap -Y "sip.Method == INVITE"
Line 590: Line 625:
# Show SIP and RTP traffic
# Show SIP and RTP traffic
tshark -r capture.pcap -Y "sip || rtp"
tshark -r capture.pcap -Y "sip || rtp"
</pre>
</syntaxhighlight>


=== Search for Specific Phone Number or Text ===
=== Search for Specific Phone Number or Text ===
<pre>
<syntaxhighlight lang="bash">
# Find calls containing a specific phone number (e.g., 5551234567)
# Find calls containing a specific phone number (e.g., 5551234567)
tshark -r capture.pcap -Y 'sip contains "5551234567"'
tshark -r capture.pcap -Y 'sip contains "5551234567"'
Line 599: Line 634:
# Find INVITE messages for a specific number
# Find INVITE messages for a specific number
tshark -r capture.pcap -Y 'sip.Method == INVITE && sip contains "5551234567"'
tshark -r capture.pcap -Y 'sip.Method == INVITE && sip contains "5551234567"'
</pre>
</syntaxhighlight>


=== Extract Call-ID from Matching Calls ===
=== Extract Call-ID from Matching Calls ===
<pre>
<syntaxhighlight lang="bash">
# Get Call-ID for calls matching a phone number
# Get Call-ID for calls matching a phone number
tshark -r capture.pcap -Y 'sip.Method == INVITE && sip contains "5551234567"' -T fields -e sip.Call-ID
tshark -r capture.pcap -Y 'sip.Method == INVITE && sip contains "5551234567"' -T fields -e sip.Call-ID
Line 608: Line 643:
# Get Call-ID along with From and To headers
# Get Call-ID along with From and To headers
tshark -r capture.pcap -Y 'sip.Method == INVITE' -T fields -e sip.Call-ID -e sip.from.user -e sip.to.user
tshark -r capture.pcap -Y 'sip.Method == INVITE' -T fields -e sip.Call-ID -e sip.from.user -e sip.to.user
</pre>
</syntaxhighlight>


=== Filter by IP Address ===
=== Filter by IP Address ===
<pre>
<syntaxhighlight lang="bash">
# SIP traffic from a specific source IP
# SIP traffic from a specific source IP
tshark -r capture.pcap -Y "sip && ip.src == 192.168.1.100"
tshark -r capture.pcap -Y "sip && ip.src == 192.168.1.100"
Line 617: Line 652:
# SIP traffic between two hosts
# SIP traffic between two hosts
tshark -r capture.pcap -Y "sip && ip.addr == 192.168.1.100 && ip.addr == 10.0.0.50"
tshark -r capture.pcap -Y "sip && ip.addr == 192.168.1.100 && ip.addr == 10.0.0.50"
</pre>
</syntaxhighlight>


=== Filter by SIP Response Code ===
=== Filter by SIP Response Code ===
<pre>
<syntaxhighlight lang="bash">
# Show all 200 OK responses
# Show all 200 OK responses
tshark -r capture.pcap -Y "sip.Status-Code == 200"
tshark -r capture.pcap -Y "sip.Status-Code == 200"
Line 629: Line 664:
# Show 486 Busy Here responses
# Show 486 Busy Here responses
tshark -r capture.pcap -Y "sip.Status-Code == 486"
tshark -r capture.pcap -Y "sip.Status-Code == 486"
</pre>
</syntaxhighlight>


=== Important Syntax Notes ===
=== Important Syntax Notes ===
Line 638: Line 673:


For a complete reference, see the [https://www.wireshark.org/docs/dfref/s/sip.html Wireshark SIP Display Filter Reference].
For a complete reference, see the [https://www.wireshark.org/docs/dfref/s/sip.html Wireshark SIP Display Filter Reference].
== Step 11: Check VoIPmonitor Logs for General Errors ==
After addressing the specific issues above, check the system logs for other error messages from the sensor process that may reveal additional problems.
<pre>
# For Debian/Ubuntu
tail -f /var/log/syslog | grep voipmonitor
# For CentOS/RHEL/AlmaLinux
tail -f /var/log/messages | grep voipmonitor
</pre>
Look for errors like:
* "pcap_open_live(eth0) error: eth0: No such device" (Wrong interface name)
* "Permission denied" (The sensor is not running with sufficient privileges)
* Messages about connection issues (see Step 6 for database connection troubleshooting)
* Messages about dropping packets
== Step 12: Benign Database Errors When Features Are Disabled ==
Some VoIPmonitor features may generate harmless database errors when those features are not enabled in your configuration. These errors are '''benign''' (cause no harm to the system) and can be safely ignored.
=== Common Benign Error: Missing Tables ===
If you see MySQL errors stating that a table does not exist (e.g., "Table 'voipmonitor.ss7' doesn't exist") even though the corresponding feature is disabled in your configuration, this is expected behavior.
;Common examples:
* Errors about the `ss7` table when `ss7 = no` in `voipmonitor.conf`
* Errors about the `register_failed`, `register_state`, or `sip_msg` tables when those features are disabled
* Other similar errors for optional features that are not enabled
=== Solution: Ignore or Suppress in Monitoring ===
Since these errors indicate that a feature is simply not active, they do not impact system functionality. The recommended approach is:
# '''Do not change the configuration''' to fix these errors
# '''Add monitoring exceptions''' to suppress warnings for table-not-found errors (MySQL error code 1146)
# Configure alerting systems to exclude these specific SQL errors from notifications
This prevents alert noise while keeping your logs intact for real issues that require attention.
=== When to Take Action ===
You only need to take action in the following situations:
* If you actually want to use the feature (enable the corresponding configuration option)
* If errors persist about tables for features that '''are''' explicitly enabled in `voipmonitor.conf`
Otherwise, these database errors are simply informational and confirm that optional features remain inactive as configured.


== AI Summary for RAG ==
== AI Summary for RAG ==
'''Summary:''' This document provides a step-by-step troubleshooting guide for when the VoIPmonitor sensor is not capturing any calls. The process is broken down into eleven logical steps. Step 1 is to verify the service is running correctly using `systemctl status` and `ps`. Step 1 also includes troubleshooting for when the service fails to start with "binary not found" error after a crash: check if the binary has been renamed with an underscore suffix (e.g., `voipmonitor_`), rename it back to the standard name with `mv /usr/local/sbin/voipmonitor_ /usr/local/sbin/voipmonitor`, then restart the service. Additionally, Step 1 includes a specific troubleshooting procedure for sensors that become unresponsive after GUI updates: execute `killall voipmonitor`, `systemctl stop voipmonitor`, and `systemctl start voipmonitor` to forcefully restart the service, then verify sensor status in the GUI. Step 2 is to use `tshark` to confirm if SIP/RTP traffic is actually arriving at the server's network interface. Step 3 covers network-level issues, including an important distinction between Layer 2 mirroring (SPAN/RSPAN) which requires promiscuous mode, and Layer 3 tunneling (ERSPAN/GRE/TZSP/VXLAN) which does NOT require promiscuous mode because the tunnel packets are addressed to the sensor's IP. Step 4 focuses on checking the `voipmonitor.conf` file for common misconfigurations like the `interface`, `sipport`, or `filter` parameters. Step 5 addresses GUI capture rules with the "Skip" option that can cause probes to stop processing calls even when network traffic is visible; it explains how to review, backup, remove, and systematically test capture rules via the GUI interface. Step 6 is a comprehensive guide for troubleshooting MySQL/MariaDB database connection errors, specifically "Connection refused (111)" errors that commonly occur after migrations. Step 6 provides detailed instructions for: checking sensor logs for database errors; verifying `mysqlhost`, `mysqlport`, `mysqlusername`, `mysqlpassword`, and `mysqldatabase` parameters in `/etc/voipmonitor.conf`; testing MySQL connectivity with `nc` and the `mysql` command-line client; comparing configuration with working sensors; checking firewall and network connectivity; verifying the MySQL/MariaDB service is running and listening on the correct port; and applying configuration changes by restarting the sensor service. The step also includes common troubleshooting scenarios: database server IP changed after migration (update `mysqlhost`), wrong username or password (update credentials), database service not running (start MariaDB), firewall blocking port 3306 (open firewall rules), and localhost vs remote connection confusion (use actual IP address). Step 7 explains how to diagnose HEAP FULL / packetbuffer MEMORY IS FULL errors by first checking kernel message buffer (`dmesg -T`) for storage hardware errors like `ext4-fs error`, `I/O error`, or `NVRAM WARNING`. If hardware errors are present, the disk needs replacement. If dmesg is clear, the issue is a performance bottleneck that requires checking disk I/O performance and NFS latency. This step emphasizes the critical distinction between hardware failure and performance issues. Step 9 explains how to diagnose OOM (Out of Memory) killer events, which cause CDR processing to stop and require service restarts to restore. It provides commands to check for OOM events in kernel logs (grep, dmesg), monitor current memory usage (free -h, ps aux), and identify warning signs like low available memory (<500MB), high MySQL memory consumption, and frequent process restarts. The first fix is to check and correct `innodb_buffer_pool_size`, which is often set too high and causes MariaDB to consume most of the available RAM. The guide provides a calculation formula: innodb_buffer_pool_size = (Total RAM - VoIPmonitor memory - OS & services overhead - safety margin) / 2. For a 32GB server with VoIPmonitor using 2GB, the recommended value is 14G. The second fix is to reduce VoIPmonitor's own memory consumption by adjusting buffer settings in `voipmonitor.conf`: decreasing `ringbuffer` (MB per interface), decreasing `max_buffer_mem` (MB), or reducing the number of sniffing interfaces. The total VoIPmonitor buffer memory is approximately (ringbuffer × number of interfaces) + max_buffer_mem. For example, with ringbuffer=50, max_buffer_mem=2000, and 3 interfaces, total is ~2150MB. After making configuration changes, the sniffer should be restarted with `systemctl restart voipmonitor`. Important notes: reducing buffers may increase packet loss during traffic spikes, so monitor packet loss statistics in the GUI after changes. If neither MySQL innodb_buffer_pool_size tuning nor VoIPmonitor buffer reduction resolves OOM events, the solution is to increase physical RAM. Step 10 addresses a specific issue where sensor upgrade fails with "Permission denied" errors when executing scripts from `/tmp`, or the service fails to restart after upgrade. This is caused by the `/tmp` partition being mounted with the `noexec` flag. The solution involves checking mount options with `mount | grep /tmp`, remounting `/tmp` without the `noexec` flag using `mount -o remount,exec /tmp`, and making the change permanent by editing `/etc/fstab` to remove the `noexec` option from the `/tmp` mount line. Step 12 explains benign database errors that occur when optional VoIPmonitor features are disabled in configuration. Examples include MySQL errors about missing tables like `ss7`, `register_failed`, `register_state`, or `sip_msg` when the corresponding features are set to `no` in `voipmonitor.conf`. These "Table doesn't exist" errors (MySQL error code 1146) are harmless and indicate the feature is simply not active. The solution is to not change configuration, but instead add monitoring exceptions to suppress warnings and prevent alert noise for these specific SQL errors. Action is only needed if you actually want to use the feature or if errors persist for enabled features. The Appendix provides correct tshark display filter syntax for analyzing SIP traffic, including examples for filtering by SIP method (sip.Method == INVITE), searching for phone numbers (sip contains "number"), extracting Call-IDs (-T fields -e sip.Call-ID), and filtering by response codes (sip.Status-Code).
'''Summary:''' This document provides a troubleshooting guide for when the VoIPmonitor sensor is not capturing any calls. The first section covers verifying the service is running correctly using <code>systemctl status</code> and <code>ps</code>, including troubleshooting for when the service fails to start with "binary not found" error after a crash (check if the binary has been renamed with an underscore suffix, rename it back with <code>mv /usr/local/sbin/voipmonitor_ /usr/local/sbin/voipmonitor</code>), and a specific procedure for sensors that become unresponsive after GUI updates (execute <code>killall voipmonitor</code>, <code>systemctl stop voipmonitor</code>, and <code>systemctl start voipmonitor</code>). The second section covers using <code>tshark</code> to confirm if SIP/RTP traffic is actually arriving at the server's network interface. The third section covers network-level issues, including an important distinction between Layer 2 mirroring (SPAN/RSPAN) which requires promiscuous mode, and Layer 3 tunneling (ERSPAN/GRE/TZSP/VXLAN) which does NOT require promiscuous mode. The fourth section focuses on checking the <code>voipmonitor.conf</code> file for common misconfigurations like the <code>interface</code>, <code>sipport</code>, or <code>filter</code> parameters. The fifth section addresses GUI capture rules with the "Skip" option that can cause probes to stop processing calls. The sixth section is a comprehensive guide for troubleshooting MySQL/MariaDB database connection errors, specifically "Connection refused (111)" errors. The seventh section explains how to diagnose HEAP FULL / packetbuffer MEMORY IS FULL errors by checking kernel message buffer for storage hardware errors. The eighth section explains how to diagnose OOM (Out of Memory) killer events and provides fixes including correcting <code>innodb_buffer_pool_size</code> and reducing VoIPmonitor buffer settings (<code>ringbuffer</code>, <code>max_buffer_mem</code>). The ninth section addresses sensor upgrade failures with "Permission denied" errors from <code>/tmp</code> due to the <code>noexec</code> mount flag. The tenth section explains benign database errors that occur when optional features are disabled. The Appendix provides correct tshark display filter syntax for analyzing SIP traffic.
'''Keywords:''' troubleshooting, no calls, not sniffing, no data, no CDRs, tshark, wireshark, promiscuous mode, promisc, ifconfig, ip link, SPAN, RSPAN, ERSPAN, GRE, TZSP, VXLAN, port mirroring, voipmonitor.conf, interface, sipport, filter, capture rules, Skip ON, GUI capture rules, reload sniffer, backup and restore, syslog, logs, permission denied, display filter, sip.Method, sip.Call-ID, sip.Status-Code, sip contains, OOM, out of memory, OOM killer, killed process, mysqld killed, free -h, memory usage, dmesg, swap, RAM upgrade, innodb_buffer_pool_size, GUI update, sensor update, buffer pool calculation, innodb_buffer_pool too high, correct buffer pool size, calculate innodb_buffer_pool, killall, sensor unresponsive, service fails to start after update, /tmp, noexec, mount, fstab, upgrade fails, permission denied from tmp, sensor upgrade permission denied, tmp noexec flag, remount tmp exec, HEAP FULL, packetbuffer MEMORY IS FULL, dmesg -T, ext4-fs error, I/O error, NVRAM WARNING, storage hardware errors, disk failure, smart error, ata failed, buffer I/O error, smartctl, mdstat, RAID health, iostat, dstat, ioping, NFS latency, disk I/O performance, iowait, performance bottleneck, hardware failure vs performance, binary not found, service fails to start after crash, voipmonitor binary renaming, voipmonitor_ underscore, watchdog crash, binary renamed with underscore, mv voipmonitor_ voipmonitor, ls -l /usr/local/sbin/voipmonitor_, ringbuffer, max_buffer_mem, voipmonitor buffer memory, reduce voipmonitor memory, voipmonitor buffer calculation, sniffer buffers, packetbuffer, ring buffer size, maximum buffer memory, voipmonitor memory settings, benign database errors, harmless sql errors, table does not exist, ss7 table not found, register_failed table, monitoring exceptions, ignore mysql errors, error code 1146, optional features disabled, ss7 disabled, suppress warnings
'''Keywords:''' troubleshooting, no calls, not sniffing, no data, no CDRs, tshark, wireshark, promiscuous mode, promisc, ifconfig, ip link, SPAN, RSPAN, ERSPAN, GRE, TZSP, VXLAN, port mirroring, voipmonitor.conf, interface, sipport, filter, capture rules, Skip ON, GUI capture rules, reload sniffer, backup and restore, syslog, logs, permission denied, display filter, sip.Method, sip.Call-ID, sip.Status-Code, sip contains, OOM, out of memory, OOM killer, killed process, mysqld killed, free -h, memory usage, dmesg, swap, RAM upgrade, innodb_buffer_pool_size, GUI update, sensor update, buffer pool calculation, innodb_buffer_pool too high, correct buffer pool size, calculate innodb_buffer_pool, killall, sensor unresponsive, service fails to start after update, /tmp, noexec, mount, fstab, upgrade fails, permission denied from tmp, sensor upgrade permission denied, tmp noexec flag, remount tmp exec, HEAP FULL, packetbuffer MEMORY IS FULL, dmesg -T, ext4-fs error, I/O error, NVRAM WARNING, storage hardware errors, disk failure, smart error, ata failed, buffer I/O error, smartctl, mdstat, RAID health, iostat, dstat, ioping, NFS latency, disk I/O performance, iowait, performance bottleneck, hardware failure vs performance, binary not found, service fails to start after crash, voipmonitor binary renaming, voipmonitor_ underscore, watchdog crash, binary renamed with underscore, mv voipmonitor_ voipmonitor, ls -l /usr/local/sbin/voipmonitor_, ringbuffer, max_buffer_mem, voipmonitor buffer memory, reduce voipmonitor memory, voipmonitor buffer calculation, sniffer buffers, packetbuffer, ring buffer size, maximum buffer memory, voipmonitor memory settings, benign database errors, harmless sql errors, table does not exist, ss7 table not found, register_failed table, monitoring exceptions, ignore mysql errors, error code 1146, optional features disabled, ss7 disabled, suppress warnings
'''Key Questions:'''
'''Key Questions:'''

Revision as of 10:56, 4 January 2026


This guide provides a systematic process to diagnose why the VoIPmonitor sensor might not be capturing any calls. Use it to quickly identify and resolve the most common issues.

Is the VoIPmonitor Service Running Correctly?

First, confirm the sensor process is active and loaded the correct configuration file.

1. Check the service status (for modern systemd systems)
systemctl status voipmonitor

Look for a line that says Active: active (running). If it is inactive or failed, try restarting it with systemctl restart voipmonitor and check the status again.

2. Service Fails to Start with "Binary Not Found" After Crash

If the VoIPmonitor service fails to start after a crash or watchdog restart with an error message indicating the binary cannot be found (e.g., "No such file or directory" for /usr/local/sbin/voipmonitor), the binary may have been renamed with an underscore suffix during the crash recovery process.

Check for a renamed binary:

# Check if the standard binary path exists
ls -l /usr/local/sbin/voipmonitor

# If not found, look for a renamed version with underscore suffix
ls -l /usr/local/sbin/voipmonitor_*

If you find a renamed binary (e.g., voipmonitor_, voipmonitor_20250104, etc.), rename it back to the standard name:

mv /usr/local/sbin/voipmonitor_ /usr/local/sbin/voipmonitor

Then restart the service:

systemctl start voipmonitor

Verify the service starts correctly:

systemctl status voipmonitor
3. Sensor Becomes Unresponsive After GUI Update

If the sensor service fails to start or becomes unresponsive after updating a sensor through the Web GUI, the update process may have left the service in a stuck state. The solution is to forcefully stop the service and restart it using these commands:

# SSH into the sensor host and execute:
killall voipmonitor
systemctl stop voipmonitor
systemctl start voipmonitor

After running these commands, verify the sensor status in the GUI to confirm it is responding correctly. This sequence ensures: (1) Any zombie or hung processes are terminated with killall, (2) systemd is fully stopped, and (3) a clean start of the service.

4. Verify the running process
ps aux | grep voipmonitor

This command will show the running process and the exact command line arguments it was started with. Critically, ensure it is using the correct configuration file, for example: --config-file /etc/voipmonitor.conf. If it is not, there may be an issue with your startup script.

Is Network Traffic Reaching the Server?

If the service is running, verify if the VoIP packets (SIP/RTP) are actually arriving at the server's network interface. The best tool for this is tshark (the command-line version of Wireshark).

1. Install tshark
# For Debian/Ubuntu
apt-get update && apt-get install tshark

# For CentOS/RHEL/AlmaLinux
yum install wireshark
2. Listen for SIP traffic on the correct interface

Replace eth0 with the interface name you have configured in voipmonitor.conf.

tshark -i eth0 -Y "sip || rtp" -n
3. Advanced
Capture to PCAP File for Definitive Testing

Live monitoring with tshark is useful for observation, but capturing traffic to a .pcap file during a test call provides definitive evidence for troubleshooting intermittent issues or specific call legs.

Method 1: Using tcpdump (Recommended)

# Start capture on the correct interface (replace eth0)
tcpdump -i eth0 -s 0 -w /tmp/test_capture.pcap port 5060

# Or capture both SIP and RTP traffic:
tcpdump -i eth0 -s 0 -w /tmp/test_capture.pcap "(port 5060 or udp)"

# Let it run while you make a test call with the missing call leg
# Press Ctrl+C to stop the capture

# Analyze the capture file:
tshark -r /tmp/test_capture.pcap -Y "sip"

Method 2: Using tshark to capture to file

# Start capture:
tshark -i eth0 -w /tmp/test_capture.pcap -f "tcp port 5060 or udp"

# Make your test call, then press Ctrl+C to stop

# Analyze the capture:
tshark -r /tmp/test_capture.pcap -Y "sip" -V

Decision Tree for PCAP Analysis: After capturing a test call known to have a missing leg:

  • If SIP packets are missing from the .pcap file:
    • The problem is with your network mirroring configuration (SPAN/TAP port, AWS Traffic Mirroring, etc.)
    • The packets never reached the VoIPmonitor sensor's network interface
    • Fix the switch mirroring setup or infrastructure configuration first
  • If SIP packets ARE present in the .pcap file but missing in the VoIPmonitor GUI:

Example Test Call Workflow:

# 1. Start capture
tcpdump -i eth0 -s 0 -w /tmp/test.pcap "sip and host 10.0.1.100"

# 2. Make a test call from phone at 10.0.1.100 to 10.0.2.200
#    (a call that you know should have recordings but is missing)

# 3. Stop capture (Ctrl+C)

# 4. Check for the specific call's Call-ID
tshark -r /tmp/test.pcap -Y "sip" -T fields -e sip.Call-ID

# 5. Verify if packets for both A-leg and B-leg exist
tshark -r /tmp/test.pcap -Y "sip && ip.addr == 10.0.1.100"

# 6. Compare results with VoIPmonitor GUI
#    - If packets found in .pcap: VoIPmonitor software issue
#    - If packets missing from .pcap: Network mirroring issue

Troubleshoot Network and Interface Configuration

If tshark shows no traffic, it means the packets are not being delivered to the operating system correctly.

1. Check if the interface is UP

Ensure the network interface is active.

ip link show eth0

The output should contain the word UP. If it doesn't, bring it up with:

ip link set dev eth0 up
2. Check for Promiscuous Mode (for SPAN/RSPAN Mirrored Traffic)

Important: Promiscuous mode requirements depend on your traffic mirroring method:

  • SPAN/RSPAN (Layer 2 mirroring): The network interface must be in promiscuous mode. Mirrored packets retain their original MAC addresses, so the interface would normally ignore them. Promiscuous mode forces the interface to accept all packets regardless of destination MAC.
  • ERSPAN/GRE/TZSP/VXLAN (Layer 3 tunnels): Promiscuous mode is NOT required. These tunneling protocols encapsulate the mirrored traffic inside IP packets that are addressed directly to the sensor's IP address. The operating system receives these packets normally, and VoIPmonitor automatically decapsulates them to extract the inner SIP/RTP traffic.

For SPAN/RSPAN deployments, check the current promiscuous mode status:

ip link show eth0

Look for the PROMISC flag.

Enable promiscuous mode manually if needed:

ip link set eth0 promisc on

If this solves the problem, you should make the change permanent. The install-script.sh for the sensor usually attempts to do this, but it can fail.

3. Verify Your SPAN/Mirror/TAP Configuration

This is the most common cause of no traffic. Double-check your network switch or hardware tap configuration to ensure:

  • The correct source ports (where your PBX/SBC is connected) are being monitored.
  • The correct destination port (where your VoIPmonitor sensor is connected) is configured.
  • If you are monitoring traffic across different VLANs, ensure your mirror port is configured to carry all necessary VLAN tags (often called "trunk" mode).

Check the VoIPmonitor Configuration

If tshark sees traffic but VoIPmonitor does not, the problem is almost certainly in voipmonitor.conf.

1. Check the interface directive
Make sure the interface parameter in /etc/voipmonitor.conf exactly matches the interface where you see traffic with tshark. For example: interface = eth0.
2. Check the sipport directive
By default, VoIPmonitor only listens on port 5060. If your PBX uses a different port for SIP, you must add it. For example:
sipport = 5060,5080
3. Check for a restrictive filter
If you have a BPF filter configured, ensure it is not accidentally excluding the traffic you want to see. For debugging, try commenting out the filter line entirely and restarting the sensor.

Check GUI Capture Rules (Causing Call Stops)

If tshark sees SIP traffic and the sniffer configuration appears correct, but the probe stops processing calls or shows traffic only on the network interface, GUI capture rules may be the culprit.

Capture rules configured in the GUI can instruct the sniffer to ignore ("skip") all processing for matched calls. This includes calls matching specific IP addresses or telephone number prefixes.

1. Review existing capture rules
Navigate to GUI → Capture rules and examine all rules for any that might be blocking your traffic.
Look specifically for rules with the Skip option set to ON (displayed as "Skip: ON"). The Skip option instructs the sniffer to completely ignore matching calls (no files, RTP analysis, or CDR creation).
2. Test by temporarily removing all capture rules
To isolate the issue, first create a backup of your GUI configuration:
  • Navigate to Tools → Backup & Restore → Backup GUI → Configuration tables
  • This saves your current settings including capture rules
  • Delete all capture rules from the GUI
  • Click the Apply button to save changes
  • Reload the sniffer by clicking the green "reload sniffer" button in the control panel
  • Test if calls are now being processed correctly
  • If resolved, restore the configuration from the backup and systematically investigate the rules to identify the problematic one
3. Identify the problematic rule
  • After restoring your configuration, remove rules one at a time and reload the sniffer after each removal
  • When calls start being processed again, you have identified the problematic rule
  • Review the rule's match criteria (IP addresses, prefixes, direction) against your actual traffic pattern
  • Adjust the rule's conditions or Skip setting as needed
4. Verify rules are reloaded
After making changes to capture rules, remember that changes are not automatically applied to the running sniffer. You must click the "reload sniffer" button in the control panel, or the rules will continue using the previous configuration.

For more information on capture rules, see Capture_rules.

Troubleshoot MySQL/MariaDB Database Connection Errors

If you see "Connection refused (111)" errors or the sensor cannot connect to your database server, the issue is with the MySQL/MariaDB database connection configuration in /etc/voipmonitor.conf.

Error 111 (Connection refused) indicates that the database server is reachable on the network, but no MySQL/MariaDB service is listening on the specified port, or the connection is being blocked by a firewall. This commonly happens after migrations when the database server IP address has changed.

1. Check for database connection errors in sensor logs

Verify the specific error from the sensor process:

# For Debian/Ubuntu (systemd journal)
journalctl -u voipmonitor --since "1 hour ago" | grep -iE "mysql|database|connection|can.t connect"

# For systems using traditional syslog
tail -f /var/log/syslog | grep voipmonitor | grep -iE "mysql|database|connection"

# For CentOS/RHEL/AlmaLinux
tail -f /var/log/messages | grep voipmonitor | grep -iE "mysql|database|connection"

Look for errors like:

  • Can't connect to MySQL server on '192.168.1.10' (111) - Connection refused (wrong host/port)
  • Access denied for user 'root'@'localhost' - Wrong username/password
  • Unknown database 'voipmonitor' - Wrong database name
2. Verify database connection parameters in voipmonitor.conf

Open /etc/voipmonitor.conf and check the MySQL connection settings:

# Database Connection Parameters
mysqlhost = 192.168.1.10       # IP address or hostname of MySQL/MariaDB server
mysqlport = 3306               # TCP port of the database server (default: 3306)
mysqlusername = root          # Database username
mysqlpassword = your_password  # Database password
mysqldatabase = voipmonitor     # Database name

Key points:

  • mysqlhost: Should be the IP address or hostname of the database server. After migration, this may have changed.
  • mysqlport: Port 3306 is the default, but your database might use a different port.
  • mysqlusername: Database user must have proper privileges.
  • mysqlpassword: Ensure there are no typos or special character issues (surround with single quotes if needed).
  • mysqldatabase: Database must exist on the server.
3. Test MySQL connectivity from the sensor host

Use the mysql command-line client to test if the database is reachable from the sensor:

# Test basic TCP connectivity (replace IP and port as needed)
nc -zv 192.168.1.10 3306

# Or using telnet
telnet 192.168.1.10 3306

If you see "Connection refused", the database service is not running or not listening on that port.

4. Test MySQL authentication using credentials from voipmonitor.conf

Use the same credentials configured in voipmonitor.conf to verify they work:

mysql -h 192.168.1.10 -P 3306 -u root -p'your_password' voipmonitor

Commands to run inside mysql client to verify:

-- Check if connected correctly
SELECT USER(), CURRENT_USER();

-- Check database exists
SHOW DATABASES LIKE 'voipmonitor';

-- Test write access
USE voipmonitor;
SHOW TABLES;
EXIT;
5. Compare with a working sensor's configuration

If you have other sensors that successfully connect to the database, compare their configuration files:

# Compare database settings between working and failing sensors
diff <(grep -E "^mysql" /etc/voipmonitor.conf) <(grep -E "^mysql" /path/to/working/sensor/voipmonitor.conf)

Common discrepancies after migration:

  • Wrong database server IP address (mysqlhost)
  • Wrong database port (mysqlport)
  • Different password due to migration to new database server
  • Using localhost vs actual IP address
6. Check firewall and network connectivity

Ensure the sensor can reach the database server and the required port is open:

# Test network reachability
ping -c 4 192.168.1.10

# Check if MySQL port is reachable
nc -zv 192.168.1.10 3306

# Check firewall rules (if using firewalld)
firewall-cmd --list-ports

# Check firewall rules (if using iptables)
iptables -L -n | grep 3306

If the port is blocked, you may need to:

  • Open port 3306 in the firewall on the database server
  • Configure network ACLs or security groups (for cloud deployments)
  • Check VPN/SSH tunnel configurations
7. Verify MySQL/MariaDB service is running

On the database server, check if the service is active:

# Check MySQL/MariaDB service status
systemctl status mariadb    # or systemctl status mysql

# Restart service if needed
systemctl restart mariadb

# Check which port MySQL is listening on
ss -tulpn | grep mysql
# or
netstat -tulpn | grep mysql

MySQL should be listening on the interface and port specified in your voipmonitor.conf mysqlhost and mysqlport settings.

8. Apply configuration changes and restart the sensor

After correcting the database connection settings in /etc/voipmonitor.conf:

# Restart the VoIPmonitor service to apply changes
systemctl restart voipmonitor

# Alternatively, reload without full restart (if supported in your version)
echo 'reload' | nc 127.0.0.1 5029

# Verify the service started successfully
systemctl status voipmonitor

# Check logs for database connection confirmation
journalctl -u voipmonitor -n 20

Look for a successful database connection message in the logs, which typically appears within the first few seconds after startup.

9. Common Troubleshooting Scenarios

Scenario A: Database server IP changed after migration

  • Symptom: "Can't connect to MySQL server on '10.1.1.10' (111)"
  • Fix: Update mysqlhost in /etc/voipmonitor.conf to the new database server IP

Scenario B: Wrong MySQL username or password

  • Symptom: "Access denied for user 'user'@'host'"
  • Fix: Verify credentials match the database server's user permissions, update mysqlusername and mysqlpassword

Scenario C: Database service not running

  • Symptom: "Connection refused (111)" or "Connection timed out"
  • Fix: Start MySQL/MariaDB service on the database server: systemctl start mariadb

Scenario D: Firewall blocking port 3306

  • Symptom: "Connection refused" when testing with nc, but MySQL is running
  • Fix: Open port 3306 in firewall, or configure MySQL to allow connections from the sensor's IP in user table

Scenario E: Localhost vs remote connection confusion

  • Symptom: Connection works locally but fails from sensor
  • Fix: Ensure mysqlhost uses the actual IP address (not localhost or 127.0.0.1) if the sensor is on a different host

For more detailed information about all mysql* configuration parameters, see Sniffer_configuration#Database_Configuration.

Check for Storage Hardware Errors (HEAP FULL / packetbuffer Issues)

If the sensor is crashing with "HEAP FULL" errors or showing "packetbuffer: MEMORY IS FULL" messages, you must distinguish between actual storage hardware failures (requires disk replacement) and performance bottlenecks (requires tuning).

1. Check kernel message buffer for storage errors
dmesg -T | grep -iE "ext4-fs error|i/o error|nvram warning|ata.*failed|sda.*error|disk failure|smart error" | tail -50

Look for these hardware error indicators:

  • ext4-fs error - Filesystem corruption or disk failure
  • I/O error or BUG: soft lockup - Disk read/write failures
  • NVRAM WARNING: nvram_check: failed - RAID controller battery/capacitor issues
  • ata.*: FAILED - Hard drive SMART failure
  • Buffer I/O error - Disk unable to complete operations

If you see ANY of these errors:

  • The storage subsystem is failing and likely needs hardware replacement
  • Do not attempt performance tuning - replace the failed disk/RAID first
  • Check SMART status: smartctl -a /dev/sda
  • Check RAID health: cat /proc/mdstat or RAID controller tools
2. If dmesg is clean of errors → Performance Bottleneck

If the kernel logs show no storage errors, the issue is a performance bottleneck (disk too slow, network latency, etc.).

Check disk I/O performance:

# Current I/O wait (should be < 10% normally)
iostat -x 5

# Detailed disk stats
dstat -d

# Real-time disk latency
ioping -c 10 .

Check NFS latency (if using NFS storage):

# Test NFS read/write latency
time dd if=/dev/zero of=/var/spool/voipmonitor/testfile bs=1M count=100
time cat /var/spool/voipmonitor/testfile > /dev/null
rm /var/spool/voipmonitor/testfile

# Check NFS mount options
mount | grep nfs

Common performance solutions:

  • Use SSD/NVMe for VoIPmonitor spool directory
  • Ensure proper NIC queue settings for high-throughput NFS
  • Check network switch port configuration for NFS
  • Review Scaling guide for detailed optimization

See also IO_Measurement for comprehensive disk benchmarking tools.

Check for OOM (Out of Memory) Issues

If VoIPmonitor suddenly stops processing CDRs and a service restart temporarily restores functionality, the system may be experiencing OOM (Out of Memory) killer events. The Linux OOM killer terminates processes when available RAM is exhausted, and MySQL (mysqld) is a common target due to its memory-intensive nature.

1. Check for OOM killer events in kernel logs
# For Debian/Ubuntu
grep -i "out of memory\|killed process" /var/log/syslog | tail -20

# For CentOS/RHEL/AlmaLinux
grep -i "out of memory\|killed process" /var/log/messages | tail -20

# Also check dmesg:
dmesg | grep -i "killed process" | tail -10

Typical OOM killer messages look like:

Out of memory: Kill process 1234 (mysqld) score 123 or sacrifice child
Killed process 1234 (mysqld) total-vm: 12345678kB, anon-rss: 1234567kB
2. Monitor current memory usage
# Check available memory (look for low 'available' or 'free' values)
free -h

# Check per-process memory usage (sorted by RSS)
ps aux --sort=-%mem | head -15

# Check MySQL memory usage in bytes
cat /proc/$(pgrep mysqld)/status | grep -E "VmSize|VmRSS"

Warning signs:

  • Available memory consistently below 500MB during operation
  • MySQL consuming most of the available RAM
  • Swap usage near 100% (if swap is enabled)
  • Frequent process restarts without clear error messages
3. First Fix
Check and correct innodb_buffer_pool_size:

Before upgrading hardware, verify that innodb_buffer_pool_size is not set too high. This is a common cause of OOM incidents. If MySQL/MariaDB is consuming most of the available RAM, the buffer pool size is likely configured incorrectly for your system.

Calculate the correct buffer pool size: For a server running both VoIPmonitor and MySQL on the same host:

Formula: innodb_buffer_pool_size = (Total RAM - VoIPmonitor memory - OS & services overhead - safety margin) / 2

Example for a 32GB server:
- Total RAM: 32GB
- VoIPmonitor process memory (check with ps aux): 2GB
- OS + other services overhead: 2GB
- Safety margin: ~25-30% of remaining RAM for other internal buffers

Calculation:
Available for buffer pool = 32GB - 2GB - 2GB = 28GB
Recommended innodb_buffer_pool_size = 14G (approximately 50% of available memory)

Edit the MariaDB configuration file:

# Common locations: /etc/mysql/my.cnf, /etc/mysql/mariadb.conf.d/50-server.cnf, /etc/my.cnf.d/

innodb_buffer_pool_size = 14G  # Adjust based on your calculation

Restart MariaDB to apply:

systemctl restart mariadb  # or systemctl restart mysql

If the OOM events stop after correcting innodb_buffer_pool_size, no hardware upgrade is needed.

4. Second Fix
Reduce VoIPmonitor buffer memory usage:

In addition to MySQL memory consumption, VoIPmonitor itself allocates significant memory for packet buffers. The total buffer memory used by VoIPmonitor is calculated based on:

VoIPmonitor Buffer Memory Calculation:

  • ringbuffer: Ring buffer size in MB per interface (default: 50MB, recommended ≥500MB for >100 Mbit traffic)
  • max_buffer_mem: Maximum buffer memory limit in MB (default: 2000MB)
  • Number of sniffing interfaces: Each interface gets its own ringbuffer allocation
  • Total formula: Approximate total = (ringbuffer × number of interfaces) + max_buffer_mem

If you are monitoring multiple interfaces (e.g., interface = eth0,eth1,eth2), each interface uses a separate ringbuffer. With the default ringbuffer of 50MB and 3 interfaces, that's 150MB plus max_buffer_mem of 2000MB, totaling approximately 2150MB.

To reduce VoIPmonitor memory usage:

Edit /etc/voipmonitor.conf and decrease buffer settings:

# Reduce ringbuffer for each interface (e.g., from 50 to 20)
ringbuffer = 20

# Reduce maximum buffer memory (e.g., from 2000 to 1000)
max_buffer_mem = 1000

# Alternatively, reduce the number of sniffing interfaces if not all are needed
interface = eth0,eth1  # Instead of eth0,eth1,eth2,eth3

After making changes, restart the VoIPmonitor service:

systemctl restart voipmonitor

Important notes:

  • Reducing ringbuffer may increase packet loss during traffic spikes
  • Reducing max_buffer_mem affects how many packets can be buffered before being written to disk
  • Monitor packet loss statistics in the GUI after reducing buffers to ensure acceptable performance
5. Solution
Increase physical memory (if buffer tuning is insufficient):

If correcting both MySQL and VoIPmonitor buffer settings does not resolve the OOM issues, upgrade the server's physical RAM. After upgrading:

  • Verify memory improvements with free -h
  • Recalculate and adjust innodb_buffer_pool_size to utilize the additional memory
  • Re-tune ringbuffer and max_buffer_mem for the new memory capacity
  • Monitor for several days to ensure OOM events stop

Sensor Upgrade Fails with "Permission denied" from /tmp

If the sensor upgrade process fails with "Permission denied" errors when executing scripts from the /tmp directory, or the service fails to restart after upgrade, the /tmp partition may be mounted with the noexec flag.

The noexec mount option prevents execution of any script or binary from the /tmp directory for security reasons. However, the VoIPmonitor sensor upgrade process uses /tmp for temporary script execution.

1. Check the mount options for /tmp
mount | grep /tmp

Look for the noexec flag in the mount options. Output will show something like:

/dev/sda2 on /tmp type ext4 rw,relatime,noexec,nosuid,nodev
2. Remount /tmp without noexec (temporary fix)
mount -o remount,exec /tmp

Verify the change:

mount | grep /tmp

The output should no longer contain noexec.

3. Make the change permanent (edit /etc/fstab)

Open the /etc/fstab file and locate the line corresponding to the /tmp mount point. Remove the noexec option from that line.

nano /etc/fstab

Example:

# Before:
/dev/sda2  /tmp  ext4  rw,relatime,noexec,nosuid,nodev  0 0

# After (remove noexec):
/dev/sda2  /tmp  ext4  rw,relatime,nosuid,nodev  0 0

If /tmp is a separate partition, you may need to remount it for changes to take effect:

mount -o remount /tmp
4. Re-run the sensor upgrade

After fixing the mount options, retry the sensor upgrade process.

Check VoIPmonitor Logs for General Errors

After addressing the specific issues above, check the system logs for other error messages from the sensor process that may reveal additional problems.

# For Debian/Ubuntu
tail -f /var/log/syslog | grep voipmonitor

# For CentOS/RHEL/AlmaLinux
tail -f /var/log/messages | grep voipmonitor

Look for errors like:

  • "pcap_open_live(eth0) error: eth0: No such device" (Wrong interface name)
  • "Permission denied" (The sensor is not running with sufficient privileges)
  • Messages about connection issues (see Troubleshoot MySQL/MariaDB Database Connection Errors)
  • Messages about dropping packets

Benign Database Errors When Features Are Disabled

Some VoIPmonitor features may generate harmless database errors when those features are not enabled in your configuration. These errors are benign (cause no harm to the system) and can be safely ignored.

Common Benign Error: Missing Tables

If you see MySQL errors stating that a table does not exist (e.g., "Table 'voipmonitor.ss7' doesn't exist") even though the corresponding feature is disabled in your configuration, this is expected behavior.

Common examples
  • Errors about the ss7 table when ss7 = no in voipmonitor.conf
  • Errors about the register_failed, register_state, or sip_msg tables when those features are disabled
  • Other similar errors for optional features that are not enabled

Solution: Ignore or Suppress in Monitoring

Since these errors indicate that a feature is simply not active, they do not impact system functionality. The recommended approach is:

  1. Do not change the configuration to fix these errors
  2. Add monitoring exceptions to suppress warnings for table-not-found errors (MySQL error code 1146)
  3. Configure alerting systems to exclude these specific SQL errors from notifications

This prevents alert noise while keeping your logs intact for real issues that require attention.

When to Take Action

You only need to take action in the following situations:

  • If you actually want to use the feature (enable the corresponding configuration option)
  • If errors persist about tables for features that are explicitly enabled in voipmonitor.conf

Otherwise, these database errors are simply informational and confirm that optional features remain inactive as configured.

Appendix: tshark Display Filter Syntax for SIP

When using tshark to analyze SIP traffic, it is important to use the correct Wireshark display filter syntax. Below are common filter examples:

Basic SIP Filters

# Show all SIP INVITE messages
tshark -r capture.pcap -Y "sip.Method == INVITE"

# Show all SIP messages (any method)
tshark -r capture.pcap -Y "sip"

# Show SIP and RTP traffic
tshark -r capture.pcap -Y "sip || rtp"

Search for Specific Phone Number or Text

# Find calls containing a specific phone number (e.g., 5551234567)
tshark -r capture.pcap -Y 'sip contains "5551234567"'

# Find INVITE messages for a specific number
tshark -r capture.pcap -Y 'sip.Method == INVITE && sip contains "5551234567"'

Extract Call-ID from Matching Calls

# Get Call-ID for calls matching a phone number
tshark -r capture.pcap -Y 'sip.Method == INVITE && sip contains "5551234567"' -T fields -e sip.Call-ID

# Get Call-ID along with From and To headers
tshark -r capture.pcap -Y 'sip.Method == INVITE' -T fields -e sip.Call-ID -e sip.from.user -e sip.to.user

Filter by IP Address

# SIP traffic from a specific source IP
tshark -r capture.pcap -Y "sip && ip.src == 192.168.1.100"

# SIP traffic between two hosts
tshark -r capture.pcap -Y "sip && ip.addr == 192.168.1.100 && ip.addr == 10.0.0.50"

Filter by SIP Response Code

# Show all 200 OK responses
tshark -r capture.pcap -Y "sip.Status-Code == 200"

# Show all 4xx and 5xx error responses
tshark -r capture.pcap -Y "sip.Status-Code >= 400"

# Show 486 Busy Here responses
tshark -r capture.pcap -Y "sip.Status-Code == 486"

Important Syntax Notes

  • Field names are case-sensitive: Use sip.Method, sip.Call-ID, sip.Status-Code (not sip.method or sip.call-id)
  • String matching uses contains: Use sip contains "text" (not sip.contains())
  • Use double quotes for strings: sip contains "number" (not single quotes)
  • Boolean operators: Use && (and), || (or), ! (not)

For a complete reference, see the Wireshark SIP Display Filter Reference.

AI Summary for RAG

Summary: This document provides a troubleshooting guide for when the VoIPmonitor sensor is not capturing any calls. The first section covers verifying the service is running correctly using systemctl status and ps, including troubleshooting for when the service fails to start with "binary not found" error after a crash (check if the binary has been renamed with an underscore suffix, rename it back with mv /usr/local/sbin/voipmonitor_ /usr/local/sbin/voipmonitor), and a specific procedure for sensors that become unresponsive after GUI updates (execute killall voipmonitor, systemctl stop voipmonitor, and systemctl start voipmonitor). The second section covers using tshark to confirm if SIP/RTP traffic is actually arriving at the server's network interface. The third section covers network-level issues, including an important distinction between Layer 2 mirroring (SPAN/RSPAN) which requires promiscuous mode, and Layer 3 tunneling (ERSPAN/GRE/TZSP/VXLAN) which does NOT require promiscuous mode. The fourth section focuses on checking the voipmonitor.conf file for common misconfigurations like the interface, sipport, or filter parameters. The fifth section addresses GUI capture rules with the "Skip" option that can cause probes to stop processing calls. The sixth section is a comprehensive guide for troubleshooting MySQL/MariaDB database connection errors, specifically "Connection refused (111)" errors. The seventh section explains how to diagnose HEAP FULL / packetbuffer MEMORY IS FULL errors by checking kernel message buffer for storage hardware errors. The eighth section explains how to diagnose OOM (Out of Memory) killer events and provides fixes including correcting innodb_buffer_pool_size and reducing VoIPmonitor buffer settings (ringbuffer, max_buffer_mem). The ninth section addresses sensor upgrade failures with "Permission denied" errors from /tmp due to the noexec mount flag. The tenth section explains benign database errors that occur when optional features are disabled. The Appendix provides correct tshark display filter syntax for analyzing SIP traffic. Keywords: troubleshooting, no calls, not sniffing, no data, no CDRs, tshark, wireshark, promiscuous mode, promisc, ifconfig, ip link, SPAN, RSPAN, ERSPAN, GRE, TZSP, VXLAN, port mirroring, voipmonitor.conf, interface, sipport, filter, capture rules, Skip ON, GUI capture rules, reload sniffer, backup and restore, syslog, logs, permission denied, display filter, sip.Method, sip.Call-ID, sip.Status-Code, sip contains, OOM, out of memory, OOM killer, killed process, mysqld killed, free -h, memory usage, dmesg, swap, RAM upgrade, innodb_buffer_pool_size, GUI update, sensor update, buffer pool calculation, innodb_buffer_pool too high, correct buffer pool size, calculate innodb_buffer_pool, killall, sensor unresponsive, service fails to start after update, /tmp, noexec, mount, fstab, upgrade fails, permission denied from tmp, sensor upgrade permission denied, tmp noexec flag, remount tmp exec, HEAP FULL, packetbuffer MEMORY IS FULL, dmesg -T, ext4-fs error, I/O error, NVRAM WARNING, storage hardware errors, disk failure, smart error, ata failed, buffer I/O error, smartctl, mdstat, RAID health, iostat, dstat, ioping, NFS latency, disk I/O performance, iowait, performance bottleneck, hardware failure vs performance, binary not found, service fails to start after crash, voipmonitor binary renaming, voipmonitor_ underscore, watchdog crash, binary renamed with underscore, mv voipmonitor_ voipmonitor, ls -l /usr/local/sbin/voipmonitor_, ringbuffer, max_buffer_mem, voipmonitor buffer memory, reduce voipmonitor memory, voipmonitor buffer calculation, sniffer buffers, packetbuffer, ring buffer size, maximum buffer memory, voipmonitor memory settings, benign database errors, harmless sql errors, table does not exist, ss7 table not found, register_failed table, monitoring exceptions, ignore mysql errors, error code 1146, optional features disabled, ss7 disabled, suppress warnings Key Questions:

  • Why is VoIPmonitor not recording any calls?
  • VoIPmonitor service fails to start after crash with binary not found error, what to do?
  • How do I fix voipmonitor binary not found error?
  • Where is the voipmonitor binary located?
  • Why is the voipmonitor binary renamed with underscore?
  • How can I check if VoIP traffic is reaching my sensor server?
  • What command can I use to see live SIP traffic on the command line?
  • How do I enable promiscuous mode on my network card?
  • SS7 table does not exist error, what should I do?
  • MySQL error table does not exist when feature is disabled, is it harmful?
  • Should I fix database errors about missing tables for disabled features?
  • How do I suppress benign MySQL error warnings in monitoring?
  • What are harmless errors in VoIPmonitor logs?
  • Table 1146 error in voipmonitor logs, is this a problem?
  • Why do I see errors about register_failed table?
  • Do I need promiscuous mode for ERSPAN or GRE tunnels?
  • Does ERSPAN require promiscuous mode on the receiving interface?
  • VoIPmonitor is running but I have no new calls in the GUI, what should I check first?
  • Where can I find the log files for the VoIPmonitor sniffer?
  • What are the most common reasons for VoIPmonitor not capturing data?
  • How do I filter tshark output for SIP INVITE messages?
  • What is the correct tshark filter syntax to find a specific phone number?
  • How do I extract Call-ID from a pcap file using tshark?
  • What tshark filter shows all SIP 4xx and 5xx error responses?
  • Why is my VoIPmonitor probe stopping processing calls even though network traffic is visible?
  • What should I check if the probe sees SIP packets on the interface but processes no calls?
  • How do GUI capture rules affect call processing?
  • What does the "Skip" option in capture rules do?
  • How do I troubleshoot capture rules that are blocking calls?
  • VoIPmonitor server stops processing CDRs and needs restart. What could be wrong?
  • Why does sensor upgrade fail with permission denied errors from /tmp?
  • How do I fix noexec flag on /tmp directory?
  • VoIPmonitor permission denied when upgrading sensor, what to do?
  • How do I check mount options for /tmp partition?
  • What command checks if /tmp has noexec flag?
  • How to remove noexec from /tmp mount point?
  • Sensor upgrade fails in tmp directory, why?
  • Why does MySQL crash and restart on my VoIPmonitor server?
  • How do I check for OOM killer events in Linux?
  • What does the error "Out of memory: Kill process" mean?
  • How can I monitor memory usage on my VoIPmonitor server?
  • What command shows available memory in Linux?
  • How do I fix OOM killer issues on VoIPmonitor?
  • Why is mysqld getting killed on my system?
  • How do I calculate the correct innodb_buffer_pool_size for VoIPmonitor?
  • What is the formula for innodb_buffer_pool_size on a shared server?
  • My innodb_buffer_pool_size is too high, how do I fix OOM issues?
  • What should innodb_buffer_pool_size be set to on a 32GB server?
  • Does MySQL innodb_buffer_pool_size cause OOM killer?
  • Sensor becomes unresponsive after GUI update, what should I do?
  • How do I restart a sensor service that fails to start after GUI update?
  • What is the fix for sensor service not starting after web GUI update?
  • Why is my sensor service stuck after updating through the GUI?
  • How to fix unresponsive sensor after GUI upgrade using killall?
  • Sensor service fails after GUI upgrade, what commands to run?
  • How do I force kill all voipmonitor processes?
  • VoIPmonitor crashes with HEAP FULL error, what should I check?
  • sniffer crashes with packetbuffer MEMORY IS FULL messages, how to fix?
  • How do I check for disk hardware errors in Linux?
  • What command shows storage errors in the kernel buffer?
  • How to distinguish between disk hardware failure vs performance bottleneck?
  • What are the signs of a failing hard drive in dmesg?
  • How do I check SMART status of a hard drive?
  • What does ext4-fs error mean in dmesg?
  • What is an I/O error in kernel logs?
  • What is NVRAM WARNING on RAID controller?
  • How do I check disk I/O performance on Linux?
  • How to measure NFS latency for VoIPmonitor?
  • What is iostat command and how do I use it?
  • How to test disk speed with ioping?
  • Should I replace disk or tune settings for HEAP FULL errors?
  • Voipmonitor sensor crashing with HEAP FULL, first diagnostic step?