Rpcbind error in Docker: cannot run multiple rpcbind services

332 views Asked by At

I run two containers on my host (e.g, A and B). On container A, the rpcbind service start normally. However, when I start rpcbind service on container B, there are errors listed below:

# service rpcbind restart
 * Stopping RPC port mapper daemon rpcbind                                                                                                                                                             [ OK ]
 * Starting RPC port mapper daemon rpcbind                                                                                                                                                                    rpcbind: another rpcbind is already running. Aborting

Then I stop the rpcbind service on container A, the rpcbind service can be started normally on container B.

By the way, the rpcbind service on host is running normally. It seems that there is only one rpcbind service allowed to run in docker.

The host system is CentOS 7, and the docker container's based image is ubuntu/20.04. My initial aim is set the containers A and B as NIS client by the script below:

service rpcbind start
service nis start

Since there is only one normal rpcbind service, I cannot start containers A and B simultaneously.

Any solution or suggestion? Thanks.

I have tried to change the docker network to solve this issue, but it does not work.

I expect to start nis client normally on multiple containers simultaneously.

0

There are 0 answers