Everyone

Provisioning Issues

Diagnose failed account creation, suspension, and termination jobs.

Last updated 1776211200
  • Queue Jobs Not Processing
  • Retrying Provisioning Manually
  • Suspension and Termination Not Working
  • Service Stuck in "Pending Provisioning"

    A service remains in Pending Provisioning when the provisioning job has not yet run or has failed silently.

    Step 1 — Check the queue is running:

    ps aux | grep "queue:work"
    

    If no result, the queue worker is not running. Start it:

    php artisan queue:work --sleep=3 --tries=3
    

    Step 2 — Check for failed jobs:

    php artisan queue:failed
    

    If the provisioning job appears in the failed queue, see the retry section below.

    Step 3 — Check the provisioning log:

    1. Go to Admin → Services.
    2. Open the service record.
    3. Click the Provisioning Log tab.

    The log shows each provisioning attempt, the response from the server module, and any error returned.

    createAccount Returned a Failure

    If the provisioning log shows createAccount returned a failure response:

    1. Check that your server credentials are correct: Admin → Servers → edit server → Test Connection.
    2. If the test fails, verify the IP address, port, and API token in the server configuration.
    3. Check the Opterius Panel log on the server itself for more detail:
      journalctl -u opterius-agent -n 50
      

    Common Opterius Panel Error Codes

    HTTP Status Meaning Fix
    401 Unauthorized Wrong api_token in server config Update the API token in Commerce server settings
    422 Unprocessable Entity Domain already exists on the server Terminate the existing account or use a different domain
    500 Internal Server Error Agent-side error Check agent logs on the server
    Connection refused Agent not running or wrong port Confirm opterius-agent is running and port is correct

    Queue Jobs Not Processing

    If provisioning jobs are queued but nothing is being processed:

    1. Check supervisor status (if using supervisor for the queue):
      supervisorctl status
      
    2. If the worker shows STOPPED or FATAL:
      supervisorctl start opterius-queue-worker
      
    3. Check supervisor logs for why it stopped:
      tail -50 /var/log/supervisor/opterius-queue-worker.log
      

    [!WARNING] If you run php artisan queue:restart, supervisor must be configured with autorestart=true or the worker will not come back up automatically. Without supervisor, you need to restart the worker manually after every restart.

    Retrying Provisioning Manually

    To manually re-trigger provisioning for a service:

    1. Go to Admin → Services → open the service.
    2. Click the Retry Provisioning button.

    This dispatches a new provisioning job to the queue. Check the Provisioning Log tab after a few seconds to see the result.

    Alternatively, retry specific failed jobs from the CLI:

    # List failed jobs
    php artisan queue:failed
    
    # Retry a specific job by ID
    php artisan queue:retry 14
    
    # Retry all failed jobs
    php artisan queue:retry all
    

    Suspension and Termination Not Working

    If suspension or termination jobs are failing, the same diagnostics apply as for provisioning. Check:

    1. Queue is running.
    2. Server credentials are valid (Test Connection).
    3. The Provisioning Log shows the error returned by the module.

    [!TIP] After fixing a server credential issue, always click Test Connection to confirm before retrying. Retrying with wrong credentials just adds more failed jobs to the queue.