Solved - How to got rid of Docker error EOF in archive









Here at IbmiMedia, We have helped customers resolved Docker related issues affecting their servers as part of our Server Support Services.


In this context, we shall look into the causes of this issue and how to solve it.



What is behind Docker error EOF?

This error can happen because of different factors in the Docker container. 

Let us take a look at the error message below for the cause;


tar -cf /opt/backup-images.tar dtr-registry-<replica-id>
...
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
...


In the process of running a DTR backup operation, most backup activities in a docker container is processed in a dtr-phase2 container in which the bootstrap script spins around the container.

The Bootsrap script also known as the bootstraper analyses and monitors the dtr-phase2 container via the ContainerWait API endpoint. This API, blocks and wait for the container to return an exit instruction.


Therefore , if a load balancer is not configured correctly, there will be issues in the container and this will lead to break in connection over time. This is what results in an EOF error.


How to solve Docker error EOF in archive

The best way to fix this issue is to do a test on the load balancer in relation with the timeout of the dtr backup process.

Use the following command to conduct the test;


time docker wait $(docker ps -qaf name=ucp-controller |head -n1)


You will notice that process exits in no time and therefore triggers an error in relation with the dtr backup. This will terminate the connection session.

A quick fix to this error is to increase the timeout time in the tcp_keepalive setting of the load balancer so as to see how much traffic goes through the DTR replicas. We can set a time value of 6 minutes.


Do you need any support in solving Docker issues? Contact us Today.

Conclusion

Docker error EOF occurs as a result of issues with the configuration in the docker container.




Keep In Touch

We hope to hear from you.

Accept File Type: jpg,jpeg,png,txt,pdf,doc,docx