Windows10 docker启动rabbitMQ失败could_not_write_file,"/var/lib/rabbitmq/mnesia/rabbit@

docker-compose.yml文件配置

services:
    rabbitmq:
        image: rabbitmq:3.7
        container_name: rabbitmq.service
        volumes:
          - "D:/var/bimserver/data/rabbitmq:/var/lib/rabbitmq/mnesia/"
        ports:
          - "5672:5672"
          - "15672:15672"

启动命令:

$ docker-compose.exe up rabbitmq

启动报错信息:

Starting rabbitmq.service ... done
Attaching to rabbitmq.service
rabbitmq.service | 2020-09-10 09:43:50.028 [info] <0.33.0> Application lager started on node rabbit@5c7d1c5ccc72
rabbitmq.service |
rabbitmq.service | BOOT FAILED
rabbitmq.service | ===========
rabbitmq.service |
rabbitmq.service | Error description:
rabbitmq.service |     init:do_boot/3
rabbitmq.service |     init:start_em/1
rabbitmq.service |     rabbit:start_it/1 line 446
rabbitmq.service |     rabbit:'-boot/0-fun-0-'/0 line 296
rabbitmq.service |     rabbit_node_monitor:prepare_cluster_status_files/0 line 126
rabbitmq.service |     rabbit_node_monitor:write_cluster_status/1 line 140
rabbitmq.service | throw:{error,{could_not_write_file,"/var/lib/rabbitmq/mnesia/rabbit@5c7d1c5ccc72/cluster_nodes.config",
rabbitmq.service |                                    ebusy}}
rabbitmq.service | Log file(s) (may contain more information):
rabbitmq.service |    
rabbitmq.service |
rabbitmq.service | 2020-09-10 09:43:52.092 [error] <0.5.0>
rabbitmq.service | Error description:
rabbitmq.service |     init:do_boot/3
rabbitmq.service |     init:start_em/1
rabbitmq.service |     rabbit:start_it/1 line 446
rabbitmq.service |     rabbit:'-boot/0-fun-0-'/0 line 296
rabbitmq.service |     rabbit_node_monitor:prepare_cluster_status_files/0 line 126
rabbitmq.service |     rabbit_node_monitor:write_cluster_status/1 line 140
rabbitmq.service | throw:{error,{could_not_write_file,"/var/lib/rabbitmq/mnesia/rabbit@5c7d1c5ccc72/cluster_nodes.config",
rabbitmq.service |                                    ebusy}}
rabbitmq.service | Log file(s) (may contain more information):
rabbitmq.service |    
rabbitmq.service | {"init terminating in do_boot",{error,{could_not_write_file,"/var/lib/rabbitmq/mnesia/rabbit@5c7d1c5ccc72/cluster_nodes.config",ebusy}}}
rabbitmq.service | init terminating in do_boot ({error,{could_not_write_file,/var/lib/rabbitmq/mnesia/rabbit@5c7d1c5ccc72/cluster_nodes.config,ebusy}})
rabbitmq.service |
rabbitmq.service | Crash dump is being written to: /var/log/rabbitmq/erl_crash.dump...done
rabbitmq.service exited with code 0

分析原因应该是挂载目录的问题,
修改docker-compose.yml文件配置,将挂载目录命令去掉,启动成功。

services:
    rabbitmq:
        image: rabbitmq:3.7
        container_name: rabbitmq.service
        #volumes:
        #  - "D:/var/bimserver/data/rabbitmq:/var/lib/rabbitmq/mnesia/"
        ports:
          - "5672:5672"
          - "15672:15672"

你可能感兴趣的:(Windows10 docker启动rabbitMQ失败could_not_write_file,"/var/lib/rabbitmq/mnesia/rabbit@)