[rabbitmq-discuss] Creating an auth plugin (Kerberos)

Simon MacMullen simon at rabbitmq.com
Mon Dec 3 11:01:09 GMT 2012


On 29/11/12 16:46, Simon Lundström wrote:
> Sorry to revisit an old message, but it's kind of related...

> When trying to handle when password is undefined I have found that
> the {'EXIT', Port, normal} message is only sent when a user logs in
> via AMQP (and probably STOMP).

Well, the {'EXIT', Port, Reason} message is sent by the Erlang runtime, 
so whatever is determining whether it gets sent or not is down to the 
interaction between the runtime and kinit.

It's worth noting at this point that I have never written anything that 
uses open_port, so we really are reaching the limits of my ability to 
help you. According to the docs:

"During use of a port opened using {spawn, Name}, {spawn_driver, Name} 
or {spawn_executable, Name}, errors arising when sending messages to it 
are reported to the owning process using signals of the form {'EXIT', 
Port, PosixCode}. See file(3) for possible values of PosixCode."

So it sounds like the messages might be optional.

> I never receive an EXIT-message when a user logs in via the
> API/mgmt.
>
> Why is that? How can I handle the EXIT-message "sometimes"?

If you really are only getting them sometimes, then "after 0" should be 
fine as long as you have received everything else you expect from the 
port by that point.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list