Skip to content

Troubleshooting

Baytae Tistear edited this page Jul 7, 2026 · 2 revisions

Troubleshooting

Parent section: Operations

This page lists common SDAC failures and first checks.

Bot Service Restart Loop

Check status:

sudo systemctl status sdac-bot --no-pager
journalctl -u sdac-bot -n 120 --no-pager

Common causes:

  • Missing DISCORD_TOKEN.
  • Python dependency issue.
  • Database migration failure.
  • Syntax error after update.
  • Permission issue reading env, database, config, or media.

Dashboard Service Failure

Check:

sudo systemctl status sdac-dashboard --no-pager
journalctl -u sdac-dashboard -n 120 --no-pager
curl http://127.0.0.1:5000/health

Common causes:

  • Flask app import error.
  • Missing dependency.
  • Database locked or missing.
  • Bad env file permissions.
  • Port conflict.

OAuth Does Not Work

Check variable names exist in the server env file:

  • DISCORD_CLIENT_ID
  • DISCORD_CLIENT_SECRET
  • DISCORD_REDIRECT_URI

Then check:

  • Redirect URI exactly matches the Discord Developer Portal.
  • Public URL uses HTTPS when required.
  • Dashboard can reach Discord API.
  • User is logging in through the expected account flow.

Do not paste client secrets into support messages or the wiki.

sudo sdac-doctor Shows bash\r

The script has Windows CRLF line endings. Convert the script/wrapper to LF and retry.

Monthly Leaderboard Error

If Discord shows an error like 21 values for 22 columns, the database insert statement and table schema are out of sync. Run migrations, update to the fixed version, and check service logs for the exact failing scheduler.

Release Notification Did Not Post

Check:

  • The release is official.
  • Notifications are enabled.
  • Notification channel is configured.
  • Bot has permission to send messages in that channel.
  • Dashboard release notification test works.
  • Latest official/experimental pointers are correct.

Sidebar Or Theme Looks Wrong

Check:

  • Page uses shared sidebar injection.
  • Old top nav is hidden.
  • Theme variables are injected.
  • Layout settings are saved.
  • Menu button alignment is set correctly in the layout editor.
  • Mobile CSS is active below the breakpoint.

Missing Media

Check:

  • File exists under media/.
  • Database path matches actual path.
  • Thumbnail generation completed.
  • Public media mirror prefix is correct if using remote media.
  • Nginx serves media path correctly.

Backup Failure

Check:

  • Local backup directory permissions.
  • Disk space.
  • rclone remote name.
  • Provider credentials on the server.
  • Network access.
  • Last backup status in dashboard maintenance.

Admin Cannot See A Server

Check:

  • User is logged in.
  • Discord OAuth guild refresh is current.
  • User has access to that server.
  • Dashboard role is scoped to that server.
  • Bot Owner role is present if global access is expected.

First Checks After Any Update

Run:

sudo systemctl status sdac-bot --no-pager
sudo systemctl status sdac-dashboard --no-pager
curl http://127.0.0.1:5000/health

Then open:

/admin/maintenance?key=YOUR_ADMIN_KEY
/admin/releases?key=YOUR_ADMIN_KEY

Clone this wiki locally