Troubleshooting
Common issues and how to diagnose them.
A DAQJob keeps crashing and restarting
Symptoms: The supervisor log shows repeated restart messages for the same job.
Diagnosis:
-
Check the supervisor log for the crash reason:
-
Run the job in debug mode to see the actual exception:
-
Check if the hardware is connected and responding. For CAEN jobs, verify:
- Optical link fibers are properly seated
- Device is powered on
- IP address is reachable (for HV supplies)
Common causes:
| Cause | Fix |
|---|---|
| Hardware not reachable | Check cables, power, network |
| Permission denied (USB/PCIe) | Run with sudo or add udev rules |
| Config field typo | Compare against example configs in configs/examples/ |
| Missing Python dependency | uv sync to reinstall |
No data in output files
Symptoms: The output CSV/ROOT/etc. file exists but is empty.
Diagnosis:
-
Verify the store job is running:
Theis_alivecolumn should beTrue. -
Check that the store config is set on the producer:
Without astore_configsection, no store topics are generated. -
Enable debug logging to see if messages are being published:
-
Check if messages are routing to the correct topic:
- The store job subscribes to
store.<StoreClassName> - The producer must include matching store config types
High latency (> 100ms p95)
Symptoms: High message processing latency (visible in timeseries data).
Diagnosis:
-
Check if shared memory is working:
If the ring buffer can't be created (e.g., insufficient memory), the system falls back to ZMQ without warning. -
Verify ring buffer sizing:
-
Check for consumer backpressure:
- If the ring buffer is full, producers block
-
Increase
ring_buffer_size_mbor decrease message rate -
Check CPU usage:
If any job is near 100%, it may be a bottleneck.
ZMQ connection errors
Symptoms: Log shows ZMQError: Connection refused or
ZMQError: Address already in use.
Diagnosis:
-
Port conflicts (federation or CNC):
Change the port in the config if needed. -
Firewall blocking federation ports. Ensure ports 5560, 5561, 1638 are open between machines.
-
Multiple supervisors on the same machine. Only one supervisor can bind to the federation ports at a time.
Shared memory errors
Symptoms: PermissionError, FileNotFoundError, or
BusError related to /dev/shm.
Diagnosis:
-
Check
If it's full, clean up old shared memory segments: Unused segments can be removed manually or by restarting the machine./dev/shmspace: -
On macOS, shared memory is handled by the kernel automatically. If you see errors, try setting
use_shm_when_possible = false. -
Ring buffer size exceeds available memory:
CNC REST API not responding
Symptoms: curl http://localhost:8000/clients hangs or returns
connection refused.
Diagnosis:
-
Verify CNC is enabled in the supervisor config:
-
Check if the port is already in use (see ZMQ section above).
-
Try binding to
localhostinstead of0.0.0.0if only local access is needed. -
Check supervisor log for CNC initialization errors.
Camera not detected (macOS)
Symptoms: DAQJobCamera fails with camera_device_index not found.
Diagnosis:
-
macOS security requires camera permission. Grant terminal/IDE access in System Preferences → Security & Privacy → Camera.
-
Use
camera_device_nameinstead of index (Linux only): -
The camera job uses
multiprocessing_method = "spawn"instead offorkon macOS to avoid AVCaptureDevice issues.
Windows-specific issues
- Shared memory ring buffers are not supported. Set
use_shm_when_possible = falseglobally. fork()is not available, but DAQJobs still run as separatemultiprocessing.Processinstances (usingspawn), not as threads. However, inter-process shared memory (ring buffer) is not supported.- Some hardware SDKs (CAEN, N1081B) are Linux-only.
Getting help
If you can't resolve an issue:
-
Enable debug logging and capture the full output:
-
Check the GitHub repository for known issues: github.com/ENRG-tr/enrgdaq/issues
-
Provide the debug log, your config files (remove sensitive data), and platform details (OS, Python version) when reporting.