не удалось связать ZMQ: адрес уже используется - PullRequest
0 голосов
/ 20 ноября 2018

Я проверил порты и не обнаружил, что порт слушает или привязан к какому-либо процессу / сервису.

Но все равно я получаю эту ошибку, когда пытаюсь вызвать этот метод:

public function run()
{
    $loop   = Factory::create();
    $pusher = new Pusher;

    // Listen for the web server to make a ZeroMQ push after an ajax request
    $context = new Context($loop);
    $pull = $context->getSocket(ZMQ::SOCKET_PULL);
    $pull->bind('tcp://127.0.0.1:5555'); // Binding to 127.0.0.1 means the only client that can connect is itself
    $pull->on('message', array($pusher, 'onBlogEntry'));

    // Set up our WebSocket server for clients wanting real-time updates
    $webSock = new Server('0.0.0.0:8080', $loop); // Binding to 0.0.0.0 means remotes can connect
    $webServer = new IoServer(
        new HttpServer(
            new WsServer(
                new WampServer(
                    $pusher
                )
            )
        ),
        $webSock
    );

    $loop->run();
}

Я даже попытался перезапустить nginx, но безрезультатно.

Как этот порт мог использоваться?

...