Martin,

I tried it already and if I introduce a small delay after binding a socket,
then everything works as supposed to. However, I bind and then connect
sockets sequentially from a single thread, so if these calls are synchronous
they should be executed in a right sequence. Is there any "asynchronicity"
in socket binding? If so then is there a way to disable it?

I also noticed that socket binding on Centos5 platform sometimes fails too.
I will try adding another delay after socket creation and before binding but
this error is more rare and harder to reproduce.

I also tried it on non-Amazon machine to rule out their custom kernel, but
result is still the same.

> -----Original Message-----
> From: zeromq-dev-boun...@lists.zeromq.org 
> [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of 
> Martin Hurton
> Sent: July 19, 2010 2:29 AM
> To: 0MQ development list
> Subject: Re: [zeromq-dev] "inproc" socket connection fails 
> onCentos5/AmazonEC
> 
> Hi Dmitri,
> 
> I think this is a timing issue; you call connect() before the bind ()
> has finished.
> Try to postpone  the connect() call by 1 second.
> 
> - Martin
> 
> On Mon, Jul 19, 2010 at 5:12 AM, Dmitri Toubelis
> <dmitri.toube...@alkeron.com> wrote:
> > Some more information on this issue. This is happening with 
> PUB/SUB sockets.
> > The program successfully binds SUB socket to inproc 
> endpoint. But then
> > subsequent connect to corresponding PUB socket fails with 
> "Connection
> > refused" error.
> >
> > -----Original Message-----
> > From: zeromq-dev-boun...@lists.zeromq.org
> > [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of 
> Dmitri Toubelis
> > Sent: July 18, 2010 10:12 PM
> > To: zeromq-dev@lists.zeromq.org
> > Subject: [zeromq-dev] "inproc" socket connection fails on 
> Centos5/AmazonEC
> >
> > I'm trying to run my code that makes use of "inproc" 
> sockets on Centos5
> > (running on Amazon) and it fails with "Connection refused" 
> message. It works
> > fine on my development machine which is FC7. Is this a 
> known issue? Is there
> > any workaround?
> >
> > Regards,
> > Dmitri
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev@lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev@lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to