GUI troubleshooting: Difference between revisions

From VoIPmonitor.org
(Fix unclosed code tag)
(Add spool directory ownership fix for GUI loading issues)
 
(42 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:GUI manual]]
= GUI Troubleshooting =


This page provides troubleshooting tips and debugging techniques for the VoIPmonitor web GUI.
This guide covers common VoIPmonitor GUI issues organized by symptom category.


== GUI Debug Mode ==
== Quick Navigation ==


The GUI debug mode allows you to see SQL queries and other debugging information directly in your browser's Developer Console.
{| class="wikitable"
! Category !! Common Issues
|-
| [[#Access Issues|Access Issues]] || HTTP 500, blank screen, single user cannot access
|-
| [[#No Data Issues|No Data Issues]] || No CDR for today, empty dashboard, missing calls
|-
| [[#Database Issues|Database Issues]] || Timeouts, corruption, connections, schema errors
|-
| [[#GUI Upgrade Issues|GUI Upgrade Issues]] || Cannot login, blank screen, VM Binary error
|-
| [[#Permission Issues|Permission Issues]] || Ownership errors, NAS access, binary execution
|-
| [[#IonCube and PHP Issues|IonCube/PHP Issues]] || Loader errors, temp directory, PHP version
|-
| [[#Other Issues|Other Issues]] || Timezone, fax, attachments, RRD graphs
|}


=== Enabling Debug Mode ===
== Access Issues ==


To enable debug mode in the VoIPmonitor web GUI, '''add the parameter <code>?debug=31415</code> to the end of any GUI URL'''. For example:
=== HTTP 500 Error ===


<code>http://your-server/voipmon/admin.php?debug=31415</code>
'''Client-side steps (try first):'''
# Different browser or incognito mode
# Clear browser cache (Ctrl+Shift+Delete)
# Disable browser extensions
# Try from a different network


This enables the following features:
'''Server-side diagnosis:'''
* SQL queries executed by the GUI are logged to the browser's Developer Console
 
* Additional debugging information is displayed for dashboard panels and charts
<syntaxhighlight lang="bash">
* Performance timing and query execution details become visible
# Check Apache error log
tail -100 /var/log/apache2/error.log    # Debian/Ubuntu
tail -100 /var/log/httpd/error_log      # RHEL/CentOS
 
# Check PHP-FPM log
tail -100 /var/log/php-fpm/www-error.log
 
# Check SELinux
getenforce
# If "Enforcing", try temporarily: setenforce 0
</syntaxhighlight>
 
{{Tip|For detailed SQL query debugging, add <code>?debug=31415</code> to any GUI URL and check browser console (F12).}}


=== Finding SQL Queries for Dashboard Panels ===


To see the exact SQL query executed by a dashboard panel:


# Add <code>?debug=31415</code> to your GUI URL and navigate to the dashboard
=== Firefox/Waterfox: Blank Page or Hang on Login ===
# Open your browser's Developer Tools (press F12 or Ctrl+Shift+I)
# Switch to the '''Console''' tab
# Interact with the dashboard (e.g., refresh, change time range, or hover over panels)
# The SQL queries will be printed to the console log


The queries appear in the console in the order the panels are rendered. If you need to isolate a specific panel, hover over it or interact with its filters after loading the page - this often triggers a re-query which will appear as a new entry in the console.
'''Firefox/Waterfox: Blank Page or Hang on Login'''


=== Disabling Debug Mode ===
If the Web GUI shows a blank page or hangs during login, but works correctly in Chrome/Edge, the cause is typically a browser extension conflict.


Simply remove the <code>?debug=31415</code> parameter from the URL, or navigate to any GUI page without it. Debug mode is not persistent and must be re-enabled each time by adding the URL parameter.
'''Diagnosis:'''
* Issue occurs in Firefox/Waterfox but not Chrome/Edge
* Works when Developer Tools (F12) is open
* Persists in private mode and through SSH tunnels


== GUI Upgrade Issues ==
'''Solution:'''
# In Firefox, navigate to '''about:addons'''
# Select Extensions tab and '''disable all extensions'''
# Close and reopen Firefox completely
# Attempt to log in to the GUI
# If successful, one extension is the cause. Re-enable extensions one by one (or in pairs) restarting Firefox and testing after each change to identify the specific culprit
=== Single User Cannot Access ===
 
If one user cannot access GUI while others can:


The following are common issues that may occur during GUI upgrades and their solutions.
# '''Check IP whitelist''': User Management > edit user > "Access from IPs" field
# '''Check network path''': Compare user's route vs working users
# '''Capture traffic''': <syntaxhighlight lang="bash" inline>tcpdump -i eth0 host USER_IP -w /tmp/debug.pcap</syntaxhighlight>


=== VM Binary (binary missing) Error ===
=== Blank Screen After Upgrade ===


If you encounter an error message indicating "VM Binary (binary missing)" during or after a GUI upgrade, this indicates that the GUI application files were not completely updated. Perform a forced CLI upgrade to resolve this issue:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Log in to the GUI host as root
# Check for conflicting PEAR file
# Navigate to the GUI installation directory (default is /var/www/html)
ls -la /usr/share/pear/constants.php
cd /var/www/html
# If exists, remove it:
rm /usr/share/pear/constants.php
 
# Check SELinux
getenforce
# If Enforcing, temporarily disable: setenforce 0


# Execute the forced upgrade command
# Clear browser cache
php php/run.php upgrade -f
# Press Ctrl+F5 in browser
</syntaxhighlight>
</syntaxhighlight>
The <code>-f</code> flag forces a complete upgrade, which updates any missing or corrupt GUI binaries.


=== Blank Screen with JavaScript ReferenceError After Update ===
== No Data Issues ==


If you can log in to the GUI after an update but are presented with a blank screen, and the browser's JavaScript console shows an error like:
=== No CDR or Dashboard Data for Current Day ===


<code>ReferenceError: _AuditActivity_download_wav is not defined</code>
'''Step 1: Check sensor status'''


This is typically caused by a conflicting PEAR file that was not removed during the upgrade. The fix is simple:
Navigate to '''Settings > Sensors''' in GUI:
* '''Status UP''' - Sensor connected, proceed to Step 2
* '''Status Down''' - Sensor disconnected, see [[#Sensor Down|Sensor Down]] below
 
'''Step 2: Generate debug log (if sensor UP)'''
 
Navigate to '''Tools > Generate Debug Log''' and share the link with VoIPmonitor support.
 
'''Step 3: Check common causes'''
 
{| class="wikitable"
! Cause !! Diagnosis !! Solution
|-
| Missing partition || <code>SHOW CREATE TABLE cdr;</code> - check partition for today's date || <code>ALTER TABLE cdr ADD PARTITION (PARTITION pYYYYMMDD VALUES LESS THAN (UNIX_TIMESTAMP('YYYY-MM-DD')));</code>
|-
| Timezone mismatch || GUI shows different time than DB || Settings > System Configuration > National > Timezone
|-
| CDR disabled || Check voipmonitor.conf || Ensure <code>cdr = yes</code>
|-
| Spool directory || Check <code>spooldir</code> path || Verify path exists and has correct permissions
|}
 
{{Note|If GUI shows yesterday's data but not today's, the most common cause is a missing database partition.}}
 
==== Sensor Down ====
 
<syntaxhighlight lang="bash">
# Check sensor service
systemctl status voipmonitor
 
# View recent logs
journalctl -u voipmonitor -n 500
 
# Check database connectivity
mysql -h DB_HOST -u voipmonitor -p -e "SELECT 1"
 
# Restart if needed
systemctl restart voipmonitor
</syntaxhighlight>
 
=== No Audio Playback ===
 
If QoS data is visible but no audio:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Remove the conflicting old PEAR constants file
# Check voipmonitor.conf
rm /usr/share/pear/constants.php
grep -E "^savertp|^savegraph" /etc/voipmonitor.conf


# Refresh your browser (Ctrl+Shift+R) to reload the GUI
# Should show:
# savertp = yes
# savegraph = yes (optional)
</syntaxhighlight>
</syntaxhighlight>


After removing this file and refreshing the browser, the GUI should load correctly. This issue occurs because the old <code>constants.php</code> file from the system's PEAR installation conflicts with VoIPmonitor's internal JavaScript definitions.
See [[Sniffer_configuration#RTP_and_Audio_Recording|RTP and Audio Recording]] for detailed configuration.
 
== Database Issues ==
 
=== GUI Queries Timeout (40-50 seconds) ===


== MySQL/MariaDB Database Corruption ==
'''MySQL/MariaDB tuning:'''


If the Web GUI fails to start and logs show MySQL/MariaDB database errors (such as corrupted tables, missing files, or startup failures), this indicates database corruption. This can occur after manual file deletion, disk failures, or improper MySQL shutdown procedures.
<syntaxhighlight lang="ini">
# /etc/mysql/mysql.conf.d/mysqld.cnf or /etc/my.cnf.d/server.cnf
 
[mysqld]
# Set to 50-70% of available RAM
innodb_buffer_pool_size = 4G
 
# Reduce disk I/O (slight durability tradeoff)
innodb_flush_log_at_trx_commit = 2
 
# Increase connection timeout
wait_timeout = 28800
interactive_timeout = 28800
</syntaxhighlight>


=== Symptoms ===
'''Apache mod_fcgid timeout:'''


* Web GUI displays database connection errors or shows a blank page
If you see "server side error - check your http server error log. - connection to the web server was lost / interrupted":
* MySQL/MariaDB service fails to start or immediately crashes
* Error messages in MySQL logs indicating corrupted tables or missing database files
* CDR queries return empty results or throw SQL errors


=== Diagnosis ===
<syntaxhighlight lang="apache">
# In httpd.conf or apache2.conf
<IfModule mod_fcgid.c>
    FcgidIdleTimeout 900
    FcgidProcessLifeTime 7200
    FcgidConnectTimeout 300
    FcgidIOTimeout 900
</IfModule>
</syntaxhighlight>


First, check the MySQL/MariaDB service status:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Check if MySQL/MariaDB is running
systemctl restart apache2  # or httpd
systemctl status mysql
</syntaxhighlight>
# or
 
systemctl status mariadb
=== Too Many Connections ===


# View MySQL error logs for corruption indicators
<syntaxhighlight lang="sql">
tail -100 /var/log/mysql/error.log
-- Check current connections
# or
SHOW STATUS LIKE 'Threads_connected';
tail -100 /var/log/mariadb/mariadb.log
SHOW VARIABLES LIKE 'max_connections';
 
-- Increase limit (temporary)
SET GLOBAL max_connections = 500;
 
-- Permanent: add to my.cnf
-- max_connections = 500
</syntaxhighlight>
</syntaxhighlight>


Look for error messages such as:
=== MySQL Swap Memory Warning ===
* <code>Table is marked as crashed</code>
 
* <code>InnoDB: Database page corruption</code>
If you see swap memory warning on GUI login:
* <code>Incorrect key file</code>
 
* <code>Can't open file</code>
* '''Less than 50 MB swap''' - Safe to ignore, minor performance impact
* '''Hundreds of MB or GB''' - Investigate memory usage, consider increasing RAM or reducing innodb_buffer_pool_size


=== Solution: Restore from PCAP Files (Recommended) ===
<syntaxhighlight lang="bash">
# Check MySQL memory usage
ps aux | grep mysqld
free -h
</syntaxhighlight>


If the database is corrupted, a complete restore is necessary. The recommended approach is to '''restore CDR data from the pcap files stored in the spool directory''' into a new, clean database. This preserves your call recordings and metadata while fixing the corruption issue.
=== Unknown Column in Field List ===


'''Warning:''' This procedure requires stopping the VoIPmonitor services and may take significant time depending on the amount of data to restore.
If GUI shows "Unknown column [table].[column] in 'field list'":


==== Step 1: Stop VoIPmonitor Services ====
Stop all VoIPmonitor services to prevent further database corruption:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Stop the sniffer service
# Method 1: URL parameter (fastest)
systemctl stop voipmonitor
# Add ?check_tables=1 to GUI URL:
# http://your-gui-ip/admin.php?check_tables=1


# Stop sniffer manager (if running)
# Method 2: Command line
systemctl stop voipmonitor-manager
cd /var/www/html
php php/run.php dbcheck


# Stop any other VoIPmonitor services
# Method 3: Restart sensor (if disable_dbupgradecheck=no)
systemctl stop voipmonitor-gui
systemctl restart voipmonitor
</syntaxhighlight>
</syntaxhighlight>


==== Step 2: Backup the Corrupted Database ====
=== Database Corruption ===
Although corrupted, create a backup of the existing database for troubleshooting purposes:
 
'''Recovery methods (try in order):'''
 
'''Method 1: Table repair'''
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Stop MySQL/MariaDB service
mysqlcheck -u root -p --auto-repair voipmonitor
systemctl stop mysql
</syntaxhighlight>
 
'''Method 2: Drop and recreate specific table'''
<syntaxhighlight lang="sql">
-- Backup structure first
SHOW CREATE TABLE problematic_table;


# Create a backup of the MySQL data directory
-- Drop and let sensor recreate
sudo cp -a /var/lib/mysql /var/lib/mysql-backup-corrupted
DROP TABLE problematic_table;
-- Restart sensor: systemctl restart voipmonitor
</syntaxhighlight>


# If the service won't stop, use physical backup:
'''Method 3: InnoDB force recovery'''
sudo cp -a /var/lib/mysql /var/lib/mysql-backup-corrupted
<syntaxhighlight lang="ini">
# Add to my.cnf [mysqld] section:
innodb_force_recovery = 1
# Restart MySQL, export data, remove option, reimport
</syntaxhighlight>
</syntaxhighlight>


==== Step 3: Remove the Corrupted Database ====
{{Warning|After using innodb_force_recovery, remove the option before resuming normal operations. The database is read-only while this option is set.}}
Move or remove the corrupted database files to prepare for a fresh database:
<syntaxhighlight lang="bash">
# Remove the corrupted VoIPmonitor database directory
sudo rm -rf /var/lib/mysql/voipmonitor


# Alternatively, move it instead of deleting:
'''Method 4: PCAP restore'''
sudo mv /var/lib/mysql/voipmonitor /var/lib/mysql/voipmonitor.corrupted
</syntaxhighlight>


==== Step 4: Start MySQL/MariaDB Service ====
If PCAPs are preserved, drop database and let sensor reindex:
Restart the MySQL/MariaDB service:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Start MySQL/MariaDB
# Edit voipmonitor.conf
systemctl start mysql
reindex_all = yes  # (temporary)


# Verify the service is running
systemctl restart voipmonitor
systemctl status mysql
# Wait for reindexing to complete, then remove reindex_all
</syntaxhighlight>
</syntaxhighlight>


==== Step 5: Create a Fresh VoIPmonitor Database ====
See [[Database_troubleshooting]] for detailed recovery procedures.
Create a new empty database for VoIPmonitor:
 
<syntaxhighlight lang="bash">
=== MySQL 8.0 Issues ===
# Log in to MySQL as root
mysql -u root -p


# Run the following SQL commands:
'''SYSTEM_USER privilege error:'''
CREATE DATABASE voipmonitor;
<syntaxhighlight lang="sql">
CREATE USER 'voipmonitor'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT SYSTEM_USER ON *.* TO 'voipmonitor'@'localhost';
GRANT ALL PRIVILEGES ON voipmonitor.* TO 'voipmonitor'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'voipmonitor'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
FLUSH PRIVILEGES;
EXIT;
 
-- Also set:
SET GLOBAL log_bin_trust_function_creators = 1;
</syntaxhighlight>
</syntaxhighlight>


Replace <code>your_password_here</code> with a strong password.
'''MySQL 8.0.42 crashes:'''


==== Step 6: Restore CDRs from PCAP Files ====
{{Warning|MySQL 8.0.42 has known bugs causing VoIPmonitor crashes. Upgrade to 8.0.43 or later.}}
Instruct the sniffer to reprocess all PCAP files from the spool directory and populate the new database:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# 1. Verify your spool directory path
mysql --version
# Check voipmonitor.conf for the spooldir setting (default: /var/spool/voipmonitor)
# If 8.0.42:
grep "^spooldir" /etc/voipmonitor.conf
sudo apt install --only-upgrade mysql-server-8.0  # Debian/Ubuntu
sudo dnf update mysql-server                      # RHEL
</syntaxhighlight>
 
=== Managed Database: Primary Key Error ===


# 2. Clear the sniffer's manager socket for the restore process
For DigitalOcean, AWS RDS, Google Cloud SQL:
# This ensures clean communication with the sniffer
rm -f /tmp/vmsck


# 3. Start the sniffer in restore mode
<syntaxhighlight lang="sql">
# The sniffer will read all PCAP files from the spool directory
-- Disable in managed DB console or parameter group:
# and regenerate CDR records in the new database
sql_require_primary_key = OFF
voipmonitor --config-file /etc/voipmonitor.conf --readpcapdir /var/spool/voipmonitor
</syntaxhighlight>
</syntaxhighlight>


'''Note:''' The <code>--readpcapdir</code> parameter instructs the sniffer to process all PCAP files in the specified directory. This may take considerable time depending on the amount of historical data.
== GUI Upgrade Issues ==


==== Step 7: Monitor the Restore Process ====
=== Cannot Login After Upgrade ===
Monitor the restore progress:
<syntaxhighlight lang="bash">
# Monitor sniffer output for progress
# Press Ctrl+C to check status without stopping (if configured)
journalctl -u voipmonitor -f


# Alternatively, check the database for new CDR records
'''Reset password via database:'''
mysql -u root -p voipmonitor -e "SELECT COUNT(*) FROM cdr;"
<syntaxhighlight lang="sql">
UPDATE users SET password = MD5('newpassword') WHERE username = 'admin';
</syntaxhighlight>
</syntaxhighlight>


==== Step 8: Restart Normal Service ====
'''Redis session issue (login loop):'''
Once the restore is complete, restart the sniffer in normal operation mode:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Stop the restore process (Ctrl+C if running manually)
redis-cli FLUSHALL
# Then start the normal sniffer service
systemctl restart php-fpm
systemctl start voipmonitor
</syntaxhighlight>


# Verify the sniffer is running and capturing
=== VM Binary Error ===
systemctl status voipmonitor


# Test Web GUI access
<syntaxhighlight lang="bash">
# Navigate to http://your-server/ in your browser
cd /var/www/html
php php/run.php upgrade -f
</syntaxhighlight>
</syntaxhighlight>


=== Prevention: Database Backup Strategies ===
=== Invalid Compressed Data ===


To avoid future data loss due to database corruption:
Usually caused by incorrect web root ownership:
<syntaxhighlight lang="bash">
chown -R www-data:www-data /var/www/html  # Debian/Ubuntu
chown -R apache:apache /var/www/html      # RHEL/CentOS
</syntaxhighlight>
 
=== Unable to Remove Old Files ===


==== Automatic Filesystem Backup ===
Configure regular backups of the MySQL data directory:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Example: Daily backup using cron
# Fix tshark ownership
0 2 * * * /usr/bin/rsync -av --delete /var/lib/mysql/ /backup/mysql-$(date +\%Y\%m\%d)/
chown www-data:www-data /var/www/html/bin/tshark*
 
# Retry upgrade from GUI
</syntaxhighlight>
</syntaxhighlight>


==== MySQL Replication ===
=== Upgrade Not Visible ===
Set up MySQL master-slave replication for redundancy:
* See the [[Mysql_master-slave_replication_hints]] guide for detailed instructions
* This provides a real-time backup database that can be promoted if corruption occurs


==== VoIPmonitor Database Replication ===
Check internet connectivity from GUI server:
Use VoIPmonitor's built-in database backup mode (Redundant_database):
<syntaxhighlight lang="bash">
* This replicates CDR data to a secondary database server
curl -I https://www.voipmonitor.org
* No traditional MySQL replication required
ping www.voipmonitor.org
* Useful for GUI migrations and disaster recovery
</syntaxhighlight>


== IonCube Loader Issues ==
== Permission Issues ==


The VoIPmonitor GUI is protected with IonCube, which requires proper PHP configuration. Common issues include permission errors on temporary directories and security module interference.
=== Incorrect Ownership Error ===


=== Unable to create lock file / temp directory not writable ===
Often caused by missing execute permissions on binaries:
<syntaxhighlight lang="bash">
# Fix bin directory
chmod +x /var/www/html/bin/*


If you see errors like "Unable to create lock file" or "System temp directory check fails... not writable" from IonCube Loader, follow these troubleshooting steps:
# Verify
ls -la /var/www/html/bin/
</syntaxhighlight>


==== Step 1: Update the system and restart ====
=== NAS Spool Permission Denied ===


First, ensure your system packages are up to date:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Debian/Ubuntu
# Use ACLs (recommended)
sudo apt update && sudo apt upgrade -y
setfacl -R -m u:www-data:rwx /path/to/nas/spool


# RHEL/CentOS/AlmaLinux
# CRITICAL: Set on ALL parent directories too
sudo yum update -y
setfacl -m u:www-data:rx /NAS
# or
setfacl -m u:www-data:rx /NAS/voipmonitor
sudo dnf update -y


# Then restart the server
# Verify
sudo reboot
sudo -u www-data ls /path/to/nas/spool
</syntaxhighlight>
</syntaxhighlight>


==== Step 2: Check SELinux or AppArmor ====
=== SELinux Blocking mscgen (SIP Call Flow Diagrams) ===


Security modules like SELinux (default on RHEL/CentOS/Red Hat systems) or AppArmor (default on Ubuntu/Debian) can block IonCube from accessing temporary directories.
If SIP call flow diagram shows "convert msc to svg (mscgen): unknown error":


Check if SELinux is enabled:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Check current status
# Check SELinux denials
getenforce
ausearch -m avc -ts recent | grep mscgen
 
# Create policy module
grep mscgen /var/log/audit/audit.log | audit2allow -M mscgen_local
semodule -i mscgen_local.pp
</syntaxhighlight>


# Common values: Enforcing (active), Permissive (logging only), Disabled
== IonCube and PHP Issues ==


# To temporarily disable SELinux for testing:
=== Temp Directory Not Writable ===
sudo setenforce 0
</syntaxhighlight>


If disabling SELinux resolves the issue, you can permanently configure it:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Edit the SELinux configuration file
# Check and fix /tmp permissions
sudo nano /etc/selinux/config
ls -ld /tmp
chmod 1777 /tmp


# Change SELINUX= to either:
# Check SELinux
# SELINUX=permissive
getenforce
# or
# If Enforcing, try: setenforce 0
# SELINUX=disabled


# Then reboot the server
# Check systemd PrivateTmp
sudo reboot
systemctl show httpd | grep PrivateTmp
# If true, create override:
# /etc/systemd/system/httpd.service.d/privatetmp.conf
# [Service]
# PrivateTmp=false
</syntaxhighlight>
</syntaxhighlight>


Check if AppArmor is enabled:
=== PHP CLI vs Web Server Mismatch ===
 
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Check AppArmor status
# Test as web server user
sudo aa-status
sudo -u www-data php -r 'echo extension_loaded("ionCube Loader")?"yes":"no";'


# If AppArmor is running, temporarily disable individual profiles:
# Compare configs
sudo aa-disable /etc/apparmor.d/*php*
php --ini                    # CLI config
# Create phpinfo: echo '<?php phpinfo();' > /var/www/html/info.php
# Check "Loaded Configuration File" in browser
# Remove after: rm /var/www/html/info.php
</syntaxhighlight>


# Or disable it entirely for testing:
=== License Activation: Server Side Error - Forbidden ===
sudo systemctl stop apparmor
sudo systemctl disable apparmor
</syntaxhighlight>


==== Step 3: Check systemd PrivateTmp ====
This indicates ionCube PHP version incompatibility:


Some systemd service configurations use <code>PrivateTmp=true</code>, which creates a private temporary directory for each service. This can cause issues if the private tmp directory has restrictive permissions.
{| class="wikitable"
! GUI Version !! PHP Version
|-
| v26.37+ || PHP 8.3 supported
|-
| Older || PHP 8.2 or earlier required
|}


Check if your web server is using PrivateTmp:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# For Apache
# Check Apache error log
systemctl show httpd | grep PrivateTmp
tail -50 /var/log/apache2/error.log | grep -i ioncube
# or
systemctl show apache2 | grep PrivateTmp


# For PHP-FPM
# Solution: Either upgrade GUI to v26.37+ or downgrade PHP to 8.2
systemctl show php-fpm | grep PrivateTmp
</syntaxhighlight>
</syntaxhighlight>


If PrivateTmp is enabled (value=1), disable it in the service file:
== Other Issues ==
 
=== Invalid Timezone (GUI Inaccessible) ===
 
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo nano /etc/systemd/system/httpd.service
# Edit directly
# or
nano /var/www/html/config/configuration.php
sudo nano /etc/systemd/system/apache2.service


# Find the line PrivateTmp=true and change it to:
# Find and fix:
# PrivateTmp=false
define('TIMEZONE', 'UTC');  # Use valid timezone
define('SENSORS_TIMEZONE', 'UTC');


# Reload systemd and restart the service:
systemctl restart php-fpm
sudo systemctl daemon-reload
sudo systemctl restart httpd
# or
sudo systemctl restart apache2
</syntaxhighlight>
</syntaxhighlight>


==== Step 4: Verify PHP Temporary Directory Configuration ====
Valid timezones: <code>UTC</code>, <code>Europe/London</code>, <code>America/New_York</code>, <code>Europe/Berlin</code>, etc.


Check which temporary directory PHP is using:
=== Faxes Not Displayed ===


Create a PHP info file:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
echo '<?php phpinfo(); ?>' > /var/www/html/info.php
# Install libtiff-tools
apt-get install libtiff-tools    # Debian/Ubuntu
yum install libtiff-tools        # RHEL/CentOS
 
# Verify
which tiff2pdf
</syntaxhighlight>
</syntaxhighlight>


Visit <code>http://your-server-ip/info.php</code> in your browser and search for:
=== File Attachment Blocked ===
* <code>upload_tmp_dir</code>
* <code>sys_get_temp_dir</code>
* <code>session.save_path</code>


Ensure these directories are writable by the web server user:
Files like .xlsx, .docx are blocked for security. Compress to .zip or .gz:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Check ownership
zip archive.zip your_file.xlsx
ls -ld /tmp
</syntaxhighlight>
# or custom temp directory
ls -ld /var/www/tmp


# Fix ownership if needed
=== RRD Graph Errors After Hardware Change ===
sudo chown www-data:www-data /tmp  # Debian/Ubuntu
# or
sudo chown apache:apache /tmp      # CentOS/RHEL


# Fix permissions
<syntaxhighlight lang="bash">
sudo chmod 775 /tmp
# Delete corrupted RRD files
rm -rf /var/spool/voipmonitor/rrd/*
 
# Sensor will recreate them
systemctl restart voipmonitor
</syntaxhighlight>
</syntaxhighlight>


==== Step 5: Check <code>open_basedir</code> restrictions ====
=== /dev/shm Full (Session Logout Issues) ===
 
<syntaxhighlight lang="bash">
# Check usage
df -h /dev/shm
 
# Temporary increase
mount -o remount,size=1G /dev/shm
 
# Permanent: edit /etc/fstab
# tmpfs /dev/shm tmpfs defaults,size=1G 0 0
</syntaxhighlight>


If the above steps don't resolve the issue, check if PHP's <code>open_basedir</code> is restricting access to the temp directory:
=== Concurrent Calls Stats Error ===


Usually caused by duplicate cron entries:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Check open_basedir in php.ini
# Check for duplicates
grep open_basedir /etc/php/*/apache2/php.ini
grep "voipmonitor\|run.php" /etc/crontab
# or
 
grep open_basedir /etc/php.ini
# Comment out duplicates, keep only one
</syntaxhighlight>
</syntaxhighlight>


Ensure the temp directory is included in the list, e.g.:
=== TShark CVE Security Updates ===
<code>open_basedir = /var/www/html:/tmp</code>
 
The bundled tshark may have known CVEs. To update:


Clean up after troubleshooting:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
rm /var/www/html/info.php
cd /var/www/html/bin
 
# Download updated binary from Wireshark
wget https://www.wireshark.org/download/automated/linux64/tshark
chmod +x tshark
chown www-data:www-data tshark
</syntaxhighlight>
</syntaxhighlight>


== Alternative: MySQL General Log ==
=== Dashboard Edit Icon Grayed Out ===


If you need a persistent server-side log of all database queries (not just from the GUI), you can enable the MySQL general log:
User lacks edit permission. Grant via '''User Management''' > edit user > enable "Edit Dashboard" permission.


<syntaxhighlight lang="sql">
== GUI Not Loading (Spool Directory Ownership) ==
-- Enable general log
SET GLOBAL general_log = 'ON';


-- Perform actions in the GUI...
If the GUI is not loading or shows generic error messages, the cause may be incorrect ownership of the spool directory by the web server user.


-- Disable when done (important for performance)
<syntaxhighlight lang="bash">
SET GLOBAL general_log = 'OFF';
# Fix spool directory ownership
chown -R www-data:www-data /var/spool/voipmonitor    # Debian/Ubuntu
# OR
chown -R apache:apache /var/spool/voipmonitor        # RHEL/CentOS
</syntaxhighlight>
</syntaxhighlight>


The log file location is typically <code>/var/lib/mysql/hostname.log</code> or as defined in your MySQL configuration.
{{Note|The spool directory path is defined by the <code>spooldir</code> parameter in <code>/etc/voipmonitor.conf</code>. Use the correct path for your configuration.}}
 
 
 


== AI Summary for RAG ==
== AI Summary for RAG ==
'''Summary:''' This page covers GUI troubleshooting techniques including debug mode, MySQL/MariaDB database corruption restoration from PCAP files, upgrade issues (including blank screen with JavaScript errors and conflicting constants.php file), and IonCube Loader problems with temp directory permissions, SELinux, AppArmor, and systemd PrivateTmp.
 
'''Keywords:''' GUI troubleshooting, debug mode, MySQL corruption, MariaDB corruption, database restore, PCAP restore, CDR restore, IonCube, SELinux, AppArmor, PrivateTmp, temporary directory, permissions, open_basedir, upgrade issues, blank screen, JavaScript errors, constants.php, PEAR
'''Summary:''' VoIPmonitor GUI troubleshooting guide covering: (1) HTTP 500 errors - try client-side steps first (different browser, incognito, clear cache), then check Apache/PHP error logs and SELinux; (2) No CDR for current day - check sensor status in Settings > Sensors, generate debug log if UP, check partitions/timezone/cdr config if Down; (3) GUI debug mode - add ?debug=31415 to URL; (4) Database timeouts - tune innodb_buffer_pool_size (50-70% RAM), increase mod_fcgid timeouts; (5) Database corruption - use mysqlcheck, drop/recreate tables, or innodb_force_recovery; (6) GUI upgrade issues - reset password via database, fix ownership, run php php/run.php upgrade -f; (7) Permission errors - chmod +x bin/*, use setfacl for NAS; (8) IonCube errors - check SELinux, PHP version compatibility (GUI v26.37+ for PHP 8.3); (9) Schema errors - use ?check_tables=1 URL parameter.
 
'''Keywords:''' HTTP 500, no CDR, sensor status, debug mode, ?debug=31415, innodb_buffer_pool_size, MySQL tuning, database corruption, mysqlcheck, innodb_force_recovery, GUI upgrade, password reset, IonCube, SELinux, PHP 8.3, ?check_tables=1, NAS permissions, setfacl, mod_fcgid timeout, FcgidIOTimeout, mscgen, SIP call flow, tshark CVE, MySQL 8.0.42, SYSTEM_USER privilege, /dev/shm, timezone error, libtiff-tools, file attachment blocked
 
'''Key Questions:'''
'''Key Questions:'''
* How do I enable debug mode in the GUI?
* HTTP 500 error on GUI - what to try first?
* What should I do if the MySQL/MariaDB database is corrupted?
* No CDR or dashboard data for current day - how to diagnose?
* How do I restore CDR data from PCAP files?
* How to enable GUI debug mode?
* How do I fix "Unable to create lock file" errors from IonCube Loader?
* GUI queries timeout - how to tune MySQL?
* How do I check if SELinux or AppArmor is causing permission issues?
* Database corrupted - which recovery method to use?
* What is systemd PrivateTmp and how does it affect the GUI?
* Cannot login after GUI upgrade - how to reset password?
* How do I diagnose PHP temporary directory configuration problems?
* Permission errors with NAS spool - how to fix?
* Why is my GUI showing a blank screen with JavaScript ReferenceError after an update?
* IonCube temp directory errors - what causes them?
* How do I fix ReferenceError: _AuditActivity_download_wav is not defined after GUI upgrade?
* GUI shows "Unknown column in field list" - how to fix?
* SIP call flow diagram shows error - how to fix SELinux blocking?
* MySQL 8.0.42 causing crashes - what to do?
* License activation fails with Forbidden error - what causes it?

Latest revision as of 01:37, 10 January 2026

GUI Troubleshooting

This guide covers common VoIPmonitor GUI issues organized by symptom category.

Quick Navigation

Category Common Issues
Access Issues HTTP 500, blank screen, single user cannot access
No Data Issues No CDR for today, empty dashboard, missing calls
Database Issues Timeouts, corruption, connections, schema errors
GUI Upgrade Issues Cannot login, blank screen, VM Binary error
Permission Issues Ownership errors, NAS access, binary execution
IonCube/PHP Issues Loader errors, temp directory, PHP version
Other Issues Timezone, fax, attachments, RRD graphs

Access Issues

HTTP 500 Error

Client-side steps (try first):

  1. Different browser or incognito mode
  2. Clear browser cache (Ctrl+Shift+Delete)
  3. Disable browser extensions
  4. Try from a different network

Server-side diagnosis:

# Check Apache error log
tail -100 /var/log/apache2/error.log    # Debian/Ubuntu
tail -100 /var/log/httpd/error_log      # RHEL/CentOS

# Check PHP-FPM log
tail -100 /var/log/php-fpm/www-error.log

# Check SELinux
getenforce
# If "Enforcing", try temporarily: setenforce 0

💡 Tip:


Firefox/Waterfox: Blank Page or Hang on Login

Firefox/Waterfox: Blank Page or Hang on Login

If the Web GUI shows a blank page or hangs during login, but works correctly in Chrome/Edge, the cause is typically a browser extension conflict.

Diagnosis:

  • Issue occurs in Firefox/Waterfox but not Chrome/Edge
  • Works when Developer Tools (F12) is open
  • Persists in private mode and through SSH tunnels

Solution:

  1. In Firefox, navigate to about:addons
  2. Select Extensions tab and disable all extensions
  3. Close and reopen Firefox completely
  4. Attempt to log in to the GUI
  5. If successful, one extension is the cause. Re-enable extensions one by one (or in pairs) restarting Firefox and testing after each change to identify the specific culprit

Single User Cannot Access

If one user cannot access GUI while others can:

  1. Check IP whitelist: User Management > edit user > "Access from IPs" field
  2. Check network path: Compare user's route vs working users
  3. Capture traffic: tcpdump -i eth0 host USER_IP -w /tmp/debug.pcap

Blank Screen After Upgrade

# Check for conflicting PEAR file
ls -la /usr/share/pear/constants.php
# If exists, remove it:
rm /usr/share/pear/constants.php

# Check SELinux
getenforce
# If Enforcing, temporarily disable: setenforce 0

# Clear browser cache
# Press Ctrl+F5 in browser

No Data Issues

No CDR or Dashboard Data for Current Day

Step 1: Check sensor status

Navigate to Settings > Sensors in GUI:

  • Status UP - Sensor connected, proceed to Step 2
  • Status Down - Sensor disconnected, see Sensor Down below

Step 2: Generate debug log (if sensor UP)

Navigate to Tools > Generate Debug Log and share the link with VoIPmonitor support.

Step 3: Check common causes

Cause Diagnosis Solution
Missing partition SHOW CREATE TABLE cdr; - check partition for today's date ALTER TABLE cdr ADD PARTITION (PARTITION pYYYYMMDD VALUES LESS THAN (UNIX_TIMESTAMP('YYYY-MM-DD')));
Timezone mismatch GUI shows different time than DB Settings > System Configuration > National > Timezone
CDR disabled Check voipmonitor.conf Ensure cdr = yes
Spool directory Check spooldir path Verify path exists and has correct permissions

ℹ️ Note: If GUI shows yesterday's data but not today's, the most common cause is a missing database partition.

Sensor Down

# Check sensor service
systemctl status voipmonitor

# View recent logs
journalctl -u voipmonitor -n 500

# Check database connectivity
mysql -h DB_HOST -u voipmonitor -p -e "SELECT 1"

# Restart if needed
systemctl restart voipmonitor

No Audio Playback

If QoS data is visible but no audio:

# Check voipmonitor.conf
grep -E "^savertp|^savegraph" /etc/voipmonitor.conf

# Should show:
# savertp = yes
# savegraph = yes (optional)

See RTP and Audio Recording for detailed configuration.

Database Issues

GUI Queries Timeout (40-50 seconds)

MySQL/MariaDB tuning:

# /etc/mysql/mysql.conf.d/mysqld.cnf or /etc/my.cnf.d/server.cnf

[mysqld]
# Set to 50-70% of available RAM
innodb_buffer_pool_size = 4G

# Reduce disk I/O (slight durability tradeoff)
innodb_flush_log_at_trx_commit = 2

# Increase connection timeout
wait_timeout = 28800
interactive_timeout = 28800

Apache mod_fcgid timeout:

If you see "server side error - check your http server error log. - connection to the web server was lost / interrupted":

# In httpd.conf or apache2.conf
<IfModule mod_fcgid.c>
    FcgidIdleTimeout 900
    FcgidProcessLifeTime 7200
    FcgidConnectTimeout 300
    FcgidIOTimeout 900
</IfModule>
systemctl restart apache2  # or httpd

Too Many Connections

-- Check current connections
SHOW STATUS LIKE 'Threads_connected';
SHOW VARIABLES LIKE 'max_connections';

-- Increase limit (temporary)
SET GLOBAL max_connections = 500;

-- Permanent: add to my.cnf
-- max_connections = 500

MySQL Swap Memory Warning

If you see swap memory warning on GUI login:

  • Less than 50 MB swap - Safe to ignore, minor performance impact
  • Hundreds of MB or GB - Investigate memory usage, consider increasing RAM or reducing innodb_buffer_pool_size
# Check MySQL memory usage
ps aux | grep mysqld
free -h

Unknown Column in Field List

If GUI shows "Unknown column [table].[column] in 'field list'":

# Method 1: URL parameter (fastest)
# Add ?check_tables=1 to GUI URL:
# http://your-gui-ip/admin.php?check_tables=1

# Method 2: Command line
cd /var/www/html
php php/run.php dbcheck

# Method 3: Restart sensor (if disable_dbupgradecheck=no)
systemctl restart voipmonitor

Database Corruption

Recovery methods (try in order):

Method 1: Table repair

mysqlcheck -u root -p --auto-repair voipmonitor

Method 2: Drop and recreate specific table

-- Backup structure first
SHOW CREATE TABLE problematic_table;

-- Drop and let sensor recreate
DROP TABLE problematic_table;
-- Restart sensor: systemctl restart voipmonitor

Method 3: InnoDB force recovery

# Add to my.cnf [mysqld] section:
innodb_force_recovery = 1
# Restart MySQL, export data, remove option, reimport

⚠️ Warning: After using innodb_force_recovery, remove the option before resuming normal operations. The database is read-only while this option is set.

Method 4: PCAP restore

If PCAPs are preserved, drop database and let sensor reindex:

# Edit voipmonitor.conf
reindex_all = yes  # (temporary)

systemctl restart voipmonitor
# Wait for reindexing to complete, then remove reindex_all

See Database_troubleshooting for detailed recovery procedures.

MySQL 8.0 Issues

SYSTEM_USER privilege error:

GRANT SYSTEM_USER ON *.* TO 'voipmonitor'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'voipmonitor'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;

-- Also set:
SET GLOBAL log_bin_trust_function_creators = 1;

MySQL 8.0.42 crashes:

⚠️ Warning: MySQL 8.0.42 has known bugs causing VoIPmonitor crashes. Upgrade to 8.0.43 or later.

mysql --version
# If 8.0.42:
sudo apt install --only-upgrade mysql-server-8.0  # Debian/Ubuntu
sudo dnf update mysql-server                       # RHEL

Managed Database: Primary Key Error

For DigitalOcean, AWS RDS, Google Cloud SQL:

-- Disable in managed DB console or parameter group:
sql_require_primary_key = OFF

GUI Upgrade Issues

Cannot Login After Upgrade

Reset password via database:

UPDATE users SET password = MD5('newpassword') WHERE username = 'admin';

Redis session issue (login loop):

redis-cli FLUSHALL
systemctl restart php-fpm

VM Binary Error

cd /var/www/html
php php/run.php upgrade -f

Invalid Compressed Data

Usually caused by incorrect web root ownership:

chown -R www-data:www-data /var/www/html  # Debian/Ubuntu
chown -R apache:apache /var/www/html       # RHEL/CentOS

Unable to Remove Old Files

# Fix tshark ownership
chown www-data:www-data /var/www/html/bin/tshark*

# Retry upgrade from GUI

Upgrade Not Visible

Check internet connectivity from GUI server:

curl -I https://www.voipmonitor.org
ping www.voipmonitor.org

Permission Issues

Incorrect Ownership Error

Often caused by missing execute permissions on binaries:

# Fix bin directory
chmod +x /var/www/html/bin/*

# Verify
ls -la /var/www/html/bin/

NAS Spool Permission Denied

# Use ACLs (recommended)
setfacl -R -m u:www-data:rwx /path/to/nas/spool

# CRITICAL: Set on ALL parent directories too
setfacl -m u:www-data:rx /NAS
setfacl -m u:www-data:rx /NAS/voipmonitor

# Verify
sudo -u www-data ls /path/to/nas/spool

SELinux Blocking mscgen (SIP Call Flow Diagrams)

If SIP call flow diagram shows "convert msc to svg (mscgen): unknown error":

# Check SELinux denials
ausearch -m avc -ts recent | grep mscgen

# Create policy module
grep mscgen /var/log/audit/audit.log | audit2allow -M mscgen_local
semodule -i mscgen_local.pp

IonCube and PHP Issues

Temp Directory Not Writable

# Check and fix /tmp permissions
ls -ld /tmp
chmod 1777 /tmp

# Check SELinux
getenforce
# If Enforcing, try: setenforce 0

# Check systemd PrivateTmp
systemctl show httpd | grep PrivateTmp
# If true, create override:
# /etc/systemd/system/httpd.service.d/privatetmp.conf
# [Service]
# PrivateTmp=false

PHP CLI vs Web Server Mismatch

# Test as web server user
sudo -u www-data php -r 'echo extension_loaded("ionCube Loader")?"yes":"no";'

# Compare configs
php --ini                    # CLI config
# Create phpinfo: echo '<?php phpinfo();' > /var/www/html/info.php
# Check "Loaded Configuration File" in browser
# Remove after: rm /var/www/html/info.php

License Activation: Server Side Error - Forbidden

This indicates ionCube PHP version incompatibility:

GUI Version PHP Version
v26.37+ PHP 8.3 supported
Older PHP 8.2 or earlier required
# Check Apache error log
tail -50 /var/log/apache2/error.log | grep -i ioncube

# Solution: Either upgrade GUI to v26.37+ or downgrade PHP to 8.2

Other Issues

Invalid Timezone (GUI Inaccessible)

# Edit directly
nano /var/www/html/config/configuration.php

# Find and fix:
define('TIMEZONE', 'UTC');  # Use valid timezone
define('SENSORS_TIMEZONE', 'UTC');

systemctl restart php-fpm

Valid timezones: UTC, Europe/London, America/New_York, Europe/Berlin, etc.

Faxes Not Displayed

# Install libtiff-tools
apt-get install libtiff-tools    # Debian/Ubuntu
yum install libtiff-tools        # RHEL/CentOS

# Verify
which tiff2pdf

File Attachment Blocked

Files like .xlsx, .docx are blocked for security. Compress to .zip or .gz:

zip archive.zip your_file.xlsx

RRD Graph Errors After Hardware Change

# Delete corrupted RRD files
rm -rf /var/spool/voipmonitor/rrd/*

# Sensor will recreate them
systemctl restart voipmonitor

/dev/shm Full (Session Logout Issues)

# Check usage
df -h /dev/shm

# Temporary increase
mount -o remount,size=1G /dev/shm

# Permanent: edit /etc/fstab
# tmpfs /dev/shm tmpfs defaults,size=1G 0 0

Concurrent Calls Stats Error

Usually caused by duplicate cron entries:

# Check for duplicates
grep "voipmonitor\|run.php" /etc/crontab

# Comment out duplicates, keep only one

TShark CVE Security Updates

The bundled tshark may have known CVEs. To update:

cd /var/www/html/bin

# Download updated binary from Wireshark
wget https://www.wireshark.org/download/automated/linux64/tshark
chmod +x tshark
chown www-data:www-data tshark

Dashboard Edit Icon Grayed Out

User lacks edit permission. Grant via User Management > edit user > enable "Edit Dashboard" permission.

GUI Not Loading (Spool Directory Ownership)

If the GUI is not loading or shows generic error messages, the cause may be incorrect ownership of the spool directory by the web server user.

# Fix spool directory ownership
chown -R www-data:www-data /var/spool/voipmonitor    # Debian/Ubuntu
# OR
chown -R apache:apache /var/spool/voipmonitor        # RHEL/CentOS

ℹ️ Note: The spool directory path is defined by the spooldir parameter in /etc/voipmonitor.conf. Use the correct path for your configuration.



AI Summary for RAG

Summary: VoIPmonitor GUI troubleshooting guide covering: (1) HTTP 500 errors - try client-side steps first (different browser, incognito, clear cache), then check Apache/PHP error logs and SELinux; (2) No CDR for current day - check sensor status in Settings > Sensors, generate debug log if UP, check partitions/timezone/cdr config if Down; (3) GUI debug mode - add ?debug=31415 to URL; (4) Database timeouts - tune innodb_buffer_pool_size (50-70% RAM), increase mod_fcgid timeouts; (5) Database corruption - use mysqlcheck, drop/recreate tables, or innodb_force_recovery; (6) GUI upgrade issues - reset password via database, fix ownership, run php php/run.php upgrade -f; (7) Permission errors - chmod +x bin/*, use setfacl for NAS; (8) IonCube errors - check SELinux, PHP version compatibility (GUI v26.37+ for PHP 8.3); (9) Schema errors - use ?check_tables=1 URL parameter.

Keywords: HTTP 500, no CDR, sensor status, debug mode, ?debug=31415, innodb_buffer_pool_size, MySQL tuning, database corruption, mysqlcheck, innodb_force_recovery, GUI upgrade, password reset, IonCube, SELinux, PHP 8.3, ?check_tables=1, NAS permissions, setfacl, mod_fcgid timeout, FcgidIOTimeout, mscgen, SIP call flow, tshark CVE, MySQL 8.0.42, SYSTEM_USER privilege, /dev/shm, timezone error, libtiff-tools, file attachment blocked

Key Questions:

  • HTTP 500 error on GUI - what to try first?
  • No CDR or dashboard data for current day - how to diagnose?
  • How to enable GUI debug mode?
  • GUI queries timeout - how to tune MySQL?
  • Database corrupted - which recovery method to use?
  • Cannot login after GUI upgrade - how to reset password?
  • Permission errors with NAS spool - how to fix?
  • IonCube temp directory errors - what causes them?
  • GUI shows "Unknown column in field list" - how to fix?
  • SIP call flow diagram shows error - how to fix SELinux blocking?
  • MySQL 8.0.42 causing crashes - what to do?
  • License activation fails with Forbidden error - what causes it?