-
Notifications
You must be signed in to change notification settings - Fork 429
if i mount /etc/rabbitmq/rabbitmq.conf the container exit #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Gah, I guess we need something like docker-library/cassandra#160. 😞 |
I disagree needing the solution from cassandra. We added it for cassandra since $ docker run -it --rm rabbitmq ls -l /etc/rabbitmq/
total 0
$ docker run -it --rm cassandra ls -l /etc/cassandra/
total 116
-rw-r--r-- 1 cassandra cassandra 12527 Nov 15 00:59 cassandra-env.sh
-rw-r--r-- 1 cassandra cassandra 1200 Jul 2 18:36 cassandra-rackdc.properties
-rw-r--r-- 1 cassandra cassandra 1358 Jul 2 18:36 cassandra-topology.properties
-rw-r--r-- 1 cassandra cassandra 57664 Jul 2 18:36 cassandra.yaml
-rw-r--r-- 1 cassandra cassandra 2082 Jul 2 18:36 commitlog_archiving.properties
-rw-r--r-- 1 cassandra cassandra 2757 Jul 2 18:36 hotspot_compiler
-rw-r--r-- 1 cassandra cassandra 9956 Jul 2 18:36 jvm.options
-rw-r--r-- 1 cassandra cassandra 1195 Jul 2 18:36 logback-tools.xml
-rw-r--r-- 1 cassandra cassandra 3809 Jul 2 18:36 logback.xml
drwxr-xr-x 2 cassandra cassandra 4096 Nov 15 00:59 triggers @timrosede, Since you already have your conf and enabled plugins in the right folder, you should be able to just use this compose yaml: rabbitmq:
image: rabbitmq:3.7
volumes:
- ${PWD}/rabbitmq/:/etc/rabbitmq/
- rabbitmq:/var/lib/rabbitmq |
Using volumes:
- ./rabbitmq/:/etc/rabbitmq/ Rabbitmq started fine, the config options you supplied error in my minimal setup of just one rabbitmq:3.7 so I just used $ ls
docker-compose.yml rabbitmq/
$ cat rabbitmq/rabbitmq.conf
channel_max = 4007
$ docker-compose up -d
Creating network "rabbitmq-292_default" with the default driver
Creating rabbitmq-292_rabbitmq_1 ... done
$ docker exec rabbitmq-292_rabbitmq_1 rabbitmqctl environment | grep channel_max
{channel_max,4007}, |
It works, but if you set a RABBITMQ_VAR it results in a "permission denied" error for rabittmq.conf. |
Could you give the specific example you're using, Passing the $ cat rabbitmq/rabbitmq.conf
channel_max = 4007
$ docker run -dit --rm --name rabbitmq -v $(pwd)/rabbitmq/:/etc/rabbitmq/ -e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-rabbit auth_backends [rabbit_auth_backend_ldap,rabbit_auth_backend_internal]" rabbitmq
5fc37d0cb6a5cb3163e261c69dbd49d7411ac8ae08310e061a95b767343338df
$ docker exec rabbitmq rabbitmqctl environment | grep channel_max
{channel_max,4007},
$ docker exec rabbitmq rabbitmqctl environment | grep auth_backends
[{auth_backends,[rabbit_auth_backend_ldap,rabbit_auth_backend_internal]}, |
This is the error with version: '3.1'
services:
rabbitmq:
image: rabbitmq:3.7
environment:
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-rabbit channel_max 4007" $ docker-compose up
Recreating rabbitmq-292_rabbitmq_1 ... done
Attaching to rabbitmq-292_rabbitmq_1
rabbitmq_1 | 2018-11-29 18:12:12 application_controller: ~ts: ~ts~n
rabbitmq_1 | "unterminated string starting with \"-rabbit\""
rabbitmq_1 | "\"-rabbit"
rabbitmq_1 | {"could not start kernel pid",application_controller,"{bad_environment_value,\"\\"-rabbit\"}"}
rabbitmq_1 | could not start kernel pid (application_controller) ({bad_environment_value,"\"-rabbit"})
rabbitmq_1 |
rabbitmq_1 | Crash dump is being written to: /var/log/rabbitmq/erl_crash.dump...done
rabbitmq-292_rabbitmq_1 exited with code 0 |
@wglambert that's because of the quotes -- those are being interpreted via YAML as part of your environment variable value You should switch to either: - 'RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit channel_max 4007' or: RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: '-rabbit channel_max 4007' (Either of which should work as expected.) |
In this case, if you set (Closing, since this appears to be resolved.) |
same result you can mounting
|
Uh oh!
There was an error while loading. Please reload this page.
hey,
i tried to configure the consul_discovery plugin.
I added those lines to a local rabbitmq.conf and mounted this file as a Volume to my docker Container.
that brings me to this:
sed: can't move '/etc/rabbitmq/rabbitmq.confDMidAB' to '/etc/rabbitmq/rabbitmq.conf': Resource busy
i also tried to set the config with some environment variables:
but it does not work too :-( maybe any one can help me a little bit?
Thanks
The text was updated successfully, but these errors were encountered: