• Home »
  • »
  • Nagios NRPE Error: service/protocol combination not in /etc/services: nrpe/tcp

Nagios NRPE Error: service/protocol combination not in /etc/services: nrpe/tcp

It had been awhile since I have installed NRPE or Nagios Remote Plugin Executor running through xinetd so once I thought I had everything configured I attempted to restart xinetd but NRPE was not working properly. Below I describe the error in more detail along with how I resolved the issue. In the below example the server was running CentOS Linux.

NRPE Service Protocol Combination Error Via /var/log/messages:


  1. Dec 20 10:28:46 dev1 xinetd[29359]: service/protocol combination not in /etc/services: nrpe/tcp
  2. Dec 20 10:28:46 dev1 xinetd[29359]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
  3. Dec 20 10:28:46 dev1 xinetd[29359]: Started working: 0 available services
  4. Dec 20 10:29:52 dev1 xinetd[29359]: Exiting...

The output above was seen in the messages log file located in /var/log. That is always a great place to look when troubleshooting issues on Linux servers. Luckily the error made me quickly realize what I had forgotten to configure which was to add the NRPE port to /etc/services. To do this open the services file, which is located in the /etc/ directory, in your favorite text editor. Scroll down until you get to the proper place to enter port 5666, which is the NRPE port, and add the below line to the services file.

NRPE Service Port And Protocol Addition To /etc/services:


  1. nrpe            5666/tcp                        # NRPE

Once added save the file and restart xinetd using the init.d script which would be something like “/etc/init.d/xinetd restart”. This should resolve the problem with NRPE. The output below shows the services before and after NRPE in the /etc/services file after you have added NRPE.

Linux /etc/services Sample Output After NRPE Addition:


  1. netmon          2606/tcp        ospf6d          # Dell Netmon
  2. netmon          2606/udp                        # Dell Netmon
  3. dict            2628/tcp                        # RFC 2229
  4. dict            2628/udp                        # RFC 2229
  5. corbaloc        2809/tcp                        # CORBA naming service locator
  6. icpv2           3130/tcp                        # Internet Cache Protocol V2 (Squid)
  7. icpv2           3130/udp                        # Internet Cache Protocol V2 (Squid)
  8. mysql           3306/tcp                        # MySQL
  9. mysql           3306/udp                        # MySQL
  10. trnsprntproxy   3346/tcp                        # Trnsprnt Proxy
  11. trnsprntproxy   3346/udp                        # Trnsprnt Proxy
  12. pxe             4011/udp                        # PXE server
  13. fud             4201/udp                        # Cyrus IMAP FUD Daemon
  14. rwhois          4321/tcp                        # Remote Who Is
  15. rwhois          4321/udp                        # Remote Who Is
  16. krb524          4444/tcp                        # Kerberos 5 to 4 ticket xlator
  17. krb524          4444/udp                        # Kerberos 5 to 4 ticket xlator
  18. rfe             5002/tcp                        # Radio Free Ethernet
  19. rfe             5002/udp                        # Actually uses UDP only
  20. cfengine        5308/tcp                        # CFengine
  21. cfengine        5308/udp                        # CFengine
  22. nrpe            5666/tcp                        # NRPE
  23. cvsup           5999/tcp        CVSup           # CVSup file transfer/John Polstra/FreeBSD
  24. cvsup           5999/udp        CVSup           # CVSup file transfer/John Polstra/FreeBSD
  25. x11             6000/tcp        X               # the X Window System
  26. afs3-fileserver 7000/tcp                        # file server itself
  27. afs3-fileserver 7000/udp                        # file server itself
  28. afs3-callback   7001/tcp                        # callbacks to cache managers
  29. afs3-callback   7001/udp                        # callbacks to cache managers
  30. afs3-prserver   7002/tcp                        # users & groups database
  31. afs3-prserver   7002/udp                        # users & groups database
  32. afs3-vlserver   7003/tcp                        # volume location database
  33. afs3-vlserver   7003/udp                        # volume location database
  34. afs3-kaserver   7004/tcp                        # AFS/Kerberos authentication service
  35. afs3-kaserver   7004/udp                        # AFS/Kerberos authentication service
  36. afs3-volser     7005/tcp                        # volume managment server
  37. afs3-volser     7005/udp                        # volume managment server
  38. afs3-errors     7006/tcp                        # error interpretation service
  39. afs3-errors     7006/udp                        # error interpretation service
  40. afs3-bos        7007/tcp                        # basic overseer process
  41. afs3-bos        7007/udp                        # basic overseer process
  42. afs3-update     7008/tcp                        # server-to-server updater
  43. afs3-update     7008/udp                        # server-to-server updater
  44. afs3-rmtsys     7009/tcp                        # remote cache manager service
  45. afs3-rmtsys     7009/udp                        # remote cache manager service
  46. sd              9876/tcp                        # Session Director

If you run into further issues with NRPE, which is also known as Nagios Remote Plugin Executor,¬†don’t hesitate to ask the questions on QD Engage.

Automating Linux and Unix System Administration (Expert’s Voice in Linux) (Paperback)

List Price: $49.99 USD
New From: $19.95 USD In Stock
Used from: $8.61 USD In Stock