[zeromq-dev] Erratic failure to connect to an inproc socket

gonzalo diethelm gdiethelm at dcv.cl
Thu Apr 1 13:15:38 CEST 2010


> > WinXP SP3, using Java binding and current (git) 0MQ2.
> >
> > I am creating a REQ socket and connecting it to "inproc://pipe".
> > Sometimes the zmq_connect() returns -1 and the error code is set to
> > 156384719, which zmq_strerror() prints out as "Unknown error".
Anybody
> > can give me any hints to find out what's going on here?
> 
> It's ECONREFUSED. Win32 doesn't define that error code so 0MQ does it
> itself. However, zmq_strerror doesn't translate it to human readable
> stering. I'll fill up a ticket for the issue.

Ok, that clears up what error we are talking about. But what would cause
an inproc socket connection to be refused? If the other end has not come
up yet, the connection will be retried, right?

BTW, my copy of WinError.h has

#define WSAECONNREFUSED 10061L

and WinSock2.h has the following (consistent with WinError.h):

#define WSABASEERR              10000
...
#define WSAECONNREFUSED         (WSABASEERR+61)
#define ECONNREFUSED            WSAECONNREFUSED

Regarding zmq_strerror, would you consider a patch that prepends the
numeric error value to the string that describes it? That way, for
EADDRINUSE (under Windows) you would get the string "10048 - Address in
use". Perhaps "EADDRINUSE - Address in use" or "10048 - EADDRINUSE -
Address in use" would be even more informative. This might help find out
the cause for errors.

-- 
Gonzalo Diethelm



----------------------------------------- 
Declaración de confidencialidad: Este Mensaje esta destinado para
el uso de la o las personas o entidades a quien ha sido dirigido y
puede contener información reservada y confidencial que no puede
ser divulgada, difundida, ni aprovechada en forma alguna. El uso no
autorizado de la información contenida en este correo podrá ser
sancionado de conformidad con la ley chilena. 
Si usted ha recibido este correo electrónico por error, le pedimos
eliminarlo junto con los archivos adjuntos y avisar inmediatamente
al remitente, respondiendo este mensaje. 

"Before printing this e-mail think if is really necesary".
Disclosure: This Message is to be used by the individual,
individuals or entities that it is addressed to and may include
private and confidential information that may not be disclosed,
made public nor used in any way at all. Unauthorized use of the
information in this electronic mail message may be subject to the
penalties set forth by Chilean law. 
If you have received this electronic mail message in error, we ask
you to destroy the message and its attached file(s) and to
immediately notify the sender by answering this message. 




More information about the zeromq-dev mailing list