hcgcloud / pterodactyl-sdk

Pterodactyl Panel PHP SDK/API wrapper
https://hcgcloud.github.io/pterodactyl-sdk-docs/
MIT License
27 stars 25 forks source link

No viable nodes for deployment #26

Closed SonDerpy closed 3 years ago

SonDerpy commented 4 years ago

{"errors":[{"code":"NoViableNodeException","status":"400","detail":"No nodes satisfying the requirements specified for automatic deployment could be found."}]}

This is the error I get while trying to create a server. My code:

$server = $pterodactyl->createServer([ "name" => $name, "user" => $row["pterodactyl_userid"], "egg" => $egg_id, "docker_image" => $egg->dockerImage, "skip_scripts" => false, "environment" => [ "SERVER_AUTOUPDATE" => '1' ], "limits" => [ "memory" => $_POST['server_ram'], "swap" => 0, "disk" => $_POST['server_disk'], "io" => 500, "cpu" => $_POST['cpu'] * 100 ], "feature_limits" => [ "databases" => 1, "allocations" => 1 ], "startup" => $egg->startup, "description" => "An server made by the client page.", "deploy" => [ "locations" => [$location_id], "dedicated_ip" => false, "port_range" => [] ], "start_on_completion" => true ]);

The location id is valid and everything, it just doesn't want to create a server

tyson239 commented 4 years ago

Hi, have you enabled Allow Automatic Allocation of nodes in this location?

SonDerpy commented 4 years ago

Hi, have you enabled Allow Automatic Allocation of nodes in this location?

Yes, I did.

tyson239 commented 4 years ago

Besides, you need to check whether there are unallocated allocations in the location.