swooletw / laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
MIT License
4.05k stars 390 forks source link

error when running php artisan swoole:http start #392

Closed mRamadan0101 closed 4 years ago

mRamadan0101 commented 4 years ago

Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks! (Any non-English issues will be closed immediately.)

  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole) php-v : 7.2

php --ri swoole 2.6

  1. Please provide your Laravel/Lumen version. laravel 6

  2. Which release version of this package are you using? 2.6

  3. What did you do? If possible, provide a recipe for reproducing the error. shutdown my PC without close swoole connection and run php artisan swoole:http start and php artisan swoole:http restart no command working all return same error

  4. What did you expect to see? start server 127.0.0.1:1215

  5. What did you see instead? ErrorException : Swoole\Process::kill(): swKill(356, 0) failed, Error: Operation not permitted[1]

    at /blog/vendor/swooletw/laravel-swoole/src/Commands/HttpServerCommand.php:293 289| $managerPid = $pids['managerPid'] ?? null; 290| 291| if ($managerPid) { 292| // Swoole process mode

    293| return $masterPid && $managerPid && Process::kill((int) $managerPid, 0); 294| } 295| 296| // Swoole base mode, no manager process 297| return $masterPid && Process::kill((int) $masterPid, 0);

    Exception trace:

    1 Swoole\Process::kill() \/blog/vendor/swooletw/laravel-swoole/src/Commands/HttpServerCommand.php:293

    2 SwooleTW\Http\Commands\HttpServerCommand::isRunning() \/blog/vendor/swooletw/laravel-swoole/src/Commands/HttpServerCommand.php:97

    Please use the argument -v to see more details.

mRamadan0101 commented 4 years ago

restart server and delete vendor folder and composer install again

YassineDabbous commented 4 years ago

it's a permissions problem.

ankitsabharwal commented 1 year ago

@yassine-dabbous That's correct!

Running sudo php artisan octane:stop and then normally starting octane with php artisan octane:start worked for us!