Seldaek/monolog · error · LogicException

No connection could be established

Error message

No connection could be established

What it means

Error "No connection could be established" thrown in Seldaek/monolog.

Source

Thrown at src/Monolog/Handler/CubeHandler.php:156

        if (null === $this->udpConnection) {
            $this->connectUdp();
        }

        if (null === $this->udpConnection) {
            throw new \LogicException('No UDP socket could be opened');
        }

        socket_send($this->udpConnection, $data, \strlen($data), 0);
    }

    private function writeHttp(string $data): void
    {
        if (null === $this->httpConnection) {
            $this->connectHttp();
        }

        if (null === $this->httpConnection) {
            throw new \LogicException('No connection could be established');
        }

        curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']');
        curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, [
            'Content-Type: application/json',
            'Content-Length: ' . \strlen('['.$data.']'),
        ]);

        Curl\Util::execute($this->httpConnection, 5);
    }
}

View on GitHub (pinned to 57eb102834)

When it happens

Trigger: Thrown at src/Monolog/Handler/CubeHandler.php:156 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Seldaek/monolog@57eb102834 (2026-08-17). Data as JSON: /api/errors/f8c331fe1d6d4c8d. Report an issue: GitHub.