During the deployment of Samba and NFS services on one of the RHEL 6 server, I’m hit by this message when trying to start, stop and restart service portmap :
[[email protected] ~]# service portmap start portmap: unrecognized service
Portmap is replaced by rpcbind on some linux distributions such as Fedora 8,RHEL 6 and CentOS 6. Portmap is now started and stopped as part of the rpcbind service. You may not able to find the portmap service, but you can see rpcbind instead.
Command line below provides the required dependency packages. It can also be used to track a package containing a specific executable :
[[email protected] ~]# yum whatprovides portmap Loaded plugins: rhnplugin This system is not registered with RHN. RHN support will be disabled. rpcbind-0.2.0-8.el6.i686 : Universal Addresses to RPC Program Number Mapper Repo : DVD-RHEL6-Repository Matched from: Other : portmap rpcbind-0.2.0-8.el6.i686 : Universal Addresses to RPC Program Number Mapper Repo : installed Matched from: Other : Provides-match: portmap
When you try to install portmap on RHEL 6, it will install rpcbind instead :
[[email protected] ~]# yum install portmap -y Loaded plugins: rhnplugin This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Package rpcbind-0.2.0-8.el6.i686 already installed and latest version Nothing to do
What is Portmap :
Portmap is a server that converts RPC (Remote Procedure Call) program numbers into DARPA protocol port numbers. It must be running in order to make RPC calls. Server services that use RPC include NFS, NIS and Samba. When an RPC server is started, it will tell portmap what port number it is listening to, and what RPC program numbers it is prepared to serve. When a client wishes to make an RPC call to a given program number, it will first contact portmap on the server machine to determine the port number where RPC packets should be sent. Therefore, portmap must be started before any RPC servers are invoked. This because RPC-based services rely on portmap to make all connections with incoming client requests.
What is rpcbind :
rpcbind is a server that converts RPC program numbers into universal addresses. It must be running on the host to be able to make RPC calls on a server on that machine. When an RPC service is started, it tells rpcbind the address at which it is listening, and the RPC program numbers it is prepared to serve. When a client wishes to make an RPC call to a given program number, it first contacts rpcbind on the server machine to determine the address where RPC requests should be sent. rpcbind should be started before any other RPC service. Normally, standard RPC servers are started by port monitors, so rpcbind must be started before port monitors are invoked.
Server service that use RPC :
NFS uses Remote Procedure Calls (RPC) to route requests between clients and servers, meaning that the portmap service must be enabled and active at the proper runlevels for NFS communication to occur.
Samba is an Open Source software that based on the common client/server protocol of Server Message Block (SMB) and Common Internet File System (CIFS). It’s allows end users to access and use files, printers and sharing the company resources.
Example portmap instance
The rpcinfo command shows each RPC-based service with its port number, RPC program number, version, and IP protocol type (TCP or UDP). This is to make sure the proper NFS RPC-based services and portmapper are enabled for portmap.
[[email protected] ~]# rpcinfo -p program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 56670 status 100024 1 tcp 54564 status