I have a problem installing Ansible AWX; When I execute the ansible playbook (ansible-playbook -i inventory install.yml), i have the 5/5 containers there (saw them using docker ps -a). But awx_web and awx_task are infinitelly restarting. Any help?
[root#CLOUDSVRANSIBLE installer]# docker ps -a
5d132be6d6cd ansible/awx_task:latest "/tini -- /bin/sh ..." 8 minutes ago Restarting (127) About a minute ago awx_task
cb83308dcfcf ansible/awx_web:latest "/tini -- /bin/sh ..." 8 minutes ago Restarting (127) About a minute ago awx_web
43b314e42815 postgres:9.6 "docker-entrypoint..." 8 minutes ago Up 8 minutes 5432/tcp awx_postgres
9c73fd740f98 ansible/awx_rabbitmq:3.7.4 "docker-entrypoint..." 8 minutes ago Up 8 minutes 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp awx_rabbitmq
8fcbf04c4c96 memcached:alpine "docker-entrypoint..." 8 minutes ago Up 8 minutes 11211/tcp awx_memcached
Logs:
[root#CLOUDSVRANSIBLE installer]# docker logs awx_task
/bin/sh: /usr/bin/launch_awx_task.sh: No such file or directory
/bin/sh: /usr/bin/launch_awx_task.sh: No such file or directory
/bin/sh: /usr/bin/launch_awx_task.sh: No such file or directory
/bin/sh: /usr/bin/launch_awx_task.sh: No such file or directory
...
[root#CLOUDSVRANSIBLE installer]# docker logs awx_web
/bin/sh: /usr/bin/launch_awx.sh: No such file or directory
/bin/sh: /usr/bin/launch_awx.sh: No such file or directory
/bin/sh: /usr/bin/launch_awx.sh: No such file or directory
/bin/sh: /usr/bin/launch_awx.sh: No such file or directory
...
Docker status
Any help? Thanks!
It seams to me the installation of AWX did not complete correctly.
What type of installation are you trying? What is the underlying OS?
The task that copies these bash scripts is referenced in the role image_build.
Can you have a look at the output of your playbook to see what is going wrong?
You might need to run it with some -vvvvvv to get some nice info.
Sorry for the late answer...
It was a ports conflict with nginx.
Thanks all!
Related
I have a Google VM that i am trying to start a container, that will start up a web server.
Since i want to be able to do other things with my terminal, i tried starting the container in detached mode.
This is what i typed:
sudo docker run -d -p 5001:5001 -v $(pwd):/mnt/translation -w="/mnt/translation" -e "TERM=xterm-color" f_translate
After this, i get back a string
9f8cc86f1e4a262bff8ff4f40f1a9036c686472b0ec3fded84980a60d26f6980
However, i couldn't connect to the server with docker exec.
I typed docker ps, to see all running containers, but there are none running.
EDIT:
This is the result of the docker ps -a:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9f8cc86f1e4a f_translate "/bin/bash" 28 minutes ago Exited (0) 28 minutes ago reverent_sinouss
i
faeec783edce f_translate "/bin/bash" 37 minutes ago Exited (0) 37 minutes ago adoring_chaum
1b96a5117aef f_translate "/bin/bash" 25 hours ago Exited (129) 24 hours ago xenodochial_noet
her
b364de5733b9 f_translate "/bin/bash" 41 hours ago Created nice_lumiere
5b042e459548 f_translate "/bin/bash" 41 hours ago Exited (0) 41 hours ago hardcore_elbakya
n
ea97b56d6822 f_translate "/bin/bash" 42 hours ago Created practical_lumier
e
2392c2b074a1 f_translate "/bin/bash" 42 hours ago Created hardcore_easley
e24c579f3094 f_translate "/bin/bash" 42 hours ago Created inspiring_merkle
3e4e412c551b f_translate "/bin/bash" 42 hours ago Created crazy_engelbart
8c198931c560 f_translate "/bin/bash" 42 hours ago Exited (0) 41 hours ago hardcore_cannon
67c5ad80b074 f_translate "/bin/bash" 42 hours ago Exited (0) 42 hours ago dreamy_margulis
b2b8773a9d77 a2f276018a81 "/bin/bash" 42 hours ago Exited (127) 42 hours ago jolly_greider
2c3c74ee073c a2f276018a81 "/bin/bash" 42 hours ago Exited (0) 42 hours ago pensive_chandras
ekhar
8563a35a96a7 cq_image "/bin/bash" 47 hours ago Exited (127) 46 hours ago gallant_rubin
44431d47308c cq_image "/bin/bash" 2 days ago Exited (129) 2 days ago peaceful_tesla
When i type docker logs 9f8cc86f1e4a262bff8ff4f40f1a9036c686472b0ec3fded84980a60d26f6980, i get nothing back.
You're run the container only with the bash command. This command returns exit code 0 immediately after the run. Then container finishing the work.
You have to run the container with some process that not returns the exit code right after a run.
This is a normal behavior that container finishing work when the job is finished with the success or with the error.
It seems as if there is a need to explain what containers do:
Containers have been designed to do one job. You tell them which command to execute and they will do that until it is done. Usually this is specified within a Dockerfile, in there you can define ENTRYPOINT and CMD to tell the container what to do when starting up. The container will then do that particular job until its done and then shut down.
And that's the case with your container. Your container executes the command /bin/bash as can be seen in the COMMAND column of the docker ps -a output.
So it actually is doing what it is supposed to do. It simply is executing the bash and since the command finished at that point it is shutting down, therefore you cannot connect to it anymore.
To be able to exec into a container it must be up and running, to do so you will have to change the entrypoint of your container. You can either do so by building a new image via a Dockerfile or you can overwrite it on the fly with the docker run command.
For debugging purposes, especially when wanting to exec into the container manually, you are most likely going to choose a command that does nothing but runs forever, perhaps something like sleep infinity.
TL;DR
With docker run after mentioning the image name you can define which command the container shall execute when starting up.
Execute the following command to ensure that your container does not exit immediately:
sudo docker run -d -p 5001:5001 -v $(pwd):/mnt/translation -w="/mnt/translation" -e "TERM=xterm-color" f_translate /bin/sh -c sleep infinity
I do all the steps written in the docs, after docker-compose up -d --build ckan container go to Exited status
docker logs ckan show
db:5432 - accepting connections
No handlers could be found for logger "ckan.lib.maintain"
Command 'db' not known (you may need to run setup.py egg_info)
docker-compose restart ckan - doesn't change anything
What can be wrong?
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ad9613d790f9 docker_ckan "/ckan-entrypoint.sh…" 2 hours ago Exited (2) 2 hours ago ckan
8a0bfb6af229 redis:latest "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:6379->6379/tcp redis
51b879900262 docker_solr "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:8983->8983/tcp solr
500f1b1438bf clementmouchet/datapusher "python datapusher/m…" 2 hours ago Up 2 hours 0.0.0.0:8800->8800/tcp datapusher
b0197d6cec5a docker_db "docker-entrypoint.s…" 2 hours ago Up 2 hours (healthy) 0.0.0.0:5432->5432/tcp db
I can't do it all of a sudden ㅠㅠ
You can try it by changing the tag.
$git checkout tags/ckan-2.8.0
or
$git checkout tags/ckan-2.8.5
or
$git checkout tags/ckan-2.9.0
First download the last Ckan git repository.
Create a new branch from master and run:
docker-compose up -d --build
Work for me.
Read this:
https://github.com/ckan/ckan/issues/5572
https://github.com/ckan/ckan/pull/5381
I'm getting error: This page isn’t working
I ran the following command inside the Laradock directory yet it's not connecting when I go to localhost. docker-compose up -d nginx postgres
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
19433b191832 laradock_nginx "/bin/bash /opt/star…" 5 minutes ago Up 5 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp laradock_nginx_1
e7f68a9d841d laradock_php-fpm "docker-php-entrypoi…" 5 minutes ago Up 5 minutes 9000/tcp laradock_php-fpm_1
3c73fedff4aa laradock_workspace "/sbin/my_init" 5 minutes ago Up 5 minutes 0.0.0.0:2222->22/tcp laradock_workspace_1
eefb58598ee5 laradock_postgres "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 0.0.0.0:5432->5432/tcp laradock_postgres_1
ea559a775854 docker:dind "dockerd-entrypoint.…" 5 minutes ago Up 5 minutes 2375/tcp laradock_docker-in-docker_1
docker-compose ps returns these results:
$ docker-compose ps
Name Command State Ports
--------------------------------------------------------------------------------------------------------------
laradock_docker-in-docker_1 dockerd-entrypoint.sh Up 2375/tcp
laradock_nginx_1 /bin/bash /opt/startup.sh Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
laradock_php-fpm_1 docker-php-entrypoint php-fpm Up 9000/tcp
laradock_postgres_1 docker-entrypoint.sh postgres Up 0.0.0.0:5432->5432/tcp
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
Any help would be much appreciated.
I figured this out. I edited my docker-compose file volume to be /local/path/to/default.conf:/etc/nginx/sites-available
This is a problem because nginx looks for default.conf file but the volumes flag was setting sites-available as the file. I thought docker volume would symlink the file into the site-available directory not make it a file.
The correct volume syntax should be:
/local/path/to/default.conf:/etc/nginx/sites-available/default.conf
This is what ps -a gives us
NAMES
4514ea1b7b22 debian "--name gallant_spen…" 9 minutes ago Created peaceful_engelbart
df9bd2731a2b debian "--name gallant_spen…" 9 minutes ago Created happy_hodgkin
dd5b1f1b39ec redis "docker-entrypoint.s…" 32 minutes ago Up 31 minutes 6379/tcp myred
ffd6ef9d8bd5 redis "docker-entrypoint.s…" 32 minutes ago Exited (127) 32 minutes ago festive_jennings
9d01d321adad redis "docker-entrypoint.s…" 33 minutes ago Exited (0) 32 minutes ago agitated_shannon
eb7c13e7cdee debian "ls /data" 2 days ago Exited (0) 9 seconds ago gallant_spence
8991a31b1e38 debian "ls /data" 2 days ago Exited (0) 2 days ago determined_minsky
I have tried in this manner
docker start `docker ps -q -l` gallant_spence
But error ocurrs
Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"--name\": executable file not found in $PATH": unknown
gallant_spence
Error: failed to start containers: 4514ea1b7b22
I am interested in data volume that has been mounted in my previous work on this container
"Mounts": [
{
"Type": "bind",
"Source": "/home/mm/code/lesson_04",
"Destination": "/data",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
],
If I try
mm#6830s:~$ docker start -ai gallant_spence
one_sample.py
parallel_series.py
Python files are added to data folder so I thought that it worked.Then I try again
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
dd5b1f1b39ec redis "docker-entrypoint.s…" About an hour ago Up About an hour 6379/tcp myred
Hot to fix this?
You start a stopped container with
docker start [OPTIONS] CONTAINER [CONTAINER...]
For your case, you can use:
docker start gallant_spence or
docker start eb7c13e7cdee
As it is shown by the docker ps -a result, your container is configured with this CMD:
"ls /data"
This means that every time you start your container, this command will run and the container will then exit. This is how containers work. When their primary process finishes, they exit.
About the error you get and docker ps -q -l:
-q (from "quiet") tells the command to only print the container IDs
-l (from "last") tells the command to print the latest created container
This means that the above command brings you back: 4514ea1b7b22. If we put together all things...
your command:
docker start `docker ps -q -l` gallant_spence
turns to:
docker start 4514ea1b7b22 gallant_spence
The fail message you get is for 4514ea1b7b22 because it doesn't have a CMD set properly to start. I see something like: --name gallant_spen…
trying to restart dokku after a server reboot. Everything I do (redis:link, dokku deploy, pushing a new version of the app from my computer..) fails with a could not find entity error message.
2014/07/16 09:02:45 Error: Could not find entity for domain_freek
I feel like it might have something to do with the docker containers or images, so I tried restarting the latest docker container for the app, but no dice. Dokku still gives me a could not find entity error.
root#domainfreek3:/home/dokku/domain_freek# docker restart `cat /home/dokku/domain_freek/CONTAINER`
b5823fa2703f
root#domainfreek3:/home/dokku/domain_freek# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b5823fa2703f dokku/domain_freek:latest /bin/bash -c '/start 6 minutes ago Up 10 seconds 5000/tcp compassionate_tesla
f6d165a32e92 2c035b41f308 /bin/bash -c '/start 27 minutes ago Up 25 minutes 5000/tcp boring_heisenberg
96c33f5458de jezdez/redis:latest /usr/bin/redis-serve 27 minutes ago Up 27 minutes 6379/tcp redis_domain_freek
f76d9f0d944b postgresql/domain_freek:latest /usr/bin/start_pgsql 24 hours ago Up 18 hours 0.0.0.0:49153->5432/tcp sick_einstein
root#domainfreek3:/home/dokku/domain_freek# dokku deploy domain_freek
-----> Checking status of PostgreSQL
Found image postgresql/domain_freek database
Checking status... ok.
2014/07/16 09:04:47 Error: Could not find entity for domain_freek
root#domainfreek3:/home/dokku/domain_freek# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f6d165a32e92 2c035b41f308 /bin/bash -c '/start 27 minutes ago Up 25 minutes 5000/tcp boring_heisenberg
96c33f5458de jezdez/redis:latest /usr/bin/redis-serve 27 minutes ago Up 27 minutes 6379/tcp redis_domain_freek
f76d9f0d944b postgresql/domain_freek:latest /usr/bin/start_pgsql 24 hours ago Up 18 hours 0.0.0.0:49153->5432/tcp sick_einstein
Any advice would be appreciated!