rabbitmq / rabbitmq-objc-client

RabbitMQ client for Objective-C and Swift
https://rabbitmq.com
Other
241 stars 84 forks source link

NSLocalizedDescription=Socket closed by remote peer #123

Closed Bala-Meeami closed 7 years ago

Bala-Meeami commented 7 years ago

Getting below error when trying to create connection with method initWithTransport: config: handshakeTimeout: channelAllocator: frameHandler: delegate: commandQueue: waiterFactory: heartbeatSender:

RMQCredentials *credentials = [[RMQCredentials alloc]initWithUsername:phoneNumber password:@"password"];

RMQConnectionConfig *config = [[RMQConnectionConfig alloc] initWithCredentials:credentials channelMax:[NSNumber numberWithInt:100] frameMax:[NSNumber numberWithInt:131072] heartbeat:[NSNumber numberWithInt:900] vhost:@"/" authMechanism:@"" recovery:[RMQConnectionRecover alloc]];

RMQTLSOptions *tlsOptions = [RMQTLSOptions fromURI:@"website.com"];

RMQTCPSocketTransport *transport = [[RMQTCPSocketTransport alloc] initWithHost:@"flowchat.flowtalk.com" port:[NSNumber numberWithInt:5672] tlsOptions:tlsOptions];

RMQGCDSerialQueue *localCommnadQueue = [[RMQGCDSerialQueue alloc]initWithName:@"testRMQQueue"];

id<RMQFrameHandler> frameHandler;
connection =  [[RMQConnection alloc] initWithTransport:transport config:config handshakeTimeout:[NSNumber numberWithInt:20] channelAllocator:[RMQMultipleChannelAllocator alloc] frameHandler:frameHandler delegate:self commandQueue:localCommnadQueue waiterFactory:[RMQSemaphoreWaiterFactory new] heartbeatSender:[RMQGCDHeartbeatSender alloc]];

[connection start:^{
    NSLog(@"connection start completion block");

}];

Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo={NSLocalizedDescription=Socket closed by remote peer

michaelklishin commented 7 years ago

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. This assumes two things:

  1. GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team)
  2. We have a certain amount of information to work with

We get at least a dozen of questions through various venues every single day, often quite light on details. At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because of that questions, investigations, root cause analysis, discussions of potential features are all considered to be mailing list material by our team. Please post this to rabbitmq-users.

Getting all the details necessary to reproduce an issue, make a conclusion or even form a hypothesis about what's happening can take a fair amount of time. Our team is multiple orders of magnitude smaller than the RabbitMQ community. Please help others help you by providing a way to reproduce the behavior you're observing, or at least sharing as much relevant information as possible on the list:

Feel free to edit out hostnames and other potentially sensitive information.

When/if we have enough details and evidence we'd be happy to file a new issue.

Thank you.

michaelklishin commented 7 years ago

See server logs. You may be trying to connect to a remote host as guest, which is prohibited by default, or server/proxy closes the socket for another reason.

iRiziya commented 3 years ago

Resolved