Creating new plan fails on fresh install (v3.2.0-1a4f68eb4)

Here are some helpful considerations when filing a bug:

  • What version of apnscp are you running?
# cpcmd misc_cp_version
revision: 1a4f68eb443cba2dba72a59e556e10efadc5fa5d
timestamp: 1729009304
ver_maj: 3
ver_min: 2
ver_patch: 0
ver_pre: 1a4f68eb4
dirty: false
debug: false
  • Which version of RHEL or CentOS are you using?
# cat /etc/redhat-release
Rocky Linux release 8.10 (Green Obsidian)
  • Can you reproduce this bug reliably? Provide steps. If not, provide steps to the best of your recollection.
  1. Install Rocky Linux 8
  2. Install ApisCP using installer script
  3. Try to create service plan
cd /usr/local/apnscp
./artisan opcenter:plan --new custom

Fails with error:

# ./artisan opcenter:plan --new test
(ArgumentError) EXCEPTION: Plan test does not exist
[/usr/local/apnscp/lib/Lararia/Console/Commands/OpcenterPlanCommand.php:115]

         0. Lararia\Console\Commands\OpcenterPlanCommand->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
         1. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
         2. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
         3. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
         4. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
         5. Illuminate\Container\Container->call([Lararia\Console\Commands\OpcenterPlanCommand, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
         6. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
         7. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
         8. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
         9. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\OpcenterPlanCommand, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
        10. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
        11. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
        12. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
        13. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
        14. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/artisan:69]
(ArgumentError) EXCEPTION: Plan test does not exist
[/usr/local/apnscp/lib/Lararia/Console/Commands/OpcenterPlanCommand.php:115]

         0. Lararia\Console\Commands\OpcenterPlanCommand->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
         1. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
         2. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
         3. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
         4. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
         5. Illuminate\Container\Container->call([Lararia\Console\Commands\OpcenterPlanCommand, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
         6. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
         7. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
         8. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
         9. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\OpcenterPlanCommand, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
        10. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
        11. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
        12. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
        13. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
        14. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/artisan:69]
  • Enable debug mode (cpcmd config_set apnscp.debug true). Restart backend by hand,
    cd /usr/local/apnscp/bin ; ./bin/apnscpd -f restart
    After enabling debug mode and restarting by hand, error appears to be the same:
# ./artisan opcenter:plan --new test
(ArgumentError) EXCEPTION: Plan test does not exist
[/usr/local/apnscp/lib/Lararia/Console/Commands/OpcenterPlanCommand.php:115]

         0. Lararia\Console\Commands\OpcenterPlanCommand->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
         1. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
         2. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
         3. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
         4. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
         5. Illuminate\Container\Container->call([Lararia\Console\Commands\OpcenterPlanCommand, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
         6. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
         7. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
         8. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
         9. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\OpcenterPlanCommand, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
        10. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
        11. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
        12. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
        13. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
        14. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/artisan:69]
(ArgumentError) EXCEPTION: Plan test does not exist
[/usr/local/apnscp/lib/Lararia/Console/Commands/OpcenterPlanCommand.php:115]

         0. Lararia\Console\Commands\OpcenterPlanCommand->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
         1. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
         2. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
         3. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
         4. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
         5. Illuminate\Container\Container->call([Lararia\Console\Commands\OpcenterPlanCommand, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
         6. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
         7. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
         8. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
         9. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\OpcenterPlanCommand, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
        10. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
        11. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
        12. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
        13. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
        14. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/artisan:69]

Iā€™m on the same boat.Im going to new frash install with 8.6 and let see.

1 Like

Thanks for the bug report. Run upcp.

Thanks Mat. Its fixed :smile:

Thanks for the quick patch, appreciate it! Unfortunately, still not working for me. Tried upcp (do I need any flags also?) I also tried restarting apiscp service and manually.

# upcp
Compiled services and packages files removed!
Nothing to migrate.
Nothing to migrate.
# cpcmd misc_cp_version
revision: 1a4f68eb443cba2dba72a59e556e10efadc5fa5d
timestamp: 1729009304
ver_maj: 3
ver_min: 2
ver_patch: 0
ver_pre: 1a4f68eb4
dirty: false
debug: true
# ./artisan opcenter:plan --new test
(ArgumentError) EXCEPTION: Plan test does not exist 
[/usr/local/apnscp/lib/Lararia/Console/Commands/OpcenterPlanCommand.php:115]

         0. Lararia\Console\Commands\OpcenterPlanCommand->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
         1. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
         2. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
         3. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
         4. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
         5. Illuminate\Container\Container->call([Lararia\Console\Commands\OpcenterPlanCommand, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
         6. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
         7. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
         8. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
         9. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\OpcenterPlanCommand, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
        10. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
        11. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
        12. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
        13. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
        14. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/artisan:69]
(ArgumentError) EXCEPTION: Plan test does not exist 
[/usr/local/apnscp/lib/Lararia/Console/Commands/OpcenterPlanCommand.php:115]

         0. Lararia\Console\Commands\OpcenterPlanCommand->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
         1. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
         2. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
         3. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
         4. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
         5. Illuminate\Container\Container->call([Lararia\Console\Commands\OpcenterPlanCommand, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
         6. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
         7. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
         8. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
         9. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\OpcenterPlanCommand, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
        10. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
        11. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
        12. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
        13. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
        14. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/artisan:69]

Run upcp. This is a day behind on edge.

1 Like

Confirmed fixed as of v3.2.0 (4b9110c0e). Thank you!