Avoid TNS-00584 errors on listener restart

If you use the “TCP.VALIDNODE_CHECKING“, “TCP.INVITED_NODES” or “TCP.EXCLUDED_NODES” parameters in your listener’s sqlnet.ora file, you may have already encountered the following error when starting or restarting your listener:

TNS-12560: TNS:protocol adapter error
TNS-00584: Valid node checking configuration error

The problem is easy to fix when you have only a few hostnames referenced, but when the list is long, finding the server that caused the error can be much more time consuming.

What does the error “TNS-00584” means?

According to the Oracle documentation, the “TNS-00584” error indicates that one of the hostnames specified in the “invited_nodes” or “excluded_nodes” parameter of the sqlnet.ora file is invalid. This explanation gives a hint, but does not say what Oracle means by “invalid”.
This information can be found in Doc ID 287500.1:

The listener will not start if any of the hosts or ip addresses are not resolvable. The only solution to this issue is to ensure that all the hostnames and ip addresses in the invited nodes list are resolvable using ping or nslookup from the host where the listener is starting.

Note that if a hostname cannot be resolved while the listener is already running, this will have no impact. The error will only appear on the next listener restart.

How to avoid this situation?

In order to avoid this problem, I have written a small shell script that checks if all hostnames can be resolved and, if not, returns the name of the faulty server. It can be executed when the error appears, but it is better to run it on a regular basis in order not to have any bad surprise at the next listener restart. It can easily be integrated in a “Metric extension” on Oracle Enterprise Manager” for example.
Here is the script:

for node in $(grep -E "^tcp.excluded_nodes" sqlnet.ora |awk -F "=" '{print $2'} |awk -F '[()]' '{print $2}');do
nslookup ${node} > /dev/null
if [[ ${resolvable} -ne 0 ]];then
echo "Hostname ${node} not resolvable"

You just have to replace “tcp.excluded_nodes” by “tcp.invited_nodes” according to your settings.
If the script returns a result, the hostname must be removed from the list of nodes so that the listener can be restarted.

I hope you find this post useful. Stay tuned for more DBA stuff!

Leave a Reply

Your email address will not be published. Required fields are marked *