Why “portmap unrecognized service” on RHEL 6/CentOS 6

Question :

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 :

[root@rhel6 ~]# service portmap start
portmap: unrecognized service

 

Answer :
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.
http://www.archlinux.org

Command line below provides the required dependency packages. It can also be used to track a package containing a specific executable :

[root@rhel6 ~]# 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 :

[root@rhel6 ~]# 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.

See also  How to Disable Firewall on RHEL 6

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.

See also  How to Install Zimbra Collaboration Suite 7.1.3 Mail Server on Linux CentOS 5.7

Server service that use RPC :
1. NFS
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.

2. Samba
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.

See also  How to Install EPEL Yum Repository on Linux CentOS 7 / RHEL 7

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.

[root@rhel6 ~]# 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

How to Reset the Directory Manager Password on RHEL 7 / CentOS 7
How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

It is best practice to remember passwords, but because too many passwords, sometimes we forget. We are not encouraged to write the password on any paper or share the password...

How to Find Big Files Size on Linux RHEL/CentOS
How to Find Big Files Size on Linux RHEL/CentOS

As the linux administrator, sometimes we have to identify which files are most take much space in the linux server resulting in low free space. Low disk space can also...

Why Linux users should worry about malware and what they can do about it
Why Linux users should worry about malware and what they can do about it

Don’t drop your guard just because you’re running Linux. Preventing the spread of malware and/or dealing with the consequences of infection are a fact of life when using computers. If...

How to Reset Forgotten Root Password on Linux RHEL 7/CentOS 7
How to Reset Forgotten Root Password on Linux RHEL 7/CentOS 7

This article will explain the steps to reset a lost root password or to reset forgotten root password on Linux RHEL 7 or CentOS 7. Basically, the steps will adding...

How to Update CentOS or Upgrade CentOS to the Latest Version
How to Update CentOS or Upgrade CentOS to the Latest Version

Recently, the latest version of CentOS 7.3 was released. All users of CentOS 7.0, 7.1 and 7.2 can upgrade their system to the most recent. This quick guide will explain...

How to Change your WordPress Username, Nickname and Display Name in MySQL
How to Change your WordPress Username, Nickname and Display Name in MySQL

After you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from...

How to Enable SSH Root Login on Ubuntu 16.04
How to Enable SSH Root Login on Ubuntu 16.04

As what we wrote in the previous article on how to allow SSH root on Ubuntu 14.04, after installing a fresh new copy of Ubuntu 16.04 LTS, we find that...

How to Change UUID of Linux Partition on CentOS 7
How to Change UUID of Linux Partition on CentOS 7

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing...

Leave a Reply

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