Troubleshooting¶
This page lists common issues and quick diagnostics for SmallBlock CMS.
Dev Server Will Not Start¶
Run:
smallblock checkfor environment validation (DB URL, secrets).Ensure dependencies are installed:
python3 -c "import pkgutil; print('ok')"Check logs: run the command with
--verboseor inspect the console output.
502 Bad Gateway (Nginx)¶
App process down?
systemctl status smallblockSocket label/permissions: - Socket exists?
ls -l /srv/smallblock/run/smallblock.sock- SELinux label:ls -Z /srv/smallblock/run/smallblock.sock- Reapply labels:sudo semanage fcontext -a -t httpd_var_run_t "/srv/smallblock/run(/.*)?" sudo restorecon -R /srv/smallblock/run
Nginx to app connectivity: check
/var/log/nginx/error.log
Database Connection Refused¶
Is the service running? PostgreSQL:
systemctl status postgresqlMariaDB:systemctl status mariadbCredentials/host/port in
DATABASE_URLcorrect?For PostgreSQL local socket auth, ensure the role exists and
pg_hba.confpermits local connections.
Migrations Fail¶
Re-run with verbosity:
smallblock migrate --verboseCheck privileges (create/alter) for the DB user.
If a partial migration occurred, roll back the last migration and re-apply.
Permission Denied on Static/Media¶
Paths exist and owned by the app user:
sudo mkdir -p /srv/smallblock/{static,media} sudo chown -R smallblock:smallblock /srv/smallblock/{static,media}
SELinux types for files served by Nginx:
sudo semanage fcontext -a -t httpd_sys_content_t "/srv/smallblock/static(/.*)?" sudo semanage fcontext -a -t httpd_sys_content_t "/srv/smallblock/media(/.*)?" sudo restorecon -R /srv/smallblock/{static,media}
Firewall / Port Access¶
Open HTTP/HTTPS only:
sudo firewall-cmd --add-service=http --permanent sudo firewall-cmd --add-service=https --permanent sudo firewall-cmd --reload
Keep DB ports closed to the Internet; prefer localhost.
Collecting Diagnostics¶
App logs:
journalctl -u smallblock -eNginx:
/var/log/nginx/access.logand/var/log/nginx/error.logSystem events:
journalctl -xe