Troubleshooting
This section provides solutions to common issues encountered when deploying and operating nEdge Lite.
Startup Issues
License Validation Failed
Problem: Invalid license or License file not found
Solution:
# Check license file location
ls -la nedgelite.license /etc/nedgelite.license
# Verify license validity
nedgelite --check-license
# Display system ID for license generation
nedgelite --show-system-id
# Contact ntop.org for valid licenseUnable to Bind to NFQUEUE
Problem: Unable to open queue 0 or Unable to bind to queue
Causes and Solutions:
Queue already in use:
shell# Check for other nedgelite instances ps aux | grep nedgelite sudo killall nedgelite # Check for other applications using the queue cat /proc/net/netfilter/nfnetlink_queueKernel module not loaded:
shellsudo modprobe nfnetlink_queue sudo modprobe nf_conntrackInsufficient permissions:
shell# Must run as root sudo nedgelite -q 0 -z tcp://127.0.0.1:1234
Permission Denied Errors
Problem: Permission denied when accessing netfilter
Solution:
# Run as root or with sudo
sudo nedgelite -q 0 -z tcp://127.0.0.1:1234
# Check capabilities (if using capabilities instead of root)
sudo setcap cap_net_admin=eip /usr/local/bin/nedgelitePacket Processing Issues
No Packets Reaching nEdge Lite
Problem: nEdge Lite starts but shows no activity
Diagnosis:
# Check iptables rules
sudo iptables -t mangle -L -n -v
# Verify packets are being queued
# Look for non-zero packet counts on NFQUEUE rules
# Check queue statistics
cat /proc/net/netfilter/nfnetlink_queueSolutions:
iptables rules not configured:
shell# Run setup script sudo /usr/share/nedgelite/scripts/default_setup.sh eth0Wrong queue number:
shell# Ensure iptables queue-num matches nedgelite -q option sudo iptables -t mangle -L -n -v | grep NFQUEUE # Should show: --queue-num 0 # Must match: nedgelite -q 0Packets already marked:
shell# Flush conntrack table to reset marks sudo conntrack -FTraffic not matching rules:
shell# Add catch-all rule for testing sudo iptables -t mangle -A PREROUTING -j NFQUEUE --queue-num 0 --queue-bypass
Packets Dropped Unexpectedly
Problem: Legitimate traffic is being blocked
Diagnosis:
# Run with verbose logging
sudo nedgelite -q 0 -r /etc/nedgelite/policy.json -v
# Check conntrack marks
sudo conntrack -L | grep mark=2
# View blocked flows in ntopngSolutions:
Overly broad policy rules:
Review policy file and adjust category/protocol filters:
json{ "policy": { "markers": { "categories": { "SocialNetwork": "drop" # May block too much } }, "default_marker": "pass" # Change from "drop" } }Protocol misdetection:
Check nEdge Lite logs to see what protocol was detected. nDPI may occasionally misidentify protocols.
Default marker is "drop":
json"default_marker": "pass" # More permissiveTesting policies:
shell# Temporarily use pass-all policy sudo nedgelite -q 0 -v # No -r option
High Packet Loss
Problem: Packets are being dropped due to queue overflow
Diagnosis:
# Check queue statistics
cat /proc/net/netfilter/nfnetlink_queue
# Look for queue_dropped counter
# Check system logs
dmesg | grep nf_queueSolutions:
Increase queue size:
shellsudo iptables -t mangle -A PREROUTING -m mark --mark 0 \ -j NFQUEUE --queue-num 0 --queue-size 4096Use multiple queues:
shellsudo iptables -t mangle -A PREROUTING -m mark --mark 0 \ -j NFQUEUE --queue-balance 0:3 --queue-cpu-fanout sudo nedgelite -q 0:4 -z tcp://127.0.0.1:1234Add queue-bypass:
shellsudo iptables -t mangle -A PREROUTING -m mark --mark 0 \ -j NFQUEUE --queue-num 0 --queue-bypassThis allows packets to pass if nEdge Lite is overloaded or crashes.
Optimize nEdge Lite performance:
- Reduce flow update interval:
-u 60 - Increase conntrack table size
- Pin nEdge Lite to dedicated CPU cores
- Reduce flow update interval:
Protocol Detection Issues
Protocols Not Being Detected
Problem: nDPI marks flows as "Unknown"
Causes:
- Encrypted traffic (HTTPS, VPN)
- Not enough packets inspected
- New/unsupported protocol
- Fragmented packets
Solutions:
Update nDPI library:
shellcd ~/nDPI git pull make sudo make installCheck nDPI protocol list:
shellnedgelite -H | grep -i <protocol>Allow more packets for detection:
nDPI may need 10-20 packets for some protocols. Ensure initial packets aren't being dropped.
Custom protocol configuration:
Consult nDPI documentation for custom protocol definitions.
Encrypted Traffic
Problem: HTTPS/TLS traffic not classified correctly
Explanation: nDPI can detect many protocols over HTTPS using:
- TLS SNI (Server Name Indication)
- Certificate analysis
- Behavioral patterns
Limitations: Some encrypted protocols cannot be identified without TLS interception (MITM).
Wrong Protocol Detected
Problem: nDPI misidentifies the protocol
Solutions:
- Update nDPI: Newer versions have improved accuracy
- Report to nDPI project: Submit PCAP files for analysis
- Use category-based policies: Categories are more reliable than individual protocols
- Manual override: Use IP-based rules for specific services
Policy Issues
Policy Not Applied
Problem: Policy rules are not being enforced
Diagnosis:
# Check if policy file is being loaded
sudo nedgelite -q 0 -r /etc/nedgelite/policy.json -v
# Look for "Loading policy" messages
# Verify JSON syntax
cat /etc/nedgelite/policy.json | jq .Solutions:
JSON syntax error:
shell# Validate JSON cat /etc/nedgelite/policy.json | jq . # Fix any syntax errorsPool not matching traffic:
Verify IP ranges in pool definition:
json{ "pool": { "ip": ["192.168.1.0/24"], # Must match actual traffic ... } }Reload policy:
shellsudo kill -HUP $(pidof nedgelite)
Policy Changes Not Taking Effect
Problem: Modifications to policy file have no effect
Solutions:
Reload policy:
shellsudo kill -HUP $(pidof nedgelite)Restart nEdge Lite:
shellsudo killall nedgelite sudo nedgelite -q 0 -r /etc/nedgelite/policy.json -z tcp://127.0.0.1:1234Clear conntrack:
Existing connections retain old marks:
shellsudo conntrack -F
ntopng Integration Issues
No Flows Appearing in ntopng
Problem: nEdge Lite is running but ntopng shows no flows
Diagnosis:
# Check ZMQ connection
sudo netstat -tn | grep 1234
# Verify ntopng endpoint
ps aux | grep ntopng | grep tcp://Solutions:
Endpoint mismatch:
shell# ntopng must have trailing 'c' sudo ntopng -i tcp://127.0.0.1:1234c # nEdge Lite must NOT have trailing 'c' sudo nedgelite -q 0 -z tcp://127.0.0.1:1234Firewall blocking ZMQ:
shell# Allow TCP port 1234 sudo iptables -A INPUT -p tcp --dport 1234 -j ACCEPTntopng not running:
shellps aux | grep ntopng # Start ntopng if not running
ZMQ Connection Refused
Problem: Connection refused when nEdge Lite tries to connect to ntopng
Solutions:
Start ntopng first:
shellsudo ntopng -i tcp://0.0.0.0:1234cCheck ntopng is listening:
shellsudo netstat -tnlp | grep 1234Verify endpoint address:
- Use
0.0.0.0on ntopng to listen on all interfaces - Use correct IP address in nEdge Lite
-zoption
- Use
Policy Updates from ntopng Not Working
Problem: Changes in ntopng GUI don't affect nEdge Lite
Solutions:
Verify policy endpoint:
shell# ntopng must publish events sudo ntopng -i tcp://0.0.0.0:5556c --zmq-publish-events tcp://0.0.0.0:5557 # nEdge Lite must subscribe sudo nedgelite -q 0 -z tcp://ntopng:5556 -p tcp://ntopng:5557Check ZMQ policy connection:
shellsudo netstat -tn | grep 5557Restart both services:
shellsudo killall ntopng nedgelite # Start ntopng first, then nEdge Lite
Performance Issues
High CPU Usage
Problem: nEdge Lite consuming excessive CPU
Causes:
- High packet rate
- Complex policies
- Too frequent flow updates
Solutions:
Use multiple queues:
shellsudo nedgelite -q 0:$(nproc) -z tcp://127.0.0.1:1234Reduce flow update frequency:
shellsudo nedgelite -q 0 -z tcp://127.0.0.1:1234 -u 60Optimize policies:
- Use category filters instead of many protocol filters
- Simplify policy logic
System tuning:
shell# Increase conntrack table sudo sysctl -w net.netfilter.nf_conntrack_max=1048576
High Memory Usage
Problem: nEdge Lite memory usage growing over time
Diagnosis:
# Monitor memory
ps aux | grep nedgelite
pmap $(pidof nedgelite)Causes:
- Large number of concurrent flows
- Flow leaks (not being purged)
Solutions:
Normal behavior: ~2-3KB per active flow is expected
Adjust idle timeout: If flows aren't being purged, check conntrack timeouts:
shellsudo sysctl -w net.netfilter.nf_conntrack_tcp_timeout_established=3600Monitor flow count:
shellsudo conntrack -C # Show connection count
Network Latency
Problem: Increased latency when nEdge Lite is running
Solutions:
Optimize queue processing:
- Use
--queue-cpu-fanoutin iptables - Pin nEdge Lite to dedicated cores
- Use
Disable flow batching:
shellsudo nedgelite -q 0 -z tcp://127.0.0.1:1234 -fCheck queue depth:
shellcat /proc/net/netfilter/nfnetlink_queue
System Issues
Kernel Module Not Loading
Problem: modprobe: FATAL: Module nfnetlink_queue not found
Solutions:
# Install kernel modules
# Ubuntu/Debian
sudo apt-get install linux-headers-$(uname -r)
# CentOS/Rocky
sudo yum install kernel-devel-$(uname -r)
# Rebuild modules
sudo depmod -a
sudo modprobe nfnetlink_queueConntrack Table Full
Problem: nf_conntrack: table full, dropping packet
Solutions:
# Increase conntrack table size
sudo sysctl -w net.netfilter.nf_conntrack_max=1048576
# Make persistent
echo "net.netfilter.nf_conntrack_max=1048576" | \
sudo tee -a /etc/sysctl.conf
# Verify
sudo sysctl -pOut of Memory
Problem: Kernel OOM killer terminates nEdge Lite
Solutions:
Add more RAM
Reduce flow count: Implement aggressive timeout policies
Limit nEdge Lite memory:
shell# Use systemd to limit memory sudo systemctl set-property nedgelite.service MemoryMax=1G
Debugging Techniques
Verbose Logging
sudo nedgelite -q 0 -r /etc/nedgelite/policy.json -z tcp://127.0.0.1:1234 -vPacket Capture
# Capture packets going to NFQUEUE
sudo tcpdump -i any -w /tmp/capture.pcap
# Analyze with Wireshark
wireshark /tmp/capture.pcapConntrack Monitoring
# Watch connections in real-time
watch -n 1 'sudo conntrack -L | head -20'
# Show statistics
sudo conntrack -S
# Show connections with marks
sudo conntrack -L -miptables Rule Verification
# List mangle table with counters
sudo iptables -t mangle -L -n -v
# Trace packet path (requires iptables-extensions)
sudo iptables -t raw -A PREROUTING -p tcp --dport 80 -j TRACE
sudo xtables-monitor -tSystem Logs
# Check kernel messages
sudo dmesg | grep -i "nf_queue\|conntrack\|nedgelite"
# Check system logs
sudo journalctl -u nedgelite -f # If running as systemd serviceGetting Help
If you cannot resolve an issue:
Check Documentation: Review relevant sections of this guide
Search Issues: Look for similar issues on GitHub
Collect Diagnostics:
shell# System info uname -a nedgelite --version ntopng --version # Configuration iptables -t mangle -L -n -v cat /etc/nedgelite/policy.json ps aux | grep nedgelite # Statistics conntrack -S cat /proc/net/netfilter/nfnetlink_queueReport Bug: https://github.com/ntop/nEdge Lite/issues
Include:
- nEdge Lite version
- Operating system and kernel version
- Configuration files
- Log output with
-vflag - Steps to reproduce
- Commercial Support: Contact ntop.org for professional support
Next Steps
- Review Configuration for optimization options
- Learn about Advanced Features features
- Consult architecture for technical details
