2

there is a well-worked program (daemon) running on CentOS-5.4 that makes by itself RPC registration as program 191299 version 10.

After an unplanned program stop, the RPC registration is still remaining, so the program can't get restarted due to unregister try causes the error:

# rpcinfo -d 191299 10    
rpcinfo: Could not delete registration for prog 191299 version 10    

service portmap restart din't help too despite on successful restart.

Could you please advise - how to force the RPC registration removal?

Many thanks!

2 Answers2

1

Don't use service portmap restart. It stored the current state of portmap before stopping it and restores it after start. Better do stop and start. Or

# service portmap stop
# rm -f /var/run/portmap.state
# service portmap start
kofemann
  • 4,308
  • 1
  • 21
  • 27
0

On CentOS 6, rpcbind (in its default mode) allows creating a mapping from anyone over localhost, but only allows deleting the mapping if you own it or are root. If the binding is created over UDP or TCP, then rpcbind is unable to authenticate the user that is making the modification/deletion request, so it is being denied.

Calling rpcinfo -d as root should delete the mapping. On CentOS 6, the RPC mappings are also cleared during a system reboot (at least with our installation).

If the port is bound using UNIX sockets (/var/run/rpcbind.sock), then the requester is able to be authenticated, and you will be shown as the owner in the results of rpcinfo. rpcinfo -d will then work if called using the same user account that made the binding.

Pigrew
  • 101
  • 1