Received connection: <RMQConnection: 0x17e87200> disconnectedWithError: Error Domain=NSPOSIXErrorDomain Code=0 "Undefined error: 0" UserInfo={NSLocalizedFailureReason=Error in connect() function, NSLocalizedDescription=Undefined error: 0}
Received connection: <RMQConnection: 0x17d84520> disconnectedWithError: Error Domain=NSPOSIXErrorDomain Code=0 "Undefined error: 0" UserInfo={NSLocalizedFailureReason=Error in connect() function, NSLocalizedDescription=Undefined error: 0}
Received connection: <RMQConnection: 0x17e87200> failedToConnectWithError: Error Domain=com.rabbitmq.rabbitmq-objc-client Code=1 "Handshake timed out." UserInfo={NSLocalizedDescription=Handshake timed out.}
Received connection: <RMQConnection: 0x17d84520> failedToConnectWithError: Error Domain=com.rabbitmq.rabbitmq-objc-client Code=1 "Handshake timed out." UserInfo={NSLocalizedDescription=Handshake timed out.}
Starting recovery for connection: <RMQConnection: 0x17d84520>
Will start recovery for connection: <RMQConnection: 0x17d84520>
Received connection: <RMQConnection: 0x17d84520> disconnectedWithError: Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={NSLocalizedFailureReason=Error in connect() function, NSLocalizedDescription=No such process}
Received connection: <RMQConnection: 0x17d84520> failedToConnectWithError: Error Domain=com.rabbitmq.rabbitmq-objc-client Code=1 "Handshake timed out." UserInfo={NSLocalizedDescription=Handshake timed out.}
I really don't know what to do. I saw some posts in StackOverflow, suggesting downloading Erlang but its already installed in my computer.
If someone can help me, i'll go forward. Thanks :)
--
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.
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.
--MKStaff 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.
- (void)viewDidLoad {
[super viewDidLoad];
// running /usr/local/sbin/rabbitmq-server from terminal
[self send];
[self receive];
}
- (void)send {
NSLog(@"Attempting to connect to local RabbitMQ broker");
RMQConnection *conn = [[RMQConnection alloc] initWithDelegate:[RMQConnectionDelegateLogger new]];
[conn start];
id<RMQChannel> ch = [conn createChannel];
RMQQueue *q = [ch queue:@"hello"];
[ch.defaultExchange publish:[@"Hello World!" dataUsingEncoding:NSUTF8StringEncoding] routingKey:q.name];
NSLog(@"Sent 'Hello World!'");
[conn close];
}
- (void)receive {
NSLog(@"Attempting to connect to local RabbitMQ broker");
RMQConnection *conn = [[RMQConnection alloc] initWithDelegate:[RMQConnectionDelegateLogger new]];
[conn start];
id<RMQChannel> ch = [conn createChannel];
RMQQueue *q = [ch queue:@"hello"];
NSLog(@"Waiting for messages.");
[q subscribe:^(RMQMessage * _Nonnull message) {
NSLog(@"Received %@", [[NSString alloc] initWithData:message.body encoding:NSUTF8StringEncoding]);
}];
NSLog(@"end of receiving");
}Server logs are nothing. It just says "started" and noone is coming or going.
I tried to run code again and get:
2016-08-12 09:31:25.307 tutorial[828:381859] Attempting to connect to local RabbitMQ broker
2016-08-12 09:31:25.380 tutorial[828:381859] Sent 'Hello World!'
2016-08-12 09:31:25.381 tutorial[828:381859] Attempting to connect to local RabbitMQ broker
2016-08-12 09:31:25.384 tutorial[828:381859] Waiting for messages.
2016-08-12 09:31:25.385 tutorial[828:381859] end of receiving
2016-08-12 09:31:25.686 tutorial[828:382125] Received connection: <RMQConnection: 0x156bad90> disconnectedWithError: Error Domain=NSPOSIXErrorDomain Code=0 "Undefined error: 0" UserInfo={NSLocalizedFailureReason=Error in connect() function, NSLocalizedDescription=Undefined error: 0}
2016-08-12 09:31:25.710 tutorial[828:382125] Received connection: <RMQConnection: 0x156d4ba0> disconnectedWithError: Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={NSLocalizedFailureReason=Error in connect() function, NSLocalizedDescription=No such process}
2016-08-12 09:31:35.376 tutorial[828:382139] Received connection: <RMQConnection: 0x156bad90> failedToConnectWithError: Error Domain=com.rabbitmq.rabbitmq-objc-client Code=1 "Handshake timed out." UserInfo={NSLocalizedDescription=Handshake timed out.}
2016-08-12 09:31:35.390 tutorial[828:382139] Received connection: <RMQConnection: 0x156d4ba0> failedToConnectWithError: Error Domain=com.rabbitmq.rabbitmq-objc-client Code=1 "Handshake timed out." UserInfo={NSLocalizedDescription=Handshake timed out.}
Then it tries recovery and gets the same result.
I hope i'm clear.
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.
I just tried Java tutorial in both localhost and other computer and get correct outputs. In other words, my problem is about Objective-C. Does this mean something?
--
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
public class Send {
private final static String QUEUE_NAME = "hello";
public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(QUEUE_NAME, false, false, false, null);
String message = "Hello World!";
channel.basicPublish("", QUEUE_NAME, null, message.getBytes("UTF-8"));
System.out.println(" [x] Sent '" + message + "'");
channel.close();
connection.close();
}
}and Recv.Java
import com.rabbitmq.client.*;
import java.io.IOException;
public class Recv {
private final static String QUEUE_NAME = "hello";
public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(QUEUE_NAME, false, false, false, null);
System.out.println(" [*] Waiting for messages. To exit press CTRL+C");
Consumer consumer = new DefaultConsumer(channel) {
@Override
public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body)
throws IOException {
String message = new String(body, "UTF-8");
System.out.println(" [x] Received '" + message + "'");
}
};
channel.basicConsume(QUEUE_NAME, true, consumer);
}
}I put breakpoints and see that i generally get no error while sending (in objective-c). However, while receiving [conn start] gives first error.
Received connection: <RMQConnection: 0x146bde10> failedToConnectWithError: Error Domain=com.rabbitmq.rabbitmq-objc-client Code=1 "Handshake timed out." UserInfo={NSLocalizedDescription=Handshake timed out.}
I thought about hanshake time but i know it's not the problem. Still if you think config file can fix the problem, maybe you can tell me what to write in that file.
Thanks for your help.
--
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.
=INFO REPORT==== 15-Aug-2016::09:36:46 ===
Starting RabbitMQ 3.6.1 on Erlang 18.3
Copyright (C) 2007-2016 Pivotal Software, Inc.
Licensed under the MPL. See http://www.rabbitmq.com/
=INFO REPORT==== 15-Aug-2016::09:36:46 ===
node : rabbit@localhost
home dir : /Users/gamze
config file(s) : /usr/local/etc/rabbitmq/rabbitmq.config (not found)
cookie hash : xSAWSSXW4feFRoZTvjFwXg==
log : /usr/local/var/log/rabbitmq/rabbit@localhost.log
sasl log : /usr/local/var/log/rabbitmq/rabbit@localhost-sasl.log
database dir : /usr/local/var/lib/rabbitmq/mnesia/rabbit@localhost
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
Memory limit set to 3178MB of 7947MB total.
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
Disk free limit set to 50MB
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
Limiting to approx 156 file handles (138 sockets)
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
FHC read buffering: OFF
FHC write buffering: ON
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
Priority queues enabled, real BQ is rabbit_variable_queue
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
Management plugin: using rates mode 'basic'
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
msg_store_transient: using rabbit_msg_store_ets_index to provide index
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
msg_store_persistent: using rabbit_msg_store_ets_index to provide index
=WARNING REPORT==== 15-Aug-2016::09:36:50 ===
msg_store_persistent: rebuilding indices from scratch
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
started TCP Listener on 127.0.0.1:5672
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
rabbit_stomp: default user 'guest' enabled
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
started STOMP TCP Listener on [::]:61613
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
MQTT retained message store: rabbit_mqtt_retained_msg_store_dets
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
started MQTT TCP Listener on [::]:1883
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
Management plugin started. Port: 15672
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
Statistics database started.
=INFO REPORT==== 15-Aug-2016::09:36:50 ===
Server startup complete; 10 plugins started.
* rabbitmq_management_visualiser
* rabbitmq_management
* rabbitmq_web_dispatch
* webmachine
* mochiweb
* rabbitmq_mqtt
* rabbitmq_stomp
* rabbitmq_amqp1_0
* rabbitmq_management_agent
* amqp_client
--
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.
RabbitMQ does not give an abstract config file at first as i know (and guess). Server log says "not found" either. I thought i can create one but not sure to give/write what for what. Thus, i left it. If you tell me, i can make it.
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.
--MKStaff 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.
=INFO REPORT==== 15-Aug-2016::10:52:49 ===
accepting AMQP connection <0.7185.1> (127.0.0.1:50583 -> 127.0.0.1:5672)
=INFO REPORT==== 15-Aug-2016::10:52:49 ===
closing AMQP connection <0.7185.1> (127.0.0.1:50583 -> 127.0.0.1:5672)
=INFO REPORT==== 15-Aug-2016::10:52:58 ===
accepting AMQP connection <0.7296.1> (127.0.0.1:50585 -> 127.0.0.1:5672)--
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.
--
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.
The issue has nothing to do with CocoaPods: you have a working client, it's just failing to complete a connection and handshake with the local broker.Remember that the Objective-C client is asynchronous, so your send code is probably failing too. Breakpointing probably won't help in this case, as you'll need to look at the objects sent to the delegate to decide whether it's send or receive code that's failing.
On Mon, Aug 15, 2016 at 9:17 AM G.Y. <ylmz...@gmail.com> wrote:
Yes, that is the situation.--I used Cocoa-Pods for downloading RabbitMQ Client framework. Maybe problem is due to this but, i really don't know.I'll use Wireshark then.
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.
--
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.