Fixing PRVF-0002 : Could not retrieve local nodename

Here is a common question I get from junior DBAs (and operating system who tries to help by installing the Oracle Home themselves). The question sometimes sounds like this: “After we installed the new database server and changed its hostname, we try to install the Oracle Home using the runInstaller but hitting the following error: PRVF-0002: Could not retrieve local nodename. How do we resolve it?”.

In terms of looks, the error message looks something like this (this is from Oracle 11g, but it also happens in other versions as well):
prvf-0002

Indeed, a problem – but what can it be?

Diagnosis


We open the installation log files, and there we can find the following error:

oracle.cluster.verification.VerificationException: PRVF-0002 : Could not retrieve local nodename

This error message indicates that there is some kind of verification, and the local nodename could not be retrieved.
We can check the hostname for our new server, and see that it looks fine. Our server indeed has a name:

[[email protected] ~]$ hostname
lnx-oracle66-db11g

So, what is the actual problem?

Solving the problem


The problem is that Oracle installer is trying to do a reverse lookup on our hostname and see if the hostname that we’re using is actually accessible from the network. It tries to ping its own hostname but since we didn’t setup the DNS yet, it cannot do that (cannot resolve the name).

Example:

[[email protected] ~]$ ping lnx-oracle66-db11g
ping: unknown host lnx-oracle66-db11g

In order to solve that, we need to do one of two things: we can either add a DNS record to out DNS server, or we can add a local record in our /etc/hosts file.
Although we need root privileges for adding things to /etc/hosts, this is the faster solution to our problem:

[[email protected] ~]#  ifconfig | grep eth -A 2|grep "inet addr" | cut -d: -f2 | awk '{ print $1 "\t" "'''$HOSTNAME'''"}' >> /etc/hosts
[[email protected] ~]# cat /etc/hosts
127.0.0.1       localhost localhost.localdomain localhost4 localhost4.localdomain4
::1             localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.2.15       lnx-oracle66-db11g
192.168.56.104  lnx-oracle66-db11g

If we still aren’t connected externally and we don’t have a public IP, we can use the loopback address (127.0.0.1) and add the hostname to that:

[[email protected] ~]# cat /etc/hosts
127.0.0.1       localhost localhost.localdomain localhost4 localhost4.localdomain4 lnx-oracle66-db11g
::1             localhost localhost.localdomain localhost6 localhost6.localdomain6

After adding the hostname, we can run the runInstaller and it will work smoothly.

1 reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply