dokku error: cannot find entity for app - ruby-on-rails

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!

Related

hasura/graphql engine always restarting while i user online heroku db

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9894549e2edd hasura/graphql-engine:v2.10.1 "/bin/sh -c '\"${HGE_…" 29 seconds ago Up Less than a second 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp backend-graphql-engine-1
03af36df02d1 postgres:10 "docker-entrypoint.s…" 29 seconds ago Restarting (1) 11 seconds ago backend-postgres-1
the error was that by mistake I make the heroku db for metadata and also the db it self , fixed it by making metadata db local postgredb

Docker fails to start container in detached mode

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

Why can't I go to localhost using Laradock?

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

Elastic Beanstalk & Docker: problem with elastic beanstalk spawning multiple docker containers

I'm forced to use elastic beanstalk (eb) and Docker in deploying. When I build & run my container locally it boots up and runs well. I'm using supervisord to boot some ruby code (clockwork and Rails/puma)
When deploying using eb, I see how eb spawns several consecutive containers until all just chokes down:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
232bbe498977 a4a6fd70537b "supervisord -c /etc…" About a minute ago Up About a minute 80/tcp silly_williams
a9e21774575e a4a6fd70537b "supervisord -c /etc…" 2 minutes ago Up 2 minutes 80/tcp trusting_murdock
945f51ef510f a4a6fd70537b "supervisord -c /etc…" 3 minutes ago Up 3 minutes 80/tcp blissful_stonebraker
6e51470ddce8 a4a6fd70537b "supervisord -c /etc…" 4 minutes ago Up 4 minutes 80/tcp lucid_ramanujan
2689568ceb6d a4a6fd70537b "supervisord -c /etc…" 4 minutes ago Up 4 minutes 80/tcp keen_mestorf
Where should I be looking for the root to this behavior? Can the container be creating this behaviour or is eb configured in a wrong way?
(I apologize that I'm a bit too unspecific with details since I'm not in full control of the environment)
I eventually realized I had been tampering with some settings, and had set monitoring to basic. Once put to Enhanced it only booted one container and things started to work again!
In:
Elastic Beanstalk > [my application] > Configuration > monitoring > System: Enhanced.

Docker - run deployed asp.net application

How to run this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c2cafa3cb28b voiconshop:dev "tail -f /dev/null" 8 minutes ago Up 8 minutes 5000/tcp, 0.0.0.0:32769->80/tcp dockercompose5647427199741822447_voiconshop_1
a14af67cb5f1 e898d5096181 "dotnet VoiConShop..." 4 hours ago Up 4 hours 8889/tcp, 0.0.0.0:8080->2000/tcp loving_volhard
I opened Chrome then enter: http://localhost:8889/ or http://localhost:5000/
However, the site can't reached.

Resources