karpy47 / PhpMqttClient

MQTT 3.1.1 Client with TSL support in PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reached EOF for stream MQTT: Closing socket MQTT: Connection failed! Error: 0

chakya opened this issue · comments

I got this error


$client->setEncryption('amazonRootCA1.pem');
$client->setClientEncryption('certificate.pem.crt','private.pem.key');

I've checked all the cert and nothing is wrong it is working when I use it with mqtt.fx

Sounds strange. Try increasing the timeout when calling sendConnect.
The client did not get an ACK from the server on the CONNECT message before timeout occured.

Does the TLS support pem format?

Yes, use it myself. Try a faulty cert to see if you get same response.