无法将ActiveMQ文件夹作为卷挂载在WildFly(10.1.0)Docker容器上

时间:2020-06-09 22:30:06

标签: docker wildfly wildfly-10 activemq-artemis

我正在将WildFly与Docker容器上的嵌入式ActiveMQ队列一起使用。每次删除容器并再次创建时,都会清空队列。我认为将/opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq子文件夹作为docker卷安装可能是一种解决方案:

        version: '2.1'
    services:
      wildfly-container:
        image: myhub/wildfly:10.1.0.Final
        volumes:
          - /data/activemq/bindings:/opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq/bindings
          - /data/activemq/journal:/opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq/journal
          - /data/activemq/largemessages:/opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq/largemessages
          - /data/activemq/paging:/opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq/paging
        entrypoint: /usr/sbin/init
        mem_limit: 8G
        privileged: true
        container_name: wildfly-container
        hostname: wildfly-container
        networks:
          default:
            ipv4_address: xx.xx.xx.xx
        logging:
          options:
            max-size: 50m
    networks:
      default:
        external:
          name: macvlan_net

在重新创建容器之前,我执行了以下指令以保留现有消息

docker cp wildfly-container:/opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq/bindings .
docker cp wildfly-container:/opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq/journal .
docker cp wildfly-container:/opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq/largemessages .

这些更改之后,WildFly根本无法从以下日志开始:

2020-06-10 00:05:43,094 INFO  [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
2020-06-10 00:05:43,362 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1

有人可以帮助我吗?

0 个答案:

没有答案