emqxarchive / emqx-docker

This repository is no longer maintained, please go to https://github.com/emqx/emqx-rel/tree/master/deploy/docker
Apache License 2.0
235 stars 162 forks source link

Fail to use `EMQ_ADMIN_PASSWORD` to change admin password #38

Closed JacksonJia closed 6 years ago

JacksonJia commented 6 years ago

I use rancher to run a emqtt cluster, and my emq image is v2.3.3 (using docker image from http://emqtt.io/downloads), and i just set some environments:

EMQ_CLUSTER__DISCOVERY=etcd
EMQ_CLUSTER__AUTOHEAL=on
EMQ_CLUSTER__AUTOCLEAN=1m
EMQ_CLUSTER__ETCD__SERVER = http:\/\/etcd:2379
EMQ_CLUSTER__ETCD__PREFIX=emqcl
EMQ_CLUSTER__ETCD__NODE_TTL=1m
EMQ_WAIT_TIME=30
EMQ_LOADED_PLUGINS=emq_recon,emq_modules,emq_retainer
EMQ_ADMIN_PASSWORD=2453tobW4nN

sometime i got a error, log file looks like this:

emqttd trace is starting...[ok]
emqttd client manager is starting...[ok]
emqttd session manager is starting...[ok]
emqttd session supervisor is starting...[ok]
emqttd wsclient supervisor is starting...[ok]
emqttd broker is starting...[ok]
emqttd alarm is starting...[ok]
emqttd mod supervisor is starting...[ok]
emqttd bridge supervisor is starting...[ok]
emqttd access control is starting...[ok]
emqttd system monitor is starting...[ok]
emqttd 2.3.3 is running now
Load emq_mod_presence module successfully.
mqtt:tcp listen on 127.0.0.1:11883 with 4 acceptors.
mqtt:tcp listen on 0.0.0.0:1883 with 64 acceptors.
mqtt:ws listen on 0.0.0.0:8083 with 16 acceptors.
mqtt:ssl listen on 0.0.0.0:8883 with 32 acceptors.
mqtt:wss listen on 0.0.0.0:8084 with 4 acceptors.
mqtt:api listen on 0.0.0.0:8080 with 4 acceptors.
['2018-01-23T04:19:58Z']:waiting emqttd
['2018-01-23T04:19:58Z']:emqttd start
['2018-01-23T04:19:58Z']:admin password changed to 2453tobW4nN
Usage: emqttd_ctl
--------------------------------------------------------------------------------
status                                          # Show broker status
--------------------------------------------------------------------------------
broker                                          # Show broker version, uptime and description
broker pubsub                                   # Show process_info of pubsub
broker stats                                    # Show broker statistics of clients, topics, subscribers
broker metrics                                  # Show broker metrics
--------------------------------------------------------------------------------
cluster join <Node>                             # Join the cluster
cluster leave                                   # Leave the cluster
cluster force-leave <Node>                      # Force the node leave from cluster
cluster status                                  # Cluster status
--------------------------------------------------------------------------------
users list                                      # List users
users add <Username> <Password>                 # Add User
users del <Username>                            # Delete User
--------------------------------------------------------------------------------
acl reload                                      # reload etc/acl.conf
--------------------------------------------------------------------------------
clients list                                    # List all clients
clients show <ClientId>                         # Show a client
clients kick <ClientId>                         # Kick out a client
--------------------------------------------------------------------------------
sessions list                                   # List all sessions
sessions list persistent                        # List all persistent sessions
sessions list transient                         # List all transient sessions
sessions show <ClientId>                        # Show a session
--------------------------------------------------------------------------------
routes list                                     # List all routes
routes show <Topic>                             # Show a route
--------------------------------------------------------------------------------
topics list                                     # List all topics
topics show <Topic>                             # Show a topic
--------------------------------------------------------------------------------
subscriptions list                              # List all subscriptions
subscriptions show <ClientId>                   # Show subscriptions of a client
subscriptions add <ClientId> <Topic> <QoS>      # Add a static subscription manually
subscriptions del <ClientId> <Topic>            # Delete a static subscription manually
--------------------------------------------------------------------------------
plugins list                                    # Show loaded plugins
plugins load <Plugin>                           # Load plugin
plugins unload <Plugin>                         # Unload plugin
--------------------------------------------------------------------------------
bridges list                                    # List bridges
bridges options                                 # Bridge options
bridges start <Node> <Topic>                    # Start a bridge
bridges start <Node> <Topic> <Options>          # Start a bridge with options
bridges stop <Node> <Topic>                     # Stop a bridge
--------------------------------------------------------------------------------
vm all                                          # Show info of Erlang VM
vm load                                         # Show load of Erlang VM
vm memory                                       # Show memory of Erlang VM
vm process                                      # Show process of Erlang VM
vm io                                           # Show IO of Erlang VM
vm ports                                        # Show Ports of Erlang VM
--------------------------------------------------------------------------------
mnesia                                          # Mnesia system info
--------------------------------------------------------------------------------
trace list                                      # List all traces
trace client <ClientId> <LogFile>               # Trace a client
trace client <ClientId> off                     # Stop tracing a client
trace topic <Topic> <LogFile>                   # Trace a topic
trace topic <Topic> off                         # Stop tracing a Topic
--------------------------------------------------------------------------------
listeners                                       # List listeners
listeners restart <Proto> <Port>                # Restart a listener
listeners stop    <Proto> <Port>                # Stop a listener
--------------------------------------------------------------------------------
recon memory                                    # recon_alloc:memory/2
recon allocated                                 # recon_alloc:memory(allocated_types, current|max)
recon bin_leak                                  # recon:bin_leak(100)
recon node_stats                                # recon:node_stats(10, 1000)
recon remote_load Mod                           # recon:remote_load(Mod)
--------------------------------------------------------------------------------
retainer info                                   # Show the count of retained messages
retainer topics                                 # Show all topics of retained messages
retainer clean                                  # Clean all retained messages

And you can see emqttd_ctl does not have option admins which used in here

emqplus commented 6 years ago

@JacksonJia The emqttd_ctl admins CLI is registered by emq_dashboard plugin. So...

EMQ_LOADED_PLUGINS=emq_recon,emq_modules,emq_retainer,emq_dashbaord