emqtt安装过程_os monj win32 supervisor port (win32sysinfo) erlan
作者:运维做开发 | 2024-07-17 16:03:48
赞
踩
os monj win32 supervisor port (win32sysinfo) erlang has closed
[root@templatetest08 emqttd]# uname -a
Linux templatetest08 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@templatetest08 emqttd]# ll
total 8
drwxr-xr-x. 2 root root 4096 May 11 15:51 bin
drwxr-xr-x. 4 root root 54 May 11 15:51 data
drwxr-xr-x. 8 root root 70 May 11 15:51 erts-9.0
drwxr-xr-x. 4 root root 82 May 11 15:51 etc
drwxr-xr-x. 2 root root 6 May 11 15:51 hook_lua
drwxr-xr-x. 64 root root 4096 May 11 15:51 lib
drwxr-xr-x. 2 root root 38 May 31 14:38 log
drwxr-xr-x. 3 root root 54 May 11 15:51 releases
[root@templatetest08 emqttd]# cd log/
[root@templatetest08 log]# ll
total 0
-rw-r--r--. 1 root root 0 May 31 14:38 crash.log
-rw-r--r--. 1 root root 0 May 31 14:38 error.log
[root@templatetest08 log]# cat error.log
You have new mail in /var/spool/mail/root
[root@templatetest08 log]# cat crash.log
[root@templatetest08 log]# ll
total 0
-rw-r--r--. 1 root root 0 May 31 14:38 crash.log
-rw-r--r--. 1 root root 0 May 31 14:38 error.log
[root@templatetest08 log]# cd ..
[root@templatetest08 emqttd]# ll
total 8
drwxr-xr-x. 2 root root 4096 May 11 15:51 bin
drwxr-xr-x. 4 root root 54 May 11 15:51 data
drwxr-xr-x. 8 root root 70 May 11 15:51 erts-9.0
drwxr-xr-x. 4 root root 82 May 11 15:51 etc
drwxr-xr-x. 2 root root 6 May 11 15:51 hook_lua
drwxr-xr-x. 64 root root 4096 May 11 15:51 lib
drwxr-xr-x. 2 root root 38 May 31 14:38 log
drwxr-xr-x. 3 root root 54 May 11 15:51 releases
[root@templatetest08 emqttd]# cd ..
[root@templatetest08 home]# ll
total 19988
drwxr-xr-x. 10 root root 102 May 11 15:51 emqttd
-rw-r--r--. 1 root root 20466851 May 31 14:31 emqttd-centos7-v2.3.8.zip
drwxr-x---. 2 monitor monitor 79 Dec 26 21:06 monitor
[root@templatetest08 home]# cd emqttd && ./bin/emqttd console
Exec: /home/emqttd/erts-9.0/bin/erlexec -boot /home/emqttd/releases/2.3.8/emqttd -mode embedded -boot_var ERTS_LIB_DIR /home/emqttd/erts-9.0/../lib -mnesia dir "/home/emqttd/data/mnesia/emq@127.0.0.1" -config /home/emqttd/data/configs/app.2018.05.31.14.39.46.config -args_file /home/emqttd/data/configs/vm.2018.05.31.14.39.46.args -vm_args /home/emqttd/data/configs/vm.2018.05.31.14.39.46.args -- console
Root: /home/emqttd
/home/emqttd
Protocol 'inet_tcp': the name emq@127.0.0.1 seems to be in use by another Erlang node
[root@templatetest08 emqttd]# ps -ef | grep inet_tcp
root 45499 44972 1 14:38 pts/1 00:00:01 /home/emqttd/erts-9.0/bin/beam.smp -W w -e 256000 -Q 65536 -P 256000 -A 32 -K true -zdbbl 8192 -- -root /home/emqttd -progname bin/emqttd -- -home /root -- -boot /home/emqttd/releases/2.3.8/emqttd -mode embedded -boot_var ERTS_LIB_DIR /home/emqttd/erts-9.0/../lib -mnesia dir "/home/emqttd/data/mnesia/emq@127.0.0.1" -config /home/emqttd/data/configs/app.2018.05.31.14.38.14.config -kernel net_ticktime 60 -smp auto -setcookie emqsecretcookie -proto_dist inet_tcp -name emq@127.0.0.1 -vm_args /home/emqttd/data/configs/vm.2018.05.31.14.38.14.args -- console
root 46429 44972 0 14:40 pts/1 00:00:00 grep --color=auto inet_tcp
You have new mail in /var/spool/mail/root
[root@templatetest08 emqttd]# kill -9 45499
You have new mail in /var/spool/mail/root
[root@templatetest08 emqttd]# [os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
^C
[1]+ Killed ./bin/emqttd console
[root@templatetest08 emqttd]# ll
total 8
drwxr-xr-x. 2 root root 4096 May 11 15:51 bin
drwxr-xr-x. 4 root root 54 May 11 15:51 data
drwxr-xr-x. 8 root root 70 May 11 15:51 erts-9.0
drwxr-xr-x. 4 root root 82 May 11 15:51 etc
drwxr-xr-x. 2 root root 6 May 11 15:51 hook_lua
drwxr-xr-x. 64 root root 4096 May 11 15:51 lib
drwxr-xr-x. 2 root root 38 May 31 14:38 log
drwxr-xr-x. 3 root root 54 May 11 15:51 releases
[root@templatetest08 emqttd]# cd ..
[root@templatetest08 home]# ll
total 19988
drwxr-xr-x. 10 root root 102 May 11 15:51 emqttd
-rw-r--r--. 1 root root 20466851 May 31 14:31 emqttd-centos7-v2.3.8.zip
drwxr-x---. 2 monitor monitor 79 Dec 26 21:06 monitor
[root@templatetest08 home]# cd emqttd && ./bin/emqttd console
Exec: /home/emqttd/erts-9.0/bin/erlexec -boot /home/emqttd/releases/2.3.8/emqttd -mode embedded -boot_var ERTS_LIB_DIR /home/emqttd/erts-9.0/../lib -mnesia dir "/home/emqttd/data/mnesia/emq@127.0.0.1" -config /home/emqttd/data/configs/app.2018.05.31.14.43.29.config -args_file /home/emqttd/data/configs/vm.2018.05.31.14.43.29.args -vm_args /home/emqttd/data/configs/vm.2018.05.31.14.43.29.args -- console
Root: /home/emqttd
/home/emqttd
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:32] [hipe] [kernel-poll:true]
starting emqttd on node 'emq@127.0.0.1'
emqttd ctl is starting...[ok]
emqttd hook is starting...[ok]
emqttd router is starting...[ok]
emqttd pubsub is starting...[ok]
emqttd stats is starting...[ok]
emqttd metrics is starting...[ok]
emqttd pooler is starting...[ok]
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.8 is running now
Eshell V9.0 (abort with ^G)
(emq@127.0.0.1)1> Load emq_mod_presence module successfully.
dashboard:http listen on 0.0.0.0:18083 with 4 acceptors.
mqtt:tcp listen on 127.0.0.1:11883 with 4 acceptors.
mqtt:tcp listen on 0.0.0.0:1883 with 16 acceptors.
mqtt:ws listen on 0.0.0.0:8083 with 4 acceptors.
mqtt:ssl listen on 0.0.0.0:8883 with 16 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.
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1>
(emq@127.0.0.1)1> exit
(emq@127.0.0.1)1> quit
(emq@127.0.0.1)1>
[1]+ Stopped ./bin/emqttd console
You have new mail in /var/spool/mail/root
[root@templatetest08 emqttd]# ps -ef | grep inet_tcp
root 46503 44972 1 14:43 pts/1 00:00:01 /home/emqttd/erts-9.0/bin/beam.smp -W w -e 256000 -Q 65536 -P 256000 -A 32 -K true -zdbbl 8192 -- -root /home/emqttd -progname bin/emqttd -- -home /root -- -boot /home/emqttd/releases/2.3.8/emqttd -mode embedded -boot_var ERTS_LIB_DIR /home/emqttd/erts-9.0/../lib -mnesia dir "/home/emqttd/data/mnesia/emq@127.0.0.1" -config /home/emqttd/data/configs/app.2018.05.31.14.43.29.config -kernel net_ticktime 60 -smp auto -setcookie emqsecretcookie -proto_dist inet_tcp -name emq@127.0.0.1 -vm_args /home/emqttd/data/configs/vm.2018.05.31.14.43.29.args -- console
root 46990 44972 0 14:45 pts/1 00:00:00 grep --color=auto inet_tcp
[root@templatetest08 emqttd]# kill -9 46503
[root@templatetest08 emqttd]# [os_mon] cpu supervisor port (cpu_sup): Erlang has closed
[os_mon] memory supervisor port (memsup): Erlang has closed
[1]+ Killed ./bin/emqttd console
[root@templatetest08 emqttd]#
[root@templatetest08 emqttd]#
[root@templatetest08 emqttd]#
[root@templatetest08 emqttd]#
[root@templatetest08 emqttd]#
[root@templatetest08 emqttd]#
[root@templatetest08 emqttd]# ps -ef | grep inet_tcp
root 47012 44972 0 14:46 pts/1 00:00:00 grep --color=auto inet_tcp
[root@templatetest08 emqttd]# ll
total 8
drwxr-xr-x. 2 root root 4096 May 11 15:51 bin
drwxr-xr-x. 4 root root 54 May 11 15:51 data
drwxr-xr-x. 8 root root 70 May 11 15:51 erts-9.0
drwxr-xr-x. 4 root root 82 May 11 15:51 etc
drwxr-xr-x. 2 root root 6 May 11 15:51 hook_lua
drwxr-xr-x. 64 root root 4096 May 11 15:51 lib
drwxr-xr-x. 2 root root 38 May 31 14:38 log
drwxr-xr-x. 3 root root 54 May 11 15:51 releases
[root@templatetest08 emqttd]# ./bin/emqttd start
emqttd 2.3.8 is started successfully!
[root@templatetest08 emqttd]# ps -ef | grep emqttd
root 45631 1 0 14:38 ? 00:00:00 /home/emqttd/erts-9.0/bin/epmd -daemon
root 47153 1 0 14:46 ? 00:00:00 /home/emqttd/erts-9.0/bin/run_erl -daemon //home/emqttd/data/root_erl_pipes/emq@127.0.0.1/ /home/emqttd/log exec "/home/emqttd/bin/emqttd" "console"
root 47154 47153 6 14:46 pts/0 00:00:01 /home/emqttd/erts-9.0/bin/beam.smp -W w -e 256000 -Q 65536 -P 256000 -A 32 -K true -zdbbl 8192 -- -root /home/emqttd -progname home/emqttd/bin/emqttd -- -home /root -- -boot /home/emqttd/releases/2.3.8/emqttd -mode embedded -boot_var ERTS_LIB_DIR /home/emqttd/erts-9.0/../lib -mnesia dir "/home/emqttd/data/mnesia/emq@127.0.0.1" -config /home/emqttd/data/configs/app.2018.05.31.14.46.17.config -kernel net_ticktime 60 -smp auto -setcookie emqsecretcookie -proto_dist inet_tcp -name emq@127.0.0.1 -vm_args /home/emqttd/data/configs/vm.2018.05.31.14.46.17.args -- console
root 47799 47710 0 14:46 ? 00:00:00 /home/emqttd/lib/os_mon-2.4.2/priv/bin/memsup
root 47800 47710 0 14:46 ? 00:00:00 /home/emqttd/lib/os_mon-2.4.2/priv/bin/cpu_sup
root 47908 44972 0 14:46 pts/1 00:00:00 grep --color=auto emqttd
You have new mail in /var/spool/mail/root
[root@templatetest08 emqttd]# ll
total 8
drwxr-xr-x. 2 root root 4096 May 11 15:51 bin
drwxr-xr-x. 5 root root 75 May 31 14:46 data
drwxr-xr-x. 8 root root 70 May 11 15:51 erts-9.0
drwxr-xr-x. 4 root root 82 May 11 15:51 etc
drwxr-xr-x. 2 root root 6 May 11 15:51 hook_lua
drwxr-xr-x. 64 root root 4096 May 11 15:51 lib
drwxr-xr-x. 2 root root 75 May 31 14:46 log
drwxr-xr-x. 3 root root 54 May 11 15:51 releases
[root@templatetest08 emqttd]# ./bin/emqttd_ctl status
Node 'emq@127.0.0.1' is started
emqttd 2.3.8 is running
[root@templatetest08 emqttd]# ./bin/emqttd_ctl stop
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
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
admins add <Username> <Password> <Tags> # Add dashboard user
admins passwd <Username> <Password> # Reset dashboard user password
admins del <Username> # Delete dashboard user
[root@templatetest08 emqttd]# ./bin/emqttd stop
ok
You have new mail in /var/spool/mail/root
[root@templatetest08 emqttd]#
[root@templatetest08 emqttd]#
[root@templatetest08 emqttd]# ./bin/emqttd_ctl status
Node 'emq@127.0.0.1' not responding to pings.
[root@templatetest08 emqttd]#