Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLSv1.2 Error:Connection failed! (Error: 0x00 0x00) #135

Open
shuhadaharris opened this issue Mar 31, 2022 · 0 comments
Open

TLSv1.2 Error:Connection failed! (Error: 0x00 0x00) #135

shuhadaharris opened this issue Mar 31, 2022 · 0 comments

Comments

@shuhadaharris
Copy link

shuhadaharris commented Mar 31, 2022

Hi,

I'm using the script to connect to Mosquitto Broker using TLS1.2.

My issue is that, the connection seems to be unstable. I run my PHP code and received some data for a while then it throws me some PHP Warning but I had to re-run the code in order to get the data back.

This line gives me the error:
$this->socket = stream_socket_client('tlsv1.2://' . $this->address . ':' . $this->port, $errno, $errstr, 60, STREAM_CLIENT_CONNECT, $socketContext);

Warning/Error Messages received:

  1. PHP Warning: stream_socket_client(): Filename cannot be empty in \phpMQTT.php line 293

    • $this->socket = stream_socket_client('tlsv1.2://..........
  2. PHP Warning: failed loading cafile stream: `' in \phpMQTT.php line 293

    • $this->socket = stream_socket_client('tlsv1.2://..........
  3. PHP Warning: stream_socket_client(): Failed to enable crypto in \phpMQTT.php on line 293

    • $this->socket = stream_socket_client('tlsv1.2://..........
  4. Error:Connection failed! (Error: 0x00 0x00)

It would be good if anyone can give me any idea on why this happens and how do I fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant