环境信息
- EMQX 版本:4.3.11
- 操作系统及版本:Docker 镜像部署 emqx:4.3.11-alpine-amd64
- 其他
问题描述
- 在dashboard 中,创建一下资源和规则.
- 修改网络配置,重启docker 容器,让dockers emqx server node ip 地址变化,使用命令 emqx_ctl mnesia
/opt/emqx/data $ emqx_ctl mnesia
===> System info in version "4.18.1", debug level = none <===
opt_disc. Directory "/opt/emqx/data/mnesia/emqx-server@172.18.0.3" is used.
use fallback at restart = false
running db nodes = ['emqx-server@172.18.0.3']
stopped db nodes = []
master node tables = []
remote = []
ram_copies = [emqx_channel_registry,emqx_resource_type,emqx_retainer,
emqx_route,emqx_routing_node,emqx_rule_action,
emqx_shared_subscription,emqx_trie]
disc_copies = [emqx_activated_alarm,emqx_banned,emqx_deactivated_alarm,
emqx_mod_delayed,emqx_resource,emqx_rule,emqx_telemetry,
mqtt_admin,mqtt_app,schema]
disc_only_copies = []
[{'emqx-server@172.18.0.3',disc_copies}] = [schema,emqx_telemetry,emqx_rule,
emqx_resource,emqx_mod_delayed,
mqtt_app,mqtt_admin,emqx_banned,
emqx_activated_alarm,
emqx_deactivated_alarm]
[{'emqx-server@172.18.0.3',ram_copies}] = [emqx_rule_action,
emqx_resource_type,emqx_trie,
emqx_shared_subscription,
emqx_routing_node,emqx_route,
emqx_channel_registry,
emqx_retainer]
172 transactions committed, 2 aborted, 0 restarted, 41 logged to disc
0 held locks, 0 in queue; 0 local transactions, 0 remote
0 transactions waits for other nodes: []
/opt/emqx/data $
发现 Directory “/opt/emqx/data/mnesia/emqx-server@172.18.0.3” 和 running db nodes = [‘emqx-server@172.18.0.3’] 都是依赖 ip.
- 在dashboard中,之前创建的数据都没了.
请确认下这个问题是不是设计如此.
如果mnesia数据库是根据ip地址存放文件,这个问题如何解决? ip地址经常变,使用起来非常不方便了.