disaster37 / activemq

Docker image for ActiveMQ
GNU General Public License v2.0
66 stars 105 forks source link

401 - Users defined by env variables not created #47

Open cawoodm opened 3 years ago

cawoodm commented 3 years ago

I followed the README instructions and ran webcenter/activemq in Kubernetes with the following variables:

ACTIVEMQ_ADMIN_PASSWORD=foo
ACTIVEMQ_ACTIVEMQ_USERS_user1=bar

However all attempts to access ActiveMQ with these credentials fail with 401 Not Authorized (REST API).

I have shelled into the container and verified the variables are set.

How is this supposed to work? Do you have a script which should update conf/jetty-realm.properties?
If so, it's not working.

cawoodm commented 3 years ago

Can reproduce in Docker too:

docker run --name='activemq' `
-e 'ACTIVEMQ_NAME=amqp-dev' `
-e 'ACTIVEMQ_REMOVE_DEFAULT_ACCOUNT=true' `
-e 'ACTIVEMQ_ADMIN_LOGIN=admin' -e 'ACTIVEMQ_ADMIN_PASSWORD=***' `
-e 'ACTIVEMQ_WRITE_LOGIN=producer' -e 'ACTIVEMQ_WRITE_PASSWORD=1234' `
-e 'ACTIVEMQ_READ_LOGIN=consumer' -e 'ACTIVEMQ_READ_PASSWORD=1234' `
-e 'ACTIVEMQ_JMX_LOGIN=jmx_login' -e 'ACTIVEMQ_JMX_PASSWORD=jmx_password' `
-e 'ACTIVEMQ_STATIC_TOPICS=foo,bar' `
-e 'ACTIVEMQ_STATIC_QUEUES=foos,bars' `
-e 'ACTIVEMQ_MIN_MEMORY=512' -e  'ACTIVEMQ_MAX_MEMORY=1025' `
-e 'ACTIVEMQ_ENABLED_SCHEDULER=true' `
-v /data/activemq:/data/activemq `
-v /var/log/activemq:/var/log/activemq `
-p 8161:8161 `
-p 61616:61616 `
-p 61613:61613 `
webcenter/activemq

image