[zeromq-dev] debugging curve handshake

Pieter Hintjens ph at imatix.com
Sun Feb 16 11:45:13 CET 2014


On Sat, Feb 15, 2014 at 1:50 AM, Drew Crawford <drew at sealedabstract.com> wrote:

> The
> client is just reconnecting over and over to the server, wasting server
> resources, only to be rejected and immediately reconnect.  The libzmq client
> should report some kind of useful error and give up in this case.

Yes, this is definitely poor behavior and on the list for fixing. The
protocol now defines explicit error codes the client can use.

For debugging authentication, the best bet is to trace all ZAP
requests and responses. You can do that trivially in your ZAP handler
(e.g. in zauth.c:220,

    zmsg_t *request = zmsg_recv (handler);
    zmsg_dump (request);   // << added

And similarly for the response.

-Pieter



More information about the zeromq-dev mailing list