Common issues and solutions for sfsEdgeStore.
Symptom: MQTT client fails to connect to broker.
Checklist:
mosquitto -v
"mqtt_broker": "tcp://localhost:1883"
telnet localhost 1883
"mqtt_username": "user",
"mqtt_password": "password"
Symptom: MQTT TLS handshake fails.
Checklist:
ls -la /etc/ssl/certs/ca.pem
ls -la /etc/ssl/certs/server.pem
ls -la /etc/ssl/private/server.key
openssl x509 -in /etc/ssl/certs/server.pem -text -noout
Symptom: Connected but no readings stored.
Checklist:
curl http://localhost:8081/api/subscription/status
curl -X POST http://localhost:8081/api/test-edgex -d @sample_edgex_payload.json
Symptom: Application exits with database error.
Checklist:
ls -la data/sfs.db
df -h
rm -rf data/
Note: sfsEdgeStore uses sfsDb (LevelDB-based), which does not have SQLite’s “database locked” issue. If you see access errors, check file permissions.
Symptom: Database write failures.
Solution:
curl http://localhost:8081/api/retention/status
curl -X POST http://localhost:8081/api/retention/cleanup
Symptom: Memory exceeds configured limit.
Solution:
curl http://localhost:8081/api/resources/status
"max_memory_mb": 512
"analyzer_max_memory": 128
Symptom: HTTP server fails to start.
Solution:
# Linux
lsof -i :8081
# Windows
netstat -ano | findstr :8081
"http_port": "8082"
Symptom: HTTPS server fails to start.
Checklist:
openssl x509 -in server.pem -text -noout
openssl rsa -in server.key -check
Solution:
curl "http://localhost:8081/api/readings?deviceName=Device001&startTime=2024-01-01T00:00:00Z&endTime=2024-01-02T00:00:00Z"
Solution:
"enable_analyzer": false
# Linux systemd
journalctl -u sfsedgestore -n 100
# Docker
docker logs sfsedgestore --tail 100
# Direct execution
./sfsedgestore 2>&1 | tee sfsedgestore.log
Run with debug output:
export GODEBUG=1
./sfsedgestore
If the issue persists: