GithubHelp home page GithubHelp logo

docker-activemq's Issues

cli utilities not working

After connecting into the docker container, no cli utiliy is working except create.
This error message comes up, even after setting jmx=true in activemq.xml.

Broker not available at: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi

Support for ActiveMQ 15.17.0

Here is Dockerfile for version 5.17.0. The new version does not work inside symlink so it has to be directly in directory.

FROM openjdk:11-jre

ENV ACTIVEMQ_VERSION 5.17.0
ENV ACTIVEMQ apache-activemq-$ACTIVEMQ_VERSION
ENV ACTIVEMQ_TCP=61616 ACTIVEMQ_AMQP=5672 ACTIVEMQ_STOMP=61613 ACTIVEMQ_MQTT=1883 ACTIVEMQ_WS=61614 ACTIVEMQ_UI=8161
ENV SHA512_VAL=d3252df7528b7000fceaf0a8b45c65216010467fea775bb3219ef04aaa659156f4c87982eb11a6982204d2737b9cc2b93efac88b651f1447270528bf62b1e238

ENV ACTIVEMQ_HOME /opt/activemq


RUN curl "https://archive.apache.org/dist/activemq/$ACTIVEMQ_VERSION/$ACTIVEMQ-bin.tar.gz" -o $ACTIVEMQ-bin.tar.gz

# Validate checksum
RUN if [ "$SHA512_VAL" != "$(sha512sum $ACTIVEMQ-bin.tar.gz | awk '{print($1)}')" ];\
    then \
        echo "sha512 values doesn't match! exiting."  && \
        exit 1; \
    fi;

RUN tar xzf $ACTIVEMQ-bin.tar.gz -C  /opt && \
    mv /opt/$ACTIVEMQ $ACTIVEMQ_HOME && \
    useradd -r -M -d $ACTIVEMQ_HOME activemq && \
    chown -h activemq:activemq $ACTIVEMQ_HOME 

USER activemq

WORKDIR $ACTIVEMQ_HOME
EXPOSE $ACTIVEMQ_TCP $ACTIVEMQ_AMQP $ACTIVEMQ_STOMP $ACTIVEMQ_MQTT $ACTIVEMQ_WS $ACTIVEMQ_UI

CMD ["/bin/sh", "-c", "bin/activemq console"]

I would create a PR but the repository can not be forked anymore and it also seems to be not maintained anymore.
But I see @rmohr active in other areas, so maybe he could explain or make some statement on future of this repo? (please :) )

I have also reported the symlink issue in upstream https://issues.apache.org/jira/browse/AMQ-8591.

add ssl support

ssl://localhost:7443

Using keytool, create a certificate for the broker:

  • keytool -genkey -alias broker -keyalg RSA -keystore broker.ks
    Export the broker’s certificate so it can be shared with clients:
  • keytool -export -alias broker -keystore broker.ks -file broker_cert
    Create a certificate/keystore for the client:
  • keytool -genkey -alias client -keyalg RSA -keystore client.ks
    Create a truststore for the client, and import the broker’s certificate. This establishes that the client “trusts” the broker:
  • keytool -import -alias broker -keystore client.ts -file broker_cert

Before starting the broker’s VM set the ACTIVEMQ_SSL_OPTS environment variable so that it knows to use the broker keystore. (note that in previous versions of ActiveMQ this property was called SSL_OPTS in some scripts. As of v5.12.0 all scripts use ACTIVEMQ_SSL_OPTS)

export ACTIVEMQ_SSL_OPTS = -Djavax.net.ssl.keyStore=/path/to/broker.ks -Djavax.net.ssl.keyStorePassword=password

set activemq.xml file path from env

I'm trying to set different file path for activemq.xml config file.
I've tried to set COMMANDLIND_ARGS=xbean:file:./myconfig.xml or ACTIVEMQ_OPTS=xbean:file:./myconfig.xml
Both did not work.
How can I set different file path for config file?

For persistence you need to own the folders

After exiting the intermediate alpine image you have to chmod the persistence folders in order to use them in another container (the one with activemq running).
I know that it may sound obvious, but still I have lost some time for this reason. Maybe you could add it as a remainder in the readme.
Thanks.

permission denied if no docker user

I have setup docker in Ubuntu 16.04 with offical setup steps.

When run you docker image, it failed to start because it cannot create /activemq/data/kahadb directory. After I manually give 777 permission on /activemq/data (root:root), it can success start and create kahadb directory with 999:docker as user:group.

Here is my docker-compose config:

    activemq:
        image: rmohr/activemq:latest
        environment:
            ACTIVEMQ_DATA: "/var/lib/activemq/data"
        volumes:
            - ./data/activemq/data:/var/lib/activemq/data

ps: unrecognized option: p

I'm using activemq alpine linux image rmohr/activemq:5.15.6-alpine
I see ps: unrecognized option: p on startup
I find out that alpine ps is from busybox and it is not included -p switch for ps.
activemq startup script is using ps -p to see JAVA process
adding procps in image might solve that

apk --no-cache add procps

New version

I got 5.16.3 working. If I submit a PR will that be accepted or this is no longer in development?

Wrong data path in readme

The image writes data to /opt/activemq/data not /var/activemq/data

Also, your first example should probably read ACTIVEMQ_DATA=/var/lib/activemq/data not ACTIVEMQ_DATA=var/lib/activemq/data

docker-compose stop exits with 137 code and take long time

When shutting down activemq docker container using docker-compose stop the docker-compose waits for a few seconds and then finally kills the container.

The activemq should listen to shutdown signal and gracefully shutdown itself.
I do not know if this is problem with this docker image or the ActiveMQ does not support it at all.
Eg. the mongo container supports this exiting much more quickly and with exit code 0.

Simple docker-compose:

$ cat docker-compose.yml
version: '3'
services:
  activemq:
    image: rmohr/activemq
    ports:
      - "61616:61616" # TCP
      - "8161:8161"   # UI

Run it and stop it

$ docker-compose up -d activemq
Starting docker_activemq_1 ... done

$ docker-compose stop
Stopping docker_activemq_1 ... done

$ docker-compose ps
      Name                     Command                State     Ports
---------------------------------------------------------------------
docker_activemq_1   /bin/sh -c bin/activemq co ...   Exit 137

Container status as exited

if we changed

CMD ["/bin/sh", "-c", "/opt/apache/activemq/bin/activemq console"]
to
CMD ["/bin/sh", "-c", "/opt/apache/activemq/bin/activemq start"]

why container status is showing as exited not running?

Maximum memory definition missed

As I can see, there is no possibility for memory configuration

In the disaster37/activemq it tunned by wrapper settings:

self.replace_all(ACTIVEMQ_HOME + "/bin/linux-x86-64/wrapper.conf", "#?wrapper.java.initmemory=\d+", 'wrapper.java.initmemory=' + str(minMemoryInMB))
self.replace_all(ACTIVEMQ_HOME + "/bin/linux-x86-64/wrapper.conf", "#?wrapper.java.maxmemory=\d+", 'wrapper.java.maxmemory=' + str(maxMemoryInMb))

Maybe I just missed this feature?

override login credentials

I want to override the default user/password (admin/admin).
I tried with:
docker run -p 61616:61616 -p 8161:8161 -e "activemq.username=user" -e "activemq.password=Password" rmohr/activemq

but it won't help..

Support for 5.15.0

As per AmazonMQ Documentation

Q: Which versions of ActiveMQ does Amazon MQ support?

Amazon MQ provides support for ActiveMQ versions 5.15.0, 5.15.6, 5.15.8, 5.15.9, and 5.15.10.

It appears that there is no support in this repository for version 5.15.0.

Unfortunately, this means that anyone who is currently stuck using the AmazonMQ equivalent of ActiveMQ 5.15.0 and wants to start the transition to using Docker for their application development and deployment must manually generate Dockerfiles for that version of ActiveMQ.

I am creating this issue to capture this reality and hope either to see the change realized by someone else or to make the change myself depending on my personal schedule.

Database /opt/activemq/data/kahadb/lock is locked by another server.

Randomly sometimes when I am running the image I will get this error message and the server won't start.
I am running on Windows Docker for Desktop . Just the basic command.
docker run -p 61616:61616 -p 8161:8161 rmohr/activemq

Full logs Below....
INFO: Loading '/opt/activemq/bin/env' INFO: Using java '/docker-java-home/jre/bin/java' INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C) INFO: Creating pidfile /opt/activemq/data/activemq.pid Java Runtime: Oracle Corporation 1.8.0_181 /usr/lib/jvm/java-8-openjdk-amd64/jre Heap sizes: current=62976k free=58715k max=932352k JVM args: -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/opt/activemq/conf/login.config -Dcom.sun.management.jmxremote -Djava.awt.headless=true -Djava.io.tmpdir=/opt/activemq/tmp -Dactivemq.classpath=/opt/activemq/conf:/opt/activemq/../lib/: -Dactivemq.home=/opt/activemq -Dactivemq.base=/opt/activemq -Dactivemq.conf=/opt/activemq/conf -Dactivemq.data=/opt/activemq/data Extensions classpath: [/opt/activemq/lib,/opt/activemq/lib/camel,/opt/activemq/lib/optional,/opt/activemq/lib/web,/opt/activemq/lib/extra] ACTIVEMQ_HOME: /opt/activemq ACTIVEMQ_BASE: /opt/activemq ACTIVEMQ_CONF: /opt/activemq/conf ACTIVEMQ_DATA: /opt/activemq/data Loading message broker from: xbean:activemq.xml INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@6e06451e: startup date [Tue Dec 28 20:04:26 UTC 2021]; root of context hierarchy INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/opt/activemq/data/kahadb] INFO | Database /opt/activemq/data/kahadb/lock is locked by another server. This broker is now in slave mode waiting a lock to be acquired

user activemq problem AWS with efs

Hello,
the chown activemq:activemq with user activemq have problems when deploying on a amazon efs binding volumes (they work with root user and aws changes the volume ownership so we take a permission denied on pid in data folder).
Is there any way to set the activemq dockerfile user with parameters?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.