25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Docker oci runtime error – Causes and Fixes

by | Sep 14, 2019

Isn’t it frustrating if you can’t even start a Docker container?

Usually, the Docker oci runtime error occurs due to improper namespace setup or system file errors.

Start-up errors in Docker containers always need an immediate fix.

Therefore, at Bobcares we often get requests to fix Docker errors as a part of our Docker Hosting Support.

Today, let’s have a look into Docker oci runtime error and see how our Support Engineers fix it.

 

Docker oci runtime error in detail

Before discussing further, let’s first have a quick look at Docker.

Docker container technology helps developers and sysadmins to develop, setup, and run applications.

Basically, a container is a software that wraps up code and its dependencies for any application. This makes the application run quickly and reliably from any computing environment.

But, many times Docker containers will end up showing errors. Let’s discuss a few situations where Docker oci runtime error can occur. Also, we will see how our Support Engineers fix it.

 

1. When namespaces isolate containers

Namespaces are intended to provide isolation for running processes. So, the namespaces limit the Docker access to system resources. But the running processes may not be aware of these restrictions.

Therefore, when we isolate containers using namespace and run the container, we get the error.

docker: docker: Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:247: running exec setns process for init caused \"exit status 34\"".

When our customers have such an error, our Support Team checks the namespace setup.

We make sure that the value user.max_user_namespaceis set to 0 or above. And also ensure that the following kernel argument has the correct value.

namespace.unpriv_enable=1.

 

2. Error after enabling namespaces

Sometimes the container may be unable to run even after enabling the namespace. Here the error message shows up as

nsenter: failed to update /proc/13948/uid_map: Invalid argument
nsenter: failed to sync with parent: SYNC_USERMAP_ACK: got 255: Success
container_linux.go:262: starting container process caused "process_linux.go:247: running exec setns process for init caused \"exit status 2\""
docker: Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:247: running exec setns process for init caused \"exit status 2\"".
ERRO[0000] error waiting for container: context canceled

 

In this case, our Support Team first makes sure that the namespace is enabled properly. Further, we check two files.

/etc/subuid

/etc/subgid

Usually, multiple entries in any of these files result in Docker error. So, we check the entries in the file and remove the unwanted one.

Finally, we check by running the container again.

 

3. Incorrect container settings

In some cases, the container fails to run due to the wrong settings. For instance, in Docker 18.09, an oci runtime error shows up.

docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"/bin/ucp-tool\": stat /bin/ucp-tool: no such file or directory": unknown.

Usually, this error occurs due to an incorrect flag set up in the Docker systemD unit file.

So, our Support Team initially checks both the docker file and .conf file. The configuration file for Docker flag is /etc/systemd/system/docker.service.d/mount_flags.conf.

Later, we remove the unwanted entries. Finally, we restart the Docker service to ensure the proper working of the container.

 

[Still, Docker is showing oci runtime error? – We will fix it for you]

 

Conclusion

In short, Docker oci runtime error usually occurs due to improper setup of namespaces or errors in system files. We saw how our Support Engineers fix it for our customers.

Are you using Docker based apps?

There are proven ways to get even more out of your Docker containers! Let us help you.

Spend your time in growing business and we will take care of Docker Infrastructure for you.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF