I have RabbitMQ installed in my server and I have it running over SSL. I can connect via the browser management like https://myserver.com:15671
I want to run and consume some jobs via PHP library php-amqplib/php-amqplib, I have the following code to make the connection via SSL from PHP to my RabbitMQ instance:
$rabbitMQConnectionObj = new PhpAmqpLibConnectionAMQPSSLConnection(
'RABBITMQ_HOST',
'RABBITMQ_PORT',//5671
'RABBITMQ_USERNAME',
'RABBITMQ_PASSWORD',
'/',
array(
'capath' => '/etc/ssl/certs'
)
);
The SSL certificates in my server are located in /etc/ssl/certs
When I run the PHP code I get : ErrorException stream_socket_client(): unable to connect to ssl://host.xxx.xxx:5671 (Unknown error)
Any help on this would be appreciated.
Thank you.
question from:
https://stackoverflow.com/questions/65940246/rabbitmq-php-ssl-connection-issue 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…