activemq
activemq copied to clipboard
Container doesn't start when binding volume conf
Hi, when I run
mkdir -p ~/activemq/conf
docker run --name='activemq' -it --rm \
-e 'ACTIVEMQ_MIN_MEMORY=512' \
-e 'ACTIVEMQ_MAX_MEMORY=2048'\
-p 8161:8161 \
-p 61616:61616 \
-p 61613:61613 \
-v ~/activemq/conf:/opt/activemq/conf \
webcenter/activemq:latest
I get the following error:
Traceback (most recent call last):
File "/app/init.py", line 378, in <module>
setting_all()
File "/app/init.py", line 256, in setting_all
do_init_activemq()
File "/app/init.py", line 245, in do_init_activemq
replace_all(ACTIVEMQ_CONF + "/log4j.properties", "\$\{activemq\.base\}\/data\/", "/var/log/activemq/")
File "/app/init.py", line 28, in replace_all
f = open(file,'r')
IOError: [Errno 2] No such file or directory: '/opt/activemq/conf.tmp/log4j.properties'
Without the volume binding to conf, everything works fine. But I need to change the activemq.xml. I hope you can help me.
Kind Regards Philipp
Hello,
Can you check you have file called log4j.properties on your machine in "~/activemq/conf" ?
If you should just change the activemq.xml, so use "-v ~/activemq/conf/activemq.xml:/opt/activemq/conf/activemq.xml"
Hi, thanks for your answer. Using "-v ~/activemq/conf/activemq.xml:/opt/activemq/conf/activemq.xml" produces the same error.
When I place a log4j.properties in ~/activemq/conf I get the following output in an endless loop:
2016-02-05 07:21:39,438 INFO spawned: 'activemq' with pid 1379
2016-02-05 07:21:40,464 INFO success: activemq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-05 07:21:42,722 INFO exited: activemq (exit status 1; not expected)
2016-02-05 07:21:43,724 INFO spawned: 'activemq' with pid 1464
2016-02-05 07:21:44,749 INFO success: activemq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-05 07:21:47,019 INFO exited: activemq (exit status 1; not expected)
2016-02-05 07:21:48,021 INFO spawned: 'activemq' with pid 1549
2016-02-05 07:21:49,047 INFO success: activemq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-05 07:21:51,302 INFO exited: activemq (exit status 1; not expected)
Regards Philipp
Ok, I will investigate this evening (after my work day).
Hum, have you also try with full path : "-v /home/YOUR_USER/activemq/conf/activemq.xml:/opt/activemq/conf/activemq.xml"
Have you solve this ?
Unfortunately not, I now run activemq directly on my machine without docker.
When I mount /opt/activemq/conf even with full path, I am getting the same error: exited: activemq (exit status 1; not expected)
If I use /var/log/activemq, no problem
Hello @phauer
It seems that you need to download an activemq distribution and copy its conf directory content under your mounted folder (~/activemq/conf) before running the docker container.
I tried this way and it worked. I think the documentation about configuration folder mounting must be improved.