StavenCTLStavenCTL Doc

Troubleshooting

Diagnose and resolve common StavenCTL installation and runtime issues.


This page covers the most common issues encountered when installing and running StavenCTL.


Configuration File Not Found

The agent requires the configuration file at:

/etc/stavenctl/config.conf

Verify that it exists.

ls -l /etc/stavenctl/config.conf

If the file is missing, reinstall StavenCTL or restore the configuration from a backup.


Database Connection Failed

If initialization or migrations fail, verify that PostgreSQL is running.

sudo systemctl status postgresql

Confirm the database connection string in:

/etc/stavenctl/config.conf
DATABASE_URL=postgres://username:password@127.0.0.1:5432/database?sslmode=disable

Then retry initialization.

sudo stavenctl-agent migration

Redis Connection Failed

Ensure Redis is running.

sudo systemctl status redis

Verify the Redis settings.

REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0

Restart Redis if necessary.

sudo systemctl restart redis

Agent Service Not Running

Check the service status.

sudo systemctl status stavenctl-agent

Restart the service.

sudo systemctl restart stavenctl-agent

View recent logs.

sudo journalctl -u stavenctl-agent -n 100 --no-pager

Server Service Not Running

Check the backend server.

sudo systemctl status stavenctl-server

Restart it.

sudo systemctl restart stavenctl-server

View logs.

sudo journalctl -u stavenctl-server -n 100 --no-pager

Nginx Service Failed

Verify the managed Nginx configuration.

sudo /usr/local/stavenctl/nginx/sbin/stavenctl-nginx -t

Check the service.

sudo systemctl status stavenctl-nginx

Reload configuration.

sudo systemctl reload stavenctl-nginx

Restart if required.

sudo systemctl restart stavenctl-nginx

Inspect logs.

sudo journalctl -u stavenctl-nginx -n 100 --no-pager

Database Migration Failed

Run migrations again.

sudo stavenctl-agent migration

If the error persists, verify:

  • PostgreSQL is running.
  • DATABASE_URL is correct.
  • The database exists.
  • The configured user has sufficient privileges.

Unable to Create Administrator

Creating the initial administrator requires root privileges.

sudo stavenctl-agent create-admin

If the command fails, ensure:

  • The configuration file is valid.
  • PostgreSQL is accessible.
  • Database migrations completed successfully.

License Activation Failed

Check the current license status.

stavenctl-agent license status

Verify the installed license.

stavenctl-agent license verify

Clear the cached license if necessary.

stavenctl-agent license clear-cache

Activate the license again.

stavenctl-agent license activate

Check All Services

Verify every required service is running.

sudo systemctl status postgresql
sudo systemctl status redis
sudo systemctl status stavenctl-server
sudo systemctl status stavenctl-agent
sudo systemctl status stavenctl-nginx

Useful Log Locations

ComponentLog Source
Agentjournalctl -u stavenctl-agent
Serverjournalctl -u stavenctl-server
Nginxjournalctl -u stavenctl-nginx
PostgreSQLjournalctl -u postgresql
Redisjournalctl -u redis

Collect Diagnostic Information

When requesting support, include the following information.

stavenctl-agent --version

sudo systemctl status stavenctl-agent
sudo systemctl status stavenctl-server
sudo systemctl status stavenctl-nginx

sudo journalctl -u stavenctl-agent -n 100 --no-pager
sudo journalctl -u stavenctl-server -n 100 --no-pager
sudo journalctl -u stavenctl-nginx -n 100 --no-pager

These commands provide enough information to diagnose most installation, configuration, service, database, and runtime issues.

On this page