dockerfile / rabbitmq Goto Github PK
View Code? Open in Web Editor NEWRabbitMQ Dockerfile for trusted automated Docker builds.
Home Page: http://dockerfile.github.io/#/rabbitmq
License: MIT License
RabbitMQ Dockerfile for trusted automated Docker builds.
Home Page: http://dockerfile.github.io/#/rabbitmq
License: MIT License
Having a clean Ubuntu 14.04 64bit machine with docker 0.9.1 installed
When I run the container with this command:
docker run -d -p 5672:5672 -p 15672:15672 dockerfile/rabbitmq
The contianer exits.
The logs says:
sh: 1: /usr/lib/rabbitmq/bin/rabbitmq-server: Permission denied
The current release:
$ docker run -d dockerfile/rabbitmq:latest
4209d75ca44936d7962a76fd0ca8240aef14c473026bd04245e2d9db3dc6846e
$ docker logs 4209d75ca44936d7962a76fd0ca8240aef14c473026bd04245e2d9db3dc6846e
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4209d75ca449 dockerfile/rabbitmq:latest "rabbitmq-start" 11 seconds ago Exited (0) 10 seconds ago boring_kirch
The previous release:
$ docker run -d b21a6dbc8fef
9ab7839c9dc9758d8333f2700ad163d854d00cf25a9fdee13d89e920dd624d60
$ docker logs 9ab7839c9dc9758d8333f2700ad163d854d00cf25a9fdee13d89e920dd624d60
RabbitMQ 3.4.4. Copyright (C) 2007-2014 GoPivotal, Inc.
## ## Licensed under the MPL. See http://www.rabbitmq.com/
## ##
########## Logs: /data/log/[email protected]
###### ## /data/log/[email protected]
##########
Starting broker... completed with 6 plugins.
$ $ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9ab7839c9dc9 analyzere/rabbitmq:3.4.4 "rabbitmq-start" 23 seconds ago Up 22 seconds 15672/tcp, 5672/tcp sleepy_turing
I've deployed a rabbitmq container using docker-compose
which works absolutely fine. But when I stop the service, remove the container and then restart again I don't see rabbitmq data persistent.
Here is how to reproduce it:
rabbitmq:
image: dockerfile/rabbitmq
container_name: rabbitmq
volumes:
- /srv/docker/osod/rabbitmq:/data/mnesia
ports:
- "5672:5672"
- "15672:15672"
Same as https://github.com/dockerfile/rabbitmq/blob/master/Dockerfile
docker-compose up -d rabbitmq
docker exec -it rabbitmq rabbitmqctl list_users
Listing users ...
guest [administrator]
docker exec -it rabbitmq rabbitmqctl add_user user1 123
Creating user "user1" ...
docker exec -it rabbitmq rabbitmqctl set_permissions user1 ".*" ".*" ".*"
Setting permissions for user "user1" in vhost "/" ...
docker exec -it rabbitmq rabbitmqctl list_users
Listing users ...
user1 []
guest [administrator]
Now when I stop, remove and start container again
docker-compose stop
docker rm $(docker ps -aq --filter "status=exited")
docker-compose up -d rabbitmq
docker exec -it rabbitmq rabbitmqctl list_users
Listing users ...
guest [administrator]
As we can see user1
is missing. Can you please suggest where I'm doing wrong. Doing same with mysql persisted data works though.
Hi,
I am using the rabbitmq resource through Azure and am encountering a rather frustrating problem.
After approximately 360000 (or 720000 on a bigger VM) messages rabbitmq freezes up and stops processing messages. The VM and the docker container show that they have free memory, storage and CPU % so i don't think it is related to the VM (or docker container) failing. I have tried slowing down the speed at which the messages are sent. It seems to freeze after the same approximate number of messages, regardless on how spread out (over time) those messages are.
The management portal is not working for me (possibly due to being inside the VM), but running docker exec containerID rabbitmqctl status
gives me the following type of output as it reaches the max number of messages before it freezes:
Status of node 'HelloRabbitDocker@64db8c1f1c6d' ...
[{pid,111},
{running_applications,
[{rabbitmq_management,"RabbitMQ Management Console","3.6.3"},
{rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.6.3"},
{webmachine,"webmachine","1.10.3"},
{mochiweb,"MochiMedia Web Server","2.13.1"},
{inets,"INETS CXC 138 49","6.2"},
{syntax_tools,"Syntax tools","1.7"},
{rabbitmq_management_agent,"RabbitMQ Management Agent","3.6.3"},
{amqp_client,"RabbitMQ AMQP Client","3.6.3"},
{compiler,"ERTS CXC 138 10","6.0.3"},
{ssl,"Erlang/OTP SSL application","7.3"},
{public_key,"Public key infrastructure","1.1.1"},
{asn1,"The Erlang ASN1 compiler version 4.0.2","4.0.2"},
{crypto,"CRYPTO","3.6.3"},
{rabbit,"RabbitMQ","3.6.3"},
{rabbit_common,[],"3.6.3"},
{ranch,"Socket acceptor pool for TCP protocols.","1.2.1"},
{xmerl,"XML parser","1.3.10"},
{os_mon,"CPO CXC 138 46","2.4"},
{mnesia,"MNESIA CXC 138 12","4.13.3"},
{sasl,"SASL CXC 138 11","2.7"},
{stdlib,"ERTS CXC 138 10","2.8"},
{kernel,"ERTS CXC 138 10","4.2"}]},
{os,{unix,linux}},
{erlang_version,
"Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:2:2] [async-threads:64] [hipe] [kernel-poll:true]\n"},
{memory,
[{total,3319586272},
{connection_readers,14280},
{connection_writers,5688},
{connection_channels,147862968},
{connection_other,47744},
{queue_procs,915471272},
{queue_slave_procs,0},
{plugins,254328},
{other_proc,1920883688},
{mnesia,72272},
{mgmt_db,488552},
{msg_index,48992},
{other_ets,1441488},
{binary,202833928},
{code,27819950},
{atom,1000601},
{other_system,101340521}]},
{alarms,[]},
{listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,2922468147},
{disk_free_limit,50000000},
{disk_free,28257247232},
{file_descriptors,
[{total_limit,1048476},
{total_used,4},
{sockets_limit,943626},
{sockets_used,1}]},
{processes,[{limit,1048576},{used,243}]},
{run_queue,2},
{uptime,83490},
{kernel,{net_ticktime,60}}]
The connection_channels
number was concerning me until i realized it was in bytes :/.
It's possible I am doing something wrong client side, but I have been struggling for the past few days to identify the issue. Any help would be appreciated.
Regards
Dylan
I was runnning into an issue where new connections were being refused and tracked it back to the ulimit -n 1024
in the rabbitmq-start script.
Is there a reason for setting that? Perhaps making it based on an ENV value with default if it's not provided would be a good alternative?
When running the latest image on OSX Yosemite, Docker 1.4.1 and doing volume mounts, I get errors trying to write to files? I am mounting the volumes under the /Users directory as is required of boot2docker configured VirtualBox VM.
I had to set the permissions on the mounted volumes to 777 to even get RabbitMQ to start up at all with volumes mounted. Everything works when no volumes are attached. I have successfully written to volumes on OSX with other images/containers, just this one doesn't seem to work. Any ideas for me to try?
Am I forgetting something simple here?
$ docker pull dockerfile/rabbitmq
Pulling repository dockerfile/rabbitmq
FATA[0000] Error: image dockerfile/rabbitmq:latest not found
In rabbitmq-start
, we starts rabbitmq-server
with exec
, which is correct if the command we starts handles SIGTERM. rabbitmq-server
is another shell script, that does some logic and then starts rabbitmq itself. However, this time, it is not using exec, hence, Dockers signals wont ever reach the rabbitmq server itself.
I think it would be better to provide "stable" tags to RabbitMQ releases i.e.:
dockerfile/rabbitmq:3.3.5
dockerfile/rabbitmq:3.4.2
Right now, you can't stick with a specific version and might received an update without even notification or possible rollback.
Regards;
Hi,
I'm trying to use vagrant (1.6.5) to provision a rabbitmq docker container. i'm on a windows 8.1 host.
I'm using a proxy VM defined as such:
VAGRANTFILE_API_VERSION = "2"
DOCKER_HOST_NAME = "dockerhost"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "docker"
config.vm.provision "shell", inline: "ps aux | grep 'sshd:' | awk '{print $2}' | xargs kill"
config.vm.define "#{DOCKER_HOST_NAME}"
config.vm.box = "ubuntu/trusty64"
config.vm.network :forwarded_port, guest: 15672, host: 15672
config.vm.provider :virtualbox do |vb|
vb.name = "#{DOCKER_HOST_NAME}"
end
end
I've ssh'd onto the VM and checked and i can read/write to the shared folder that vagrant creates at /vagrant on the host.
My rabbitmq docker container is defined below.
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker'
DOCKER_HOST_NAME = "dockerhost"
DOCKER_HOST_VAGRANTFILE = "./Vagrantfile.proxy"
Vagrant.configure("2") do |config|
config.vm.define "rabbitmq" do |rabbit|
rabbit.vm.provider "docker" do |d|
d.image = "dockerfile/rabbitmq"
d.name = "rabbitmq-server"
d.remains_running = true
d.ports = ["15672:15672", "5672:5672"]
d.volumes =
["/vagrant/data/rabbitmq/log:/data/log", "/vagrant/data/rabbitmq/mnesia:/data/mnesia"]
d.vagrant_machine = "#{DOCKER_HOST_NAME}"
d.vagrant_vagrantfile = "#{DOCKER_HOST_VAGRANTFILE}"
end
end
end
The problem I get ONLY happens when I specify VOLUMES on the rabbitmq container.
Error description:
{error,{could_not_write_file,"/data/mnesia/rabbit@e4137487ee90/cluster_nodes.config",
etxtbsy}}
Log files (may contain more information):
/data/log/[email protected]
/data/log/[email protected]
Stack trace:
[{rabbit_node_monitor,write_cluster_status,1,[]},
{rabbit_node_monitor,prepare_cluster_status_files,0,[]},
{rabbit,'-boot/0-fun-0-',0,[]},
{rabbit,start_it,1,[]},
{init,start_it,1,[]},
{init,start_em,1,[]}]
{"init terminating in do_boot",{rabbit,failure_during_boot,{error,{could_not_write_file,"/data/mnesia/rabbit@e4137487ee90/cluster_nodes.config",etxtbsy}}}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
If I just manually run the container on the vagrant host by SSHing on to the machine:
docker run -d -p 5672:5672 -p 15672:15672 -v /vagrant/data/rabbitmq/log:/data/log -v /vagrant/data/rabbitmq/data:/data/mnesia dockerfile/rabbitmq
i get the same error.
if i leave out the volumes it works.
docker run -d -p 5672:5672 -p 15672:15672 dockerfile/rabbitmq
It seems that its a permissions thing.
{error,{could_not_write_file,"/data/mnesia/rabbit@e4137487ee90/cluster_nodes.config", etxtbsy}}
Has anyone got any ideas what would cause this???
Regards
Heads-up, rabbitmq.com apt repo was re-signed with the new release key.
You can learn more on rabbitmq.com.
This is a heads-up and not an issue.
RabbitMQ 3.6.0 is tagged. Note that in this release, server artifacts are distributed as xz
archives and not gz
.
I have a docker compose file that starts rabbitmq (currently using tutum image, need to switch to this one), but the dependent services are trying to connect before rabbitmq is listening on the port:
How can I block until rabbitmq is listening for connections? Will switching to the official rabbitmq image help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.