Connect iPhone to local running RabbitMQ

410 views
Skip to first unread message

Mark Meesters

unread,
Apr 13, 2017, 9:29:25 AM4/13/17
to rabbitmq-users
Hello,

I am trying to connect my iPhone to a local running rabbitmq.









let conn = RMQConnection(uri: "amqp://test:test@ipaddress:15672",

                                delegate: RMQConnectionDelegateLogger())


        conn.start()


When I do this I am not able to connect to the running RabbitMQ and receiving this errors:








2017-04-13 15:24:49.736095 DPI-CLIENT[5697:1740099] Will start recovery for connection: <RMQConnection: 0x1702e3680>


2017-04-13 15:24:49.737369 DPI-CLIENT[5697:1740099] Starting recovery for connection: <RMQConnection: 0x1702e3680>


2017-04-13 15:24:49.741809 DPI-CLIENT[5697:1740099] Received connection: <RMQConnection: 0x1702e3680> disconnectedWithError: Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo={NSLocalizedDescription=Connection refused, NSLocalizedFailureReason=Error in connect() function}


2017-04-13 15:24:59.735936 DPI-CLIENT[5697:1739992] Received connection: <RMQConnection: 0x1702e3680> failedToConnectWithError: Error Domain=com.rabbitmq.rabbitmq-objc-client Code=1 "Handshake timed out." UserInfo={NSLocalizedDescription=Handshake timed out.}



Karl Nilsson

unread,
Apr 13, 2017, 9:40:39 AM4/13/17
to rabbitm...@googlegroups.com
Hi,

Is 15672 really the right port you are running amqp on? Normally it would be 5672. 15672 is normally used for the management UI/http api.

Cheers
Karl

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Staff Software Engineer, Pivotal/RabbitMQ

Michael Klishin

unread,
Apr 13, 2017, 11:16:15 AM4/13/17
to rabbitm...@googlegroups.com
You are using the wrong port, as Karl suggested.

See http://www.rabbitmq.com/networking.html for the list of ports used by RabbitMQ.

To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

M

unread,
Apr 18, 2017, 1:42:27 PM4/18/17
to rabbitmq-users
I tried the port you guys suggested... But I am still receiving errors when I try to connect from my iPhone:

Attempting to connect to local RabbitMQ broker


Waiting for messages.


2017-04-18 19:36:41.355737 DPI-CLIENT[10248:3154745] Received connection: <RMQConnection: 0x1700e7b00> disconnectedWithError: Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo={NSLocalizedDescription=Connection refused, NSLocalizedFailureReason=Error in connect() function}


When I do it the normal way and through the simulator is does work. But I would really like to be able to send messages from my iPhone so I could use the iPhone as sender and the simulator as receiver.

I am running RabbitMQ on my Macbook.

This is the code I am using now:

let conn = RMQConnection(uri: "amqp://te...@test192.168.178.17:5672",


                                 delegate: RMQConnectionDelegateLogger())


conn.start()


Or:

let conn = RMQConnection(uri: "amqp://192.168.178.17:5672",


                                 delegate: RMQConnectionDelegateLogger())


conn.start()


Do you guys have an example. Or do I have to open the firewall?



Op donderdag 13 april 2017 17:16:15 UTC+2 schreef Michael Klishin:
You are using the wrong port, as Karl suggested.

See http://www.rabbitmq.com/networking.html for the list of ports used by RabbitMQ.
On Thu, Apr 13, 2017 at 3:40 PM, Karl Nilsson <knil...@pivotal.io> wrote:
Hi,

Is 15672 really the right port you are running amqp on? Normally it would be 5672. 15672 is normally used for the management UI/http api.

Cheers
Karl
On 13 April 2017 at 14:29, Mark Meesters <mark.mee...@gmail.com> wrote:
Hello,

I am trying to connect my iPhone to a local running rabbitmq.









let conn = RMQConnection(uri: "amqp://test:test@ipaddress:15672",

                                delegate: RMQConnectionDelegateLogger())


        conn.start()


When I do this I am not able to connect to the running RabbitMQ and receiving this errors:








2017-04-13 15:24:49.736095 DPI-CLIENT[5697:1740099] Will start recovery for connection: <RMQConnection: 0x1702e3680>


2017-04-13 15:24:49.737369 DPI-CLIENT[5697:1740099] Starting recovery for connection: <RMQConnection: 0x1702e3680>


2017-04-13 15:24:49.741809 DPI-CLIENT[5697:1740099] Received connection: <RMQConnection: 0x1702e3680> disconnectedWithError: Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo={NSLocalizedDescription=Connection refused, NSLocalizedFailureReason=Error in connect() function}


2017-04-13 15:24:59.735936 DPI-CLIENT[5697:1739992] Received connection: <RMQConnection: 0x1702e3680> failedToConnectWithError: Error Domain=com.rabbitmq.rabbitmq-objc-client Code=1 "Handshake timed out." UserInfo={NSLocalizedDescription=Handshake timed out.}



--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.

To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.

To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

M

unread,
Apr 18, 2017, 2:05:25 PM4/18/17
to rabbitmq-users
Also receiving this error:

Received connection: <RMQConnection: 0x1702e1580> disconnectedWithError: Error Domain=kCFStreamErrorDomainNetDB Code=8 "nodename nor servname provided, or not known" UserInfo={NSLocalizedDescription=nodename nor servname provided, or not known}




Op dinsdag 18 april 2017 19:42:27 UTC+2 schreef M:

Michael Klishin

unread,
Apr 18, 2017, 2:38:35 PM4/18/17
to rabbitm...@googlegroups.com
Search for firewall in system preferences.

Also see server logs, all connections that send data are logged by default, whether they are successful or not.
Staff Software Engineer, Pivotal/RabbitMQ

Stefano

unread,
Jul 26, 2020, 12:40:55 PM7/26/20
to rabbitmq-users
Rabbit MQ by default is set to run on 127.0.0.1 and will not be visible outside your Mac to fix this:

Change the configuration file using:

sudo open -a TextEdit /usr/local/etc/rabbitmq/rabbitmq-env.conf

Edit from 
NODE_IP_ADDRESS=127.0.0.1

to 
NODE_IP_ADDRESS=0.0.0.0




Reply all
Reply to author
Forward
0 new messages