clnt_create: RPC: Unknown host

This forum is for discussion about general software issues.

clnt_create: RPC: Unknown host

Postby gcala » Thu Dec 04, 2014 10:13 am

Hi,
I configured NFS on my arch on raspberry, and I'm trying to access it from a client machine. First of all, the client can see the remote machine:

$this->bbcode_second_pass_code('', '$ avahi-browse -at | grep Work
+ wlp1s0 IPv4 alarmpi [MAC:ADDRESS] Workstation local
+ wlp1s0 IPv4 arch-pc [MAC:ADDRESS] Workstation local')

The problem is the showmount command, that is not working when using server name:

$this->bbcode_second_pass_code('', '$ showmount -e alarmpi
clnt_create: RPC: Unknown host')

and runs fine when using server address:

$this->bbcode_second_pass_code('', 'showmount -e 192.168.1.95
Export list for 192.168.1.95:
/srv/nfs4/Music 192.168.1.1/24
/srv/nfs4/Videos 192.168.1.1/24
/srv/nfs4 192.168.1.1/24')

At the same time, I'm unable to mount the share using the server name:

$this->bbcode_second_pass_code('', '$ mount -t nfs alarmpi:/Videos ~/NFS_Videos
mount.nfs: Failed to resolve server alarmpi: Name or service not known')

but it is ok when using the ip address:
$this->bbcode_second_pass_code('', '$ mount -t nfs 192.168.1.95:/Videos ~/NFS_Videos')

Maybe I have to add the server name to some config file but I really dunno where. Any clues?

Thanks
gcala
 
Posts: 7
Joined: Tue Apr 30, 2013 1:13 pm

Re: clnt_create: RPC: Unknown host

Postby pepedog » Thu Dec 04, 2014 10:21 am

Try /etc/hosts
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: clnt_create: RPC: Unknown host

Postby gcala » Thu Dec 04, 2014 10:26 am

Here it is:
$this->bbcode_second_pass_code('', '$ cat /etc/hosts
#
# /etc/hosts: static lookup table for host names
#

#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost

# End of file')
gcala
 
Posts: 7
Joined: Tue Apr 30, 2013 1:13 pm

Re: clnt_create: RPC: Unknown host

Postby gcala » Thu Dec 04, 2014 11:55 am

OK, I think that this is solved. I looked at /etc/hosts of client machine and added the following line:

$this->bbcode_second_pass_code('', '192.168.1.95 alarmpi alarmpi')

showmount now works. Is this the only way? This presumes that a user needs to know the server ip address and have to modify client hosts file while I was searching a solution using only the servername got from avahi-browse command.
gcala
 
Posts: 7
Joined: Tue Apr 30, 2013 1:13 pm

Re: clnt_create: RPC: Unknown host

Postby pepedog » Thu Dec 04, 2014 1:50 pm

My dhcp server is on and arch arm machine with dnsmasq.
All clients resolve to each other on their own (sever itself doesn't because I don't want it to, hosts.conf does that)
I don't know what your dhcp server does (probably a router)
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Return to General

Who is online

Users browsing this forum: No registered users and 9 guests