Troubleshooting
Problem
DNS resolution by using PASE or QSH are failing. DNS resolution from the command like works.
Resolving The Problem
It was discovered that the /etc/resolv.conf and /etc/netsvc.conf files are either missing or corrupted.
Verify whether /etc/resolv.conf and /etc/netsvc.conf exist on your system.
If they don't exist. You should create both files with the following commands:
CALL QP2TERM
echo "hosts=local" > /etc/netsvc.conf
echo "search <domain>" > /etc/resolv.conf
echo "nameserver <dnsserver>" >> /etc/resolv.conf
echo "options rotate" >> /etc/resolv.conf
<domain> Is a space-separated list of all domains that should be used for searching.
<dnsserver> Is the IP address from one DNS-Server found in CFGTCP - 12. If more than one DNS-Server is configured, you should repeat this line to get all servers in this file.
CALL QP2TERM
echo "hosts=local" > /etc/netsvc.conf
echo "search <domain>" > /etc/resolv.conf
echo "nameserver <dnsserver>" >> /etc/resolv.conf
echo "options rotate" >> /etc/resolv.conf
<domain> Is a space-separated list of all domains that should be used for searching.
<dnsserver> Is the IP address from one DNS-Server found in CFGTCP - 12. If more than one DNS-Server is configured, you should repeat this line to get all servers in this file.
If they do exist you can use cat /etc/netsvc.conf and cat /etc/resolv.conf to see the file contents, verify that the data looks correct based on the instructions above. If the data does not look correct issue rm path/filename to remove the file, and follow the instructions above to create a correct file.
After modifying this file, a dig +search on only the hostname (if the hostname, plusone of the domains in search exist) will be resolved. Queries from other TCP applications also now return the correct value.
After modifying this file, a dig +search on only the hostname (if the hostname, plusone of the domains in search exist) will be resolved. Queries from other TCP applications also now return the correct value.
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CMAAA2","label":"Communications-\u003ETCP"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]
Historical Number
599252903
Was this topic helpful?
Document Information
Modified date:
12 December 2022
UID
nas8N1011533