[zeromq-dev] Zmq Unknown error (110) from router socket

Antti Karanta Antti.Karanta at neromsoft.com
Tue Jun 9 08:24:53 CEST 2015


Occasionally I get zmq unknown error when sending messages via a router 
socket. An example stack trace:


2015-Jun-04 14:34:01 +0300 Nyarlathotep ERROR [nerom.kannel.dbserver] -
java.lang.Thread.run           Thread.java:  745
                                                            ...
          nerom.kannel.networking.request-handling/send-replies 
request_handling.clj:  118
                nerom.kannel.networking.messaging-util/send-all 
messaging_util.clj:   27
                nerom.kannel.networking.messaging-util/send-all 
messaging_util.clj:   37
zeromq.zmq/send               zmq.clj:  159
org.zeromq.ZMQ$Socket.send              ZMQ.java: 1504
org.zeromq.ZMQ$Socket.send              ZMQ.java
org.zeromq.ZMQException: Unknown error
     errorCode: 110

The error is reproducible at least by killing the process to which the 
messages are addressed to before it has received all of them. It seems 
to occur randomly at other times as well.

In what circumstances does this error occur? What should / can I do 
about it?

The socket is exclusively used from a single thread so that should not 
be an issue. Also, the amount of data sent compared to the memory 
available is modest so high water mark should not come into play here.


Environment:  zmq version 4.0.4, using cljzmq wrappers, windows 7 on x64.

Here's how the router socket is initialized:

router-socket (doto (zmq/socket (:zmq-context request-handler) :router)
                                 (zmq/set-receive-timeout 100)
                                 (zmq/set-router-mandatory true)
                                 (zmq/set-recv-hwm 0)
                                 (zmq/set-send-hwm 0)
                                 (zmq/bind (str "tcp://*:" (:port 
request-handler))))






More information about the zeromq-dev mailing list