nats: permissions violations

Symptoms

Typical error message:

[ERR] Error nats: permissions violation for publish to "..."

This error usually means a xbus client is connected anonymously and still attempt to act as a actor client.

Checks

Check the logs at the client startup, it should say “Connecting as Anonymous”. The server logs also contains traces of client connections, it helps verifying if a client connects properly or not.

Solutions

If the client is indeed connected as anonymous, a few things to verify:

  • Make sure xbus-client register was properly run, before and after running xbusctl account accept.

  • Make sure the client finds the cert file: it should be named after the account name (<account-name>.certs), and present next the to configuration file.

    If not possible, the cert file path can be forced with the option tls.certfile in the configuration file