jboss-dockerfiles / wildfly

Docker image for WildFly project
https://quay.io/repository/wildfly/wildfly
MIT License
279 stars 236 forks source link

Unable to mount activemq folders as docker volumes (wildfy 10) #120

Open lauradP opened 4 years ago

lauradP commented 4 years ago

I'm using WildFly with embedded ActiveMQ queues on a docker container. Every time I remove the container and create in again queues are emptied. I thought mounting /opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq subfolders as docker volumes could be a solution:

    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

Before recreating the container I executed the following instructions in order to preserve existing messages

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 .

docker cp wildfly-container:/opt/jboss/wildfly-10.1.0.Final/standalone/data/activemq/paging .

After those changes WildFly simply fail to start with the following log:

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 Can anyone help me?

lauradP commented 4 years ago

Any update on this issue?

jmesnil commented 2 years ago

is this issue still happening?