RabbitMQ fails to startup when I start a docker container - linux
I have installed RabbitMQ inside a docker container on Ubuntu 20.04 using the following steps: https://computingforgeeks.com/how-to-install-latest-rabbitmq-server-on-ubuntu-linux/
It works as expected and I can use it in a sample python program.
After installation I exit the container and save it to a new docker image using:
docker commit *my_container_id* *my_new_container_name*
docker save -o image_with_rabbitmq.tar *my_new_container_name*
I then load this new image and run it like so:
docker load -i image_with_rabbitmq.tar
docker run --rm --gpus all -it *my_image_id*
But now I find that I cannot start or use rabbitmq anymore. I get the following error:
service rabbitmq-server status
Distribution failed: {{:shutdown, {:failed_to_start_child, :net_kernel, {:EXIT, :nodistribution}}}, {:child, :undefined, :net_sup_dynamic, {:erl_distribution, :start_link, [[:"rabbitmqcli-184-rabbit#231b2003671d", :shortnames, 15000], false, :net_sup_dynamic]}, :permanent, false, 1000, :supervisor, [:erl_distribution]}}
Here is the startup log message:
cat /var/log/rabbitmq/startup_err
BOOT FAILED
===========
Exception during startup:
error:{badmatch,{error,{{shutdown,{failed_to_start_child,net_kernel, {'EXIT',nodistribution}}},{child,undefined,net_sup_dynamic,{erl_distribution,start_link,[[rabbit_prelaunch_9642#localhost,shortnames],false,net_sup_dynamic]},permanent,false,1000,supervisor,[erl_distribution]}}}}
rabbit_prelaunch_dist:duplicate_node_check/1, line 78
rabbit_prelaunch_dist:setup/1, line 23
rabbit_prelaunch:do_run/0, line 115
rabbit_prelaunch:run_prelaunch_first_phase/0, line 32
supervisor:do_start_child_i/3, line 414
supervisor:do_start_child/2, line 400
supervisor:-start_children/2-fun-0-/3, line 384
supervisor:children_map/4, line 1250
Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{badmatch,{error,{{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}},{child,undefined,net_sup_dynamic,{erl_distribution,start_link,[[rabbit_prelaunch_9642#localhost,shortnames],false,net_sup_dynamic]},permanent,false,1000,supervisor,[erl_distribution]}}}}}},{rabbit_prelaunch_app,start,[normal,[]]}}})
Crash dump is being written to: erl_crash.dump...done
How can I ensure this starts up properly when my container starts?
Related
what does fork/exec : permission denied mean?
I am building a container inside of a container(Gitlab runner kubernetes pod) but it keeps failing. The Dockerfile of the container to build is: FROM ubuntu USER root RUN ["touch", "hello"] RUN touch test CMD ["echo", "hello"] it fails in the line RUN ["touch", "hello"] with: process exited with error: fork/exec /usr/bin/touch: permission deniedsubprocess exited with status 1 When I comment that line out it fails in the next one with: process exited with error: fork/exec /bin/sh: permission deniedsubprocess exited with status 1 The user is root so there should be no permission errors and since im building FROM ubuntu the exec flags for /bin are set. So what does the error message mean?
lubuntu / centos container CrashLoopBackOff error
when ever i run # kubectl run ubuntu --image=ubuntu or centos i gt containercrashoff , when checked in kubectl describe pod below error is observed Warning Failed 4s (x3 over 22s) kubelet Error: failed to create containerd task: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "ping": executable file not found in $PATH: unknown pl suggest to solve this issue
mpirun launching a runtime script for thread binding
Running a program in a MPI process, which exec file is myapp_mpi. The command line below launches the app correctly mpirun --bind-to none -np 128 myapp_mpi apprun -resethway -noconfout -nsteps 8000 -s benchData.tpr -cpo state.cpt -e ener.edr -dlb no -pin off -v I now wish to constrain the thread binding with a script pin.sh. The command line below would then produce an error. mpirun --bind-to none -np 128 pin.sh myapp_mpi apprun -resethway -noconfout -nsteps 8000 -s benchData.tpr -cpo state.cpt -e ener.edr -dlb no -pin off -v I get the following error -------------------------------------------------------------------------- Open MPI tried to fork a new process via the "execve" system call but failed. Open MPI checks many things before attempting to launch a child process, but nothing is perfect. This error may be indicative of another problem on the target host, or even something as silly as having specified a directory for your application. Your job will now abort. Local host: machine001 Working dir: /home/user/myapp/bin Application name: /home/user/myapp/bin/pin.sh Error: Exec format error -------------------------------------------------------------------------- mpirun: Forwarding signal 18 to job mpirun: Forwarding signal 18 to job -------------------------------------------------------------------------- mpirun was unable to start the specified application as it encountered an error: Error code: 1 Error name: (null) Node: machine001 when attempting to start process rank 0. -------------------------------------------------------------------------- 125 total processes failed to start File locations are good, a priori. Any clue ?
Unable to run nvidia-docker. docker: Error response from daemon: OCI runtime create failed:
I was trying to re-implement this code from Github and it requires me to install nvidia-docker and run it. The installation of nvidia-docker seemed successful. However, when I run the command nvidia-docker run -it --ipc=host deep-colorization, it throws the following error:: docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"process_linux.go:432: running prestart hook 1 caused \\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: driver error: failed to process request\\\\n\\\"\"": unknown. ERRO[0002] error waiting for container: context canceled I am not sure what the error means as I don't have any previous experience with the docker ecosystem. Any kind of assistance is appreciated. I am running Ubuntu 18 by the way. Thanking you in advance.
Monitoring JHipster error starting jhipster-alerter
I have installed monitoring out of the box according to this link: http://www.jhipster.tech/monitoring/ When I start with: docker-compose up -d Everything starts but not Elastalert: First log: ERROR: for monitoring_jhipster-alerter_1 Cannot start service jhipster-alerter: OCI runtime create failed: container_linux.go:296: starting container process caused "process_linux.go:398: container init caused \"rootfs_linux.go:58: mounting \\"/Users/john/source/intellij/company/app/myservice/alerts/config.yaml\\" to rootfs \\"/var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/merged\\" at \\"/var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/merged/opt/elastalert/config.yaml\\" caused \\"not a directory\\"\"": unknown: Are you trying to mount a direStarting monitoring_jhipster-import-dashboards_1 Second log: ERROR: for jhipster-alerter Cannot start service jhipster-alerter: OCI runtime create failed: container_linux.go:296: starting container process caused "process_linux.go:398: container init caused \"rootfs_linux.go:58: mounting \\"/Users/john/source/intellij/company/app/myservice/alerts/config.yaml\\" to rootfs \\"/var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/merged\\" at \\"/var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/merged/opt/elastalert/config.yaml\\" caused \\"not a directory\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: Encountered errors while bringing up the project. Using the default docker-compose.yml file that I got with: curl -O https://raw.githubusercontent.com/jhipster/jhipster-console/master/bootstrap/docker-compose.yml Im not sure what this messages says?
This is because the volumes path for JHipster Alerter is incorrect. Change jhipster-alerter: image: jhipster/jhipster-alerter:latest environment: - ES_HOST=jhipster-elasticsearch - ES_PORT=9200 volumes: - ../jhipster-alerter/rules/:/opt/elastalert/rules/ - ../alerts/config.yaml:/opt/elastalert/config.yaml To - ../alerts/rules/:/opt/elastalert/rules/ - ../jhipster-alerter/config.yaml:/opt/elastalert/config.yaml As shown in https://github.com/jhipster/jhipster-console/pull/102/commits/fa5bc75ec29ca357477ac1a22203ae6cbe2af2f7.