简体   繁体   English

无法找到 root 用户:passwd 文件中没有匹配的条目

[英]unable to find user root: no matching entries in passwd file

I have a running Docker container with the following:我有一个正在运行的 Docker 容器,其中包含以下内容:

docker exec -it cc58908a8dc2 /bin/bash

I ran this command before on other containers and it worked just fine.我之前在其他容器上运行过这个命令,它工作得很好。 Now, however, I'm getting this issue:但是,现在我遇到了这个问题:

unable to find user root: no matching entries in passwd file

My Dockerfile has the following contents:我的Dockerfile有以下内容:

# We will be running our Spark jobs as `root` user.
USER root

# Working directory is set to the home folder of `root` user.
WORKDIR /root

Any idea of what could cause this?知道什么可能导致这种情况吗?

Sometimes, after restarting the Docker container that message appears. 有时,重新启动Docker容器后会出现该消息。

If instead of restarting like this: docker restart cc58908a8dc2 如果不是像这样docker restart cc58908a8dc2

I stopped and started the container like this: 我停下来,像这样启动容器:

docker stop cc58908a8dc2
docker start cc58908a8dc2

Then the error disappeared. 然后错误消失了。

If you want to get this fixed please remember to comment on https://forums.docker.com/t/unable-to-find-user-root-no-matching-entries-in-passwd-file/26545/9 如果你想修复此问题,请记得发表评论https://forums.docker.com/t/unable-to-find-user-root-no-matching-entries-in-passwd-file/26545/9

Also use the feedback button from the KB article documenting how to restart docker engine when you encounter it: https://success.docker.com/article/ucp-health-checks-fail-unable-to-find-user-nobody-no-matching-entries-in-passwd-file-observed 还可以使用知识库文章中的反馈按钮 ,记录如何在遇到Docker引擎时重新启动它: https//success.docker.com/article/ucp-health-checks-fail-unable-to-find-user-nobody-无匹配条目合的passwd文件-观察

It seems that the internet is full with others randomly encountering this bug. 似乎互联网已满,其他人随机遇到这个错误。

To get an idea about which change you have to encounter it, take at look at http://status.openstack.org/elastic-recheck/index.html#1803544 which is a graph of bug occurence on OpenStack CI jobs, occurds daily. 要了解您必须遇到的更改,请查看http://status.openstack.org/elastic-recheck/index.html#1803544 ,这是OpenStack CI作业中出现错误的图表,每天都会发生。

I know that any software has bugs and that it takes time to fix them, but this bug left me.... more than two years old and the only feedback from Docker was "tracker privatly" and "restart docker". 我知道任何软件都有错误并且需要时间来修复它们,但是这个错误让我失去了......两年多以来,Docker唯一的反馈就是“跟踪器私有”和“重启docker”。

Restarting containers usually helps (see @octavian answer).重新启动容器通常会有所帮助(请参阅 @octavian 答案)。 If it is not an option try:如果它不是一个选项,请尝试:

docker exec -it -u 0 cc58908a8dc2 /bin/bash docker exec -it -u 0 cc58908a8dc2 /bin/bash

where cc58908a8dc2 is the name of your container其中cc58908a8dc2是您的容器的名称

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法找到 root 用户:Docker 中的 passwd 文件中没有匹配的条目 - Unable to find user root: no matching entries in passwd file in Docker 无法找到用户sail:passwd 文件中没有匹配的条目 - unable to find user sail: no matching entries in passwd file Docker 找不到用户:OpenJdk11 的 passwd 文件中没有匹配的条目 - Docker Unable to find user: no matching entries in passwd file for OpenJdk11 Docker 映像构建错误:无法找到用户管理员:passwd 文件中没有匹配的条目 - Docker image build Error : unable to find user admin: no matching entries in passwd file Docker:docker:来自守护进程的错误响应:linux 规范用户:无法找到用户 myuser:passwd 文件中没有匹配的条目 - Docker: docker: Error response from daemon: linux spec user: unable to find user myuser: no matching entries in passwd file VS 代码远程容器:Shell 服务器终止(代码:126,信号:null)无法找到用户 xxx:passwd 文件中没有匹配的条目 - VS code Remote Container : Shell server terminated (code: 126, signal: null) unable to find user xxx: no matching entries in passwd file 无法以非root用户身份运行docker? - unable to run docker as non-root user? 无法建立Docker映像,“必须是root用户” - Unable to build docker image, “must be a root user” Linux 上的用户“mssql”sqlsrv 没有密码条目 - No passwd entry for user 'mssql' sqlsrv on Linux Docker无法找到文件 - Docker Unable to find file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM