compose: INTERNAL ERROR: cannot create temporary directory!

% docker-compose --version
INTERNAL ERROR: cannot create temporary directory!
%

I can’t do anything. The version, not that it’ll tell me (above is real output!), is latest - 1.6.2.

This occurred after stopping (gracefully). I then ran up:

% docker-compose up
Failed to write all bytes for libpython2.7.so.1.0
% docker-compose up
INTERNAL ERROR: cannot create temporary directory!
%

It seemed to correct itself after a ‘manual’ docker start of all containers - but it would be good if this error gave some indication of what to do. (e.g. is there an orphaned temp dir I can delete?)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 18
  • Comments: 29

Most upvoted comments

Confirming this happened to me Today.

☻ docker-compose up
INTERNAL ERROR: cannot create temporary directory!

Was running low on space:

☻  df -h
Filesystem      Size   Used  Avail Capacity  iused  ifree %iused  Mounted on
/dev/disk1     112Gi  110Gi  2.1Gi    99% 28778708 543018   98%   /

After removing a container…

☻  df -h
Filesystem      Size   Used  Avail Capacity  iused  ifree %iused  Mounted on
/dev/disk1     112Gi  110Gi  2.1Gi    99% 28778556 543170   98%   /

it works now!

TLDR; low hd space issue (2.1Gb). Hope this helps someone!

This is happening to me too. It is definitely a resource problem for docker, it should be handled with a more informative error at least so we know what the actual cause of the error is.

@dnephin any chance this could be re-opened?

docker system prune

this will solve the issue

I faced a similar issue today and i resolved it by expanding my /tmp directory which went into overflow mode due to no space left on device.

I restarted the VM with the EBS volume expanded. then ran the following commands: sudo umount /tmp sudo mount -t tmpfs -o size=1048576000,mode=1777 overflow /tmp

The above assigns 1 GB as tmp size. After that, the docker-compose commands work fine. This specific “Failed to write all bytes for _bisect.so” type errors were resolved for me.

or if you want to use the / partition as temp device storage, sudo mkdir /data/tmp sudo chmod 1777 /data/tmp sudo rm /tmp sudo ln -s /data/tmp /tmp

docker volume prune

WARNING! This will remove all local volumes not used by at least one container.

Happened to me as well, after running out of disk I’m getting Failed to write all bytes for _bisect.so error when I issue docker-compose up, even after freeing several GBs of disk space. Restarting the server fixed it for me.

You should just run these commands docker rm $(docker ps -a -q) && docker rmi $(docker images -q)

Cleaning garbage in the disk solved for me, thanks!

Had this on a virtual machine today, the host had died and hard rebooted, the virtual machine tried to resume, but some things weren’t working, like docker-compose.

A reboot of the virtual machine got things back to normal.

I had this problem, and I found out that for my case for some reason, I was out of free space.
I deleted a few files, and now everything is fine.

Left space in disk, the last thing that I could think

@jonahoffline Thanks, I didn’t consider to check the disk space allocated to my VM. I’d assumed it was issue with the container, not the host.

@estroz Containers are not automatically cleaned up, no, not unless you run them with --rm or whatever the docker-compose equivalent is for removal when finished. You can use docker rm to clean them up, tip: you don’t have to type the full hash, the first few characters (as long as unique) will suffice.

I’ve never seen those errors before. They aren’t part of the Compose code base, but they might be coming from pyinstaller which we use to create the binary.

Which host OS are you using (I’ve guessed windows from the prompt, is that correct) ?

The first step of running docker-compose is to extract the python object files into a temporary directory. If there are permission issues or a full disk, that could fail.

This can also happen if your root partition is mounted read-only, which usually is a sign of problems with your storage device.

I had same issue but in my case it was unexpected problem with UNIX volume mounting. After restart my computer (remounting volumes) issue has been solved.

i’m have same error, the disk space is very low for instance docker-compose… solution: assign more space on disk for working docker-compose