Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
542 views
in Technique[技术] by (71.8m points)

RabbitMQ PHP SSL connection issue

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...