Skip to content

[BUG] /autoserver reload clears server configurations, causing infinite "Command not found" loop #46

Description

@hongshaoluobotou

Description

After executing /autoserver reload, the plugin loses server-specific configurations (specifically stop-command), causing an infinite loop of failed stop attempts that spams the console with RuntimeException: Command not found errors.

Item Version/Details
Proxy Software Velocity
Plugin AutoServer
Related Software MCSManager Panel (daemon API)

Steps to Reproduce

  1. Configure a server (e.g., warwall) with stop-command in config.yml
  2. Start the Velocity proxy with AutoServer loaded
  3. Execute /autoserver reload in console
  4. Wait for the auto-shutdown timer to trigger (or trigger it manually)
  5. Observe console spam with Stop command not found for warwall

Expected Behavior

/autoserver reload should reload configuration without losing existing server definitions
If a server configuration is invalid, the plugin should log a single warning and skip that server
Failed stop attempts should not retry in a tight loop

Actual Behavior

[10:55:20 INFO] [autoserver]: Configuration reloaded.
[10:56:35 ERROR] [autoserver]: Stop command not found for warwall
[10:56:35 ERROR] [autoserver]: Failed to stop server: java.lang.RuntimeException: Command not found
[10:56:35 ERROR] [autoserver]: error: java.lang.RuntimeException: Command not found
[10:56:35 INFO] [autoserver]: Attempting to stop server: warwall
[10:56:35 ERROR] [autoserver]: Stop command not found for warwall
... (repeats 20+ times per second)

Logs

Before reload (working):

[10:39:16 INFO] [autoserver]: Running start command for warwall server. "curl -s -X GET 'http://localhost:18700/api/protected_instance/open?daemonId=...'"
[10:39:34 INFO] [autoserver]: Server warwall is online. Moving queued players...

After reload (broken):

[10:56:35 ERROR] [autoserver]: Stop command not found for warwall
[10:56:35 ERROR] [autoserver]: Failed to stop server: java.lang.RuntimeException: Command not found
[10:56:36 INFO] [autoserver]: Attempting to stop server: warwall
... (infinite loop)

Impact

latest.log

Console spam: ~20+ error messages per second
CPU usage: Wasted cycles on failed retry loop
Operational risk: Unable to gracefully stop servers after config reload
Data integrity: Potential race conditions if stop commands are intermittently missing

By the way, when setting autoShutdownDelay = 0 (intending to disable auto-shutdown), the plugin still attempts to stop servers after /autoserver reload.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions