IBM Support

Qshell Session Takes a Long for the Prompt or Time to Start and Run Commands

Troubleshooting


Problem

When starting an interactive Qshell session, it takes more than 30 seconds for the prompt to be displayed. The Qshell terminal session is displayed, but the shell is not ready to accept commands.

Resolving The Problem

When starting an interactive Qshell session, it takes more than 30 seconds for the prompt to be displayed. The Qshell terminal session is displayed; however, the shell is not ready to accept commands. If the WRKACTJOB is used to display the QZSHSH job, the call stack shows the gethostbyname() API near the bottom of the stack.

This problem is caused by a Domain Name System (DNS) configuration error on the system. When the shell starts, it uses the gethostbyname() API to get the IP address of the local host. It then sets the HOSTID variable to the IP address. The gethostbyname() API uses the DNS to lookup the IP address. If the DNS is not configured correctly, gethostbyname() can block waiting for a response for a DNS server.

To fix the DNS configuration, do the following:

1.On the operating system command line, type the following:

CFGTCP

Press the Enter key.
2.Select Option 12 to Change TCP/IP domain information.
3.Verify the list of Internet addresses in the Domain name server field point to valid DNS servers. Normally, getting a response from the DNS server is very fast.
You can also add the local host to the host table to avoid asking the DNS server for the IP address. To add the local host to the host table, do the following:
1.On the operating system command line, type the following:

CFGTCP

Press the Enter key.
2.Select Option 10, Work with TCP/IP host table entries.
3.Select Option 1 to add the host name and its IP address to the host table.
4.Returning to the CFGTCP menu, select Option 12 to Change TCP/IP domain information.
5.Change the Host name search priority field to *LOCAL to have the system search the host table before using the DNS server.

Other possible situations:

o DNS entries in CFGTCP Option 12 are incorrect.
o The full name (system.domain) is not listed in CFGTCP Option 10.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

Historical Number

329865667

Document Information

Modified date:
18 December 2019

UID

nas8N1016223