无法启动 PHP 8.0 的 Octane RoadRunner 服务器。

huangapple go评论96阅读模式
英文:

Unable to Launch Octane RoadRunner Server for PHP 8.0

问题

Octane是在Ubuntu 18.04服务器上按照官方指南使用roadrunner安装的。每个步骤都按预期工作,直到启动服务器时出现错误:

php artisan octane:start --server=roadrunner --port=8181

然后,收到一个错误并退出命令。完整的堆栈跟踪如下所示:

   INFO  Server running…

  Local: http://127.0.0.1:8181 

  Press Ctrl+C to stop the server


   INFO  [INFO] RoadRunner server started; version: 2.6.3, buildtime: 2021-12-03T11:37:00+0000
PHP Warning:  require(/path/vendor/bin/bootstrap.php): Failed to open stream: No such file or directory in /path/vendor/bin/roadrunner-worker on line 18

PHP Fatal error:  Uncaught Error: Failed opening required '/path/vendor/bin/bootstrap.php' (include_path='.:/usr/share/php') in /path/vendor/bin/roadrunner-worker:18
Stack trace:
#0 {main}
  thrown in /path/vendor/bin/roadrunner-worker on line 18


   INFO  error occurred: WorkerAllocate:

   INFO  	goridge_frame_receive: EOF, plugin: http.Plugin

   ERROR  2021-12-07T12:01:53.048Z	ERROR	container/poller.go:16	vertex got an error	{"id": "http.Plugin", "error": "WorkerAllocate:\n\tgoridge_frame_receive: EOF"}

   ERROR  github.com/spiral/endure/pkg/container.(*Endure).poll.func1

   ERROR  	github.com/spiral/endure@v1.0.10/pkg/container/poller.go:16

   ERROR  handle_serve_command: WorkerAllocate:

   ERROR  	goridge_frame_receive: EOF

由于roadrunner基于go语言,我对如何解决这个错误没有太多的见解。如果有人在之前解决过这个问题,请告诉我,谢谢。

英文:

Octane is installed with roadrunner while following the official guide, on the Ubuntu 18.04 server. Each step works as expected until the server is started:

php artisan octane:start --server=roadrunner --port=8181

Then, an error is received and the command exits. The complete stacktrace is attached:

   INFO  Server running…

  Local: http://127.0.0.1:8181 

  Press Ctrl+C to stop the server


   INFO  [INFO] RoadRunner server started; version: 2.6.3, buildtime: 2021-12-03T11:37:00+0000
PHP Warning:  require(/path/vendor/bin/bootstrap.php): Failed to open stream: No such file or directory in /path/vendor/bin/roadrunner-worker on line 18

PHP Fatal error:  Uncaught Error: Failed opening required '/path/vendor/bin/bootstrap.php' (include_path='.:/usr/share/php') in /path/vendor/bin/roadrunner-worker:18
Stack trace:
#0 {main}
  thrown in /path/vendor/bin/roadrunner-worker on line 18


   INFO  error occurred: WorkerAllocate:

   INFO  	goridge_frame_receive: EOF, plugin: http.Plugin

   ERROR  2021-12-07T12:01:53.048Z	ERROR	container/poller.go:16	vertex got an error	{"id": "http.Plugin", "error": "WorkerAllocate:\n\tgoridge_frame_receive: EOF"}

   ERROR  github.com/spiral/endure/pkg/container.(*Endure).poll.func1

   ERROR  	github.com/spiral/endure@v1.0.10/pkg/container/poller.go:16

   ERROR  handle_serve_command: WorkerAllocate:

   ERROR  	goridge_frame_receive: EOF

Since roadrunner is based on go, I don't have much insights on how to navigate through the error. Please let me know if anyone has solved this issue before, thanks.

答案1

得分: 1

你应该修复所有类似这样的警告:PHP Warning: require(/path/vendor/bin/bootstrap.php): Failed to open stream: No such file or directory in /path/vendor/bin/roadrunner-worker on line 18

这些警告出现在stdout中,但是stdout被用作进程文件描述符与RR进行通信。这意味着如果在RR初始化所有进程(也称为worker)之前,有一些数据被发送到stdout(比如PHP警告),RR将停止分配worker并以代码1退出。

英文:

You should fix all warnings like this one: PHP Warning: require(/path/vendor/bin/bootstrap.php): Failed to open stream: No such file or directory in /path/vendor/bin/roadrunner-worker on line 18

These warnings appear in the stdout, but stdout is used as a process fd to communicate with the RR. That means if some data is sent to the stdout (like PHP warning) before RR initializes all processes (aka worker), RR will stop allocating the workers and exit with code 1.

huangapple
  • 本文由 发表于 2021年12月7日 21:29:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/70260993.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定