Skip to content

mosquitto_ctrl is not using options file specified via -o parameter #2471

Closed
@Vitaljok

Description

@Vitaljok

Hello!

Followed the documentation for the Dynamic Security plugin (https://mosquitto.org/documentation/dynamic-security/) and, perhaps, found a bug.

I have started local broker on custom port with enabled Dynamic security plugin.
Following command works as expected:

$ mosquitto_ctrl -h localhost -p 23456 -u admin -P asd dynsec getDefaultACLAccess

publishClientSend    : deny
publishClientReceive : allow
subscribe            : deny
unsubscribe          : allow

As described in the documentation

... mosquitto_ctrl can load an options file ... from a default location ... $HOME/.config/mosquitto_ctrl

If I create mentioned file with following content

-h localhost
-p 23456
-u admin
-P asd

then it also works as expected:

$ mosquitto_ctrl dynsec getDefaultACLAccess

publishClientSend    : deny
publishClientReceive : allow
subscribe            : deny
unsubscribe          : allow

The documentation also says

You may override this behaviour by manually specifying an options file with -o <path to options file>.

But the file is not loaded and default options are used instead (it tries to connect to the broker on the default port).

$ mosquitto_ctrl -o /path/to/my/options dynsec getDefaultACLAccess

Error: Connection refused

Is this a bug or an undocumented feature?
Thanks!

Versions:

  • mosquitto_ctrl version 2.0.14
  • Ubuntu 18.04.6 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: mosquitto-appsStatus: CompletedNothing further to be done with this issue, it can be closed by the requestor or committer.

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions