Skip to content
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

After installing, I get error when running any docker command #38

Closed
mrapogee opened this Issue Jan 21, 2016 · 10 comments

Comments

Projects
None yet
6 participants
@mrapogee
Copy link

mrapogee commented Jan 21, 2016

/home/dokku/.basher/bash: main: command not found
Access Denied

I get this for every command. Any clue what's going on?

@mrapogee

This comment has been minimized.

Copy link
Author

mrapogee commented Jan 21, 2016

Looks like it was a storage issue

@greyrain

This comment has been minimized.

Copy link

greyrain commented Feb 29, 2016

@mrapogee I have same problem. Is this problem of HDD free space?

@greyrain

This comment has been minimized.

Copy link

greyrain commented Feb 29, 2016

I found, it was HDD free space problem.
Command docker rm -v $(docker ps -a -q -f status=exited) removes docker exited containers and cleans space on HDD. So, dokku command works again.

@christiangenco

This comment has been minimized.

Copy link

christiangenco commented Mar 16, 2017

I tried cleaning up exited docker containers and still had 99% disk usage, so I ran this command to find large files on disk:

find / -type f -size +100000k -exec ls -lh {} \;

Which showed me a 20G (!!!) log file:

-rw-r----- 1 root root 20G Mar 16 22:20 /var/lib/docker/containers/90483b69c0333440528843bd76c74f62118d0e4c01b87c520344f536a0f82c70/90483b69c0333440528843bd76c74f62118d0e4c01b87c520344f536a0f82c70-json.log

Which I cleared out with:

$ echo > /var/lib/docker/containers/90483b69c0333440528843bd76c74f62118d0e4c01b87c520344f536a0f82c70/90483b69c0333440528843bd76c74f62118d0e4c01b87c520344f536a0f82c70-json.log

Dokku has been so stable I haven't pushed or had to restart in a while (uptime 115 days and counting) - I should probably put this on a cron job, but I'll probably end up just waiting another 100 days and do it manually again.

@josegonzalez

This comment has been minimized.

Copy link
Member

josegonzalez commented Mar 16, 2017

You might want to figure out why you have a 20gb log file, and how to rotate that automatically.

@haseeb-ahmad

This comment has been minimized.

Copy link

haseeb-ahmad commented Mar 23, 2017

@greyrain 's solutions worked well to free up the space on my server but don't ever use this command:

docker rm -v $(docker ps -a -q -f status=exited)

Although main: command not found issue was resolved but I ended up losing my postgresql database container and its data on the disk because of -v. I don't know why my database container was in exited state.

Is there any way I could recover that database container or its data on disk? @josegonzalez

@josegonzalez

This comment has been minimized.

Copy link
Member

josegonzalez commented Mar 23, 2017

The data is always on disk, we don't use volumes or anything. If you stop/start the service again, you should be fine.

@FilipLukac

This comment has been minimized.

Copy link

FilipLukac commented Mar 29, 2017

I had the same issue, because we are running console command right in docker container like:

dokku run app php www/index.php app:emails:send and it creates container every single time, when command dokku run * is executed.

So I solved it with cron

*/3 * * * * docker rm -v $(docker ps -a -q -f status=exited)

@josegonzalez - is this (dokku / docker) issue or feature ??

@josegonzalez

This comment has been minimized.

Copy link
Member

josegonzalez commented Mar 29, 2017

You need to add the --rm flag to the dokku run command, as documented here.

@dokku dokku locked and limited conversation to collaborators Mar 29, 2017

@josegonzalez

This comment has been minimized.

Copy link
Member

josegonzalez commented Mar 29, 2017

Please file new issues in the appropriate repo if you see something similar.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.