-
I have a problem with starting RoadRunner error I have during startup:
I will add that I do not have full access to the server environment but it is large ... I do not know what the problem is so I am not able to react and check ... I have dedicated ports for this service 8888 and 8889, but the service also tries to port 6061 and they failed I changed the configuration and had to reserve port 6061 for my freebsd server user, previously I had the error [ERROR] debug server stopped with error: listen tcp :6061: bind: operation not permitted maybe someone can help? or maybe I just need to compile my own php and have full control over it? I haven't tried it because it's a very tedious process and I wouldn't want to go through it... .rr.yaml version: '3'
rpc:
listen: "tcp://127.0.0.1:8889"
server:
command: "php /home/..../public/index.php"
http:
address: "0.0.0.0:8888"
workers:
command: "php /home/..../public/worker.php"
pool:
num_workers: 4
logs:
mode: development
level: debug
output: stderr worker.php <?php
use Spiral\RoadRunner\Worker;
use Spiral\RoadRunner\Http\PSR7Worker;
use Nyholm\Psr7\Factory\Psr17Factory;
require 'vendor/autoload.php';
$worker = Worker::create();
$psr17Factory = new Psr17Factory();
$psr7Worker = new PSR7Worker($worker, $psr17Factory, $psr17Factory, $psr17Factory);
while ($req = $psr7Worker->waitRequest()) {
try {
$response = new \Nyholm\Psr7\Response();
$response->getBody()->write("Hello, World!");
$psr7Worker->respond($response);
} catch (\Throwable $e) {
$psr7Worker->getWorker()->error((string)$e);
}
} index.php
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey @frankii91 👋 You can't use |
Beta Was this translation helpful? Give feedback.
Hold on, this is not a RR configuration. There is no
http.workers
section. It is a mix of the old RRv1 and modern RR configuration.index.php
is not a valid RR worker.