Troubleshooting
This guide helps you diagnose and resolve common issues with NextDNS Blocker.
Quick Diagnostics
Section titled “Quick Diagnostics”Run these commands to gather information:
# Check overall statusnextdns-blocker status
# Validate configurationnextdns-blocker config validate
# Check watchdognextdns-blocker watchdog status
# Preview sync behaviornextdns-blocker config push --dry-run --verboseCommon Issues
Section titled “Common Issues”Domain Not Blocking
Section titled “Domain Not Blocking”Symptoms: Domain accessible when it should be blocked
Diagnosis:
# Check domain statusnextdns-blocker status | grep domain.com
# Check schedule evaluationnextdns-blocker config push --dry-run -v | grep -A10 domain.comCommon causes and fixes:
-
Within scheduled hours
- Check current time vs schedule
- Verify timezone is correct
-
Domain in allowlist
Terminal window nextdns-blocker config show | grep -A2 allowlistnextdns-blocker disallow domain.com -
DNS cache
Terminal window # macOSsudo dscacheutil -flushcache# Linuxsudo systemctl restart systemd-resolved# Windowsipconfig /flushdns -
Browser cache
- Clear browser cache
- Try incognito/private window
Domain Not Unblocking
Section titled “Domain Not Unblocking”Symptoms: Domain blocked when it should be accessible
Diagnosis:
nextdns-blocker config push --dry-run -v | grep -A10 domain.comCommon causes:
-
Outside scheduled hours
- Verify current time
- Check timezone setting
-
Panic mode active
Terminal window nextdns-blocker panic statusWait for expiration or (emergency only) delete
.panicfile. -
Watchdog not running
Terminal window nextdns-blocker watchdog statusnextdns-blocker watchdog install -
Sync not running
Terminal window nextdns-blocker config push --verbose
Watchdog Not Working
Section titled “Watchdog Not Working”Symptoms: Automatic sync not happening
Diagnosis:
nextdns-blocker watchdog statusFixes by platform:
macOS:
# Check launchdlaunchctl list | grep nextdns
# Reinstallnextdns-blocker watchdog uninstallnextdns-blocker watchdog install
# Check logstail -20 ~/.local/share/nextdns-blocker/logs/cron.logLinux:
# Check croncrontab -l | grep nextdns
# Check cron servicesystemctl status cron
# Reinstallnextdns-blocker watchdog uninstallnextdns-blocker watchdog installWindows:
# Check tasksschtasks /query /tn "NextDNS-Blocker-Sync"
# Check Task Scheduler serviceGet-Service Schedule
# Reinstallnextdns-blocker watchdog uninstallnextdns-blocker watchdog installAPI Errors
Section titled “API Errors”Symptoms: “API error”, “Authentication failed”, timeouts
Diagnosis:
nextdns-blocker config push --verboseFixes:
-
Invalid credentials
Terminal window # Re-run setupnextdns-blocker init -
Timeout errors
Terminal window # Increase timeout in .envAPI_TIMEOUT=30 -
Rate limiting
- Wait 60 seconds
- Check
RATE_LIMIT_*settings
-
Network issues
Terminal window # Test connectivitycurl -I https://api.nextdns.io
Configuration Errors
Section titled “Configuration Errors”Symptoms: “Invalid configuration”, validation failures
Diagnosis:
nextdns-blocker config validateCommon issues:
-
Invalid JSON
Terminal window # Check JSON syntaxpython3 -m json.tool ~/.config/nextdns-blocker/config.json -
Invalid time format
- Use
HH:MM(24-hour) 09:00not9:0018:00not6:00 PM
- Use
-
Invalid day names
- Use lowercase:
mondaynotMonday - Full names:
wednesdaynotwed
- Use lowercase:
-
Duplicate domains
- Same domain can’t be in blocklist AND allowlist
Pending Actions Not Executing
Section titled “Pending Actions Not Executing”Symptoms: Queued unblocks not happening
Diagnosis:
nextdns-blocker pending listnextdns-blocker pending show <ID>Checks:
-
Execution time not reached
- Check “Execute at” time
-
Panic mode blocking
Terminal window nextdns-blocker panic status -
Watchdog not running
Terminal window nextdns-blocker watchdog status -
Force processing
Terminal window nextdns-blocker config push --verbose
Wrong Timezone
Section titled “Wrong Timezone”Symptoms: Schedule times don’t match expected behavior
Diagnosis:
nextdns-blocker config show | grep timezonedate # Compare system timeFix:
nextdns-blocker config set timezone America/New_YorkLog Files
Section titled “Log Files”Locations
Section titled “Locations”| Platform | Path |
|---|---|
| macOS/Linux | ~/.local/share/nextdns-blocker/logs/ |
| Windows | %LOCALAPPDATA%\nextdns-blocker\logs\ |
Log Files
Section titled “Log Files”| File | Contents |
|---|---|
app.log | Application events |
audit.log | Block/unblock actions |
cron.log | Watchdog sync output |
wd.log | Watchdog self-check |
Viewing Logs
Section titled “Viewing Logs”# Recent application logstail -50 ~/.local/share/nextdns-blocker/logs/app.log
# Recent sync activitytail -50 ~/.local/share/nextdns-blocker/logs/cron.log
# Follow logs in real-timetail -f ~/.local/share/nextdns-blocker/logs/app.logState Files
Section titled “State Files”Locations
Section titled “Locations”| File | Purpose | Location |
|---|---|---|
.panic | Panic state | ~/.local/share/nextdns-blocker/ |
pending.json | Pending actions | ~/.local/share/nextdns-blocker/ |
Resetting State
Section titled “Resetting State”Clear panic (emergency only):
rm ~/.local/share/nextdns-blocker/.panicReset pending actions:
echo '{"actions":[]}' > ~/.local/share/nextdns-blocker/pending.jsonComplete Reset
Section titled “Complete Reset”If all else fails, reset everything:
# 1. Uninstall watchdognextdns-blocker watchdog uninstall
# 2. Remove state filesrm -rf ~/.local/share/nextdns-blocker/
# 3. Remove config (optional - loses settings)rm -rf ~/.config/nextdns-blocker/
# 4. Reinstallpip install --force-reinstall nextdns-blocker
# 5. Run setupnextdns-blocker init
# 6. Restore confignextdns-blocker config edit
# 7. Install watchdognextdns-blocker watchdog installGetting Help
Section titled “Getting Help”Information to Include
Section titled “Information to Include”When reporting issues, include:
# Versionnextdns-blocker --version
# Platformuname -a # or systeminfo on Windows
# Statusnextdns-blocker status
# Validationnextdns-blocker config validate
# Recent logstail -50 ~/.local/share/nextdns-blocker/logs/app.logWhere to Report
Section titled “Where to Report”- GitHub Issues: github.com/aristeoibarra/nextdns-blocker/issues
Before Reporting
Section titled “Before Reporting”- Check this troubleshooting guide
- Search existing issues
- Try
--verboseflag for more info - Include relevant logs and config (redact API key!)