首页 > 解决方案 > 在 ActiveMQ Artemis 中创建用户时出错

问题描述

这看起来应该是这里描述的一个简单的命令运行,它显示了一个简单的示例:

./artemis user add --username guest --password guest --role admin

但它给出了一个错误:

Found unexpected parameters: [--username, guest]

我在这里想念什么?我在代理目录 (/var/lib/broker1/bin)

我在这里有什么问题吗?

标签: activemq-artemis

解决方案


参数名称--username无效。你应该--user改用。

值得您通过运行help命令查看有效参数,例如:

./artemis help user add

这是该命令的输出:

NAME
        artemis user add - Add a new user

SYNOPSIS
        artemis user add [--entry <entry>] [--password <password>] [--plaintext]
                [--role <role>] [--silent] [--user <username>] [--verbose]

OPTIONS
        --entry <entry>
            The appConfigurationEntry (default: activemq)

        --password <password>
            the password (Default: input)

        --plaintext
            using plaintext (Default false)

        --role <role>
            user's role(s), comma separated

        --silent
            It will disable all the inputs, and it would make a best guess for
            any required input

        --user <username>
            The user name (Default: input)

        --verbose
            Adds more information on the execution

我已提交更改以修复文档。


推荐阅读