php - RabbitMQ - rabbitmq-users › No connection could be made because the target machine actively refused it -
I'm new to RabbitMQ and I'm trying to follow RabbitMQ.
We have copied the code for send.php
and received.php
, but when I send.php
and get.php
script, I get the following error:
Error connecting to server (10061): No connection can be made because the target machine Actively denied
I disabled my firewall and all my anti-virus programs, but I still get the same error.
send.php and get.php's code:
send.php
& lt; Php require_once __DIR__ '/vendor/autoload.php'; Use phpAmqpLib \ Connection \ AMQPConnection; Use phpAmqpLib \ Message \ AMQPMessage; $ Connection = New AMQPConnection ('localhost', 5672, 'guest', 'guest'); $ Channel = $ connection- & gt; Channel (); $ Channel- & gt; Queue_declare ('hello', false, false, false, false); $ Msg = New AMQPMessage ('Hello World!'); $ Channel- & gt; Basic lighting ($ msg, '', 'hello'); Echo "[x] Hello World! '\ N"; $ Channel & gt; near (); $ Connection & gt; near (); ? & Gt;
received. Php
callback)) {$ channel- & gt; Wait (); } $ Channel- & gt; Close (); $ Connection & gt; near (); ? & Gt;
Can anyone help me with this problem?
search error connecting to server (10061)
I found:
WSAECONNREFUSED (10061)
10061 A connection denied error has been sent to you by the server. You can not create a connection because the target computer has actively denied it. The most common reason is the incorrectly configured server, the absolute server or the wrong port specified by the client.
A list of possible reasons for error in the website written above, and you can lead to a solution.
Comments
Post a Comment