Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to solve "rpcinfo: can't contact portmapper: RPC: " error

Status
Not open for further replies.

william6789

Technical User
Mar 14, 2003
21
0
0
CA
Hi,
I am studying NFS of Linux. I set NFS in the server and want to access the server from a server. When I run "rpcinfo -p " command in the server and client, all damon, including portmap can be seen . But when I try to connect from client to server by using "rpcinfo -p 192.168.0.160", I got the following error " rpcinfo: can't contact portmapper: RPC: Remote system error - Connection refused ". 192.168.0.160 is my server's IP address. I trid to mount, this error still jumped out again.
Can somebody tell me what wrong and how to fix it? Thanks in advance.

William
 
The "rpcinfo -p" command verifies that all necessary services are started on an NFS *server*. You don't need the portmapper running on a client. If you are receiving this error from a client, and you are sure that the portmapper is running on the NFS server, I would check your firewall (iptables) rules (iptables -L) to ensure that ports 111, 745, 747, and 2049 are not being blocked.

To mount an NFS share from a client, use the mount command. Here's an example...

mount -t nfs 192.168.0.160:/nfs/exports /mnt/nfs


ChrisP
 
Hi, fluid11,
Thank, I checked the command "iptables -l", and and I think you are right, maybe these ports have been blocked. The response was
"Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Lokkit-0-50-INPUT (1 references)
target prot opt source destination
ACCEPT udp -- 192.168.0.1 anywhere udp spt:domain dpts:
1025:65535
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp flags:S
YN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:http flags:S
YN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp flags:SY
N,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh flags:SY
N,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:telnet flags
:SYN,RST,ACK/SYN
ACCEPT udp -- anywhere anywhere udp spts:bootps:boot
pc dpts:bootps:bootpc
ACCEPT udp -- anywhere anywhere udp spts:bootps:boot
pc dpts:bootps:bootpc
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flag
s:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:nfs flags:SY
N,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:0:1023 reje
ct-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:nfs reject-w
ith icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpts:x11:6009 fl
ags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:xfs flags:SY
N,RST,ACK/SYN reject-with icmp-port-unreachable

"

Now can you tell me how to unblock these ports?

Thanks

william6789
 
Most likely you installed the firewall during the Red Hat installation. You can easily modify your current rules using the "lokkit" utility. Run "lokkit", and enter "Medium" and then "Customize". Add this...

nfs:tcp,nfs:udp,111:tcp,111:udp

Or, if a firewall isn't needed, you can just turn it off completely using lokkit.

ChrisP
 
Hi, fluid11
Thanks, I set my server accroding to your suggestion, and it works for the command
"rpcinfo -p 192.168.0.160
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 32768 status
100024 1 tcp 32768 status
391002 2 tcp 32769 sgi_fam
100011 1 udp 627 rquotad
100011 2 udp 627 rquotad
100011 1 tcp 630 rquotad
100011 2 tcp 630 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100021 1 udp 32770 nlockmgr
100021 3 udp 32770 nlockmgr
100021 4 udp 32770 nlockmgr
100005 1 udp 32771 mountd
100005 1 tcp 32770 mountd
100005 2 udp 32771 mountd
100005 2 tcp 32770 mountd
100005 3 udp 32771 mountd
100005 3 tcp 32770 mountd
".But when I mounted from a client , the problem is "mount: RPC: Timed out". I set the folder in the server's /etc/exports file.
Sorry, I am a new learner. Can you give me more suggetion or web site for this problem?

Thanks again

william
 
Try using "lokkit" to turn the firewall off, and then try to connect. If you can connect with the firewall off, then we'll know for sure that its a firewall issue.

ChrisP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top