IBM i Telnet connection refused, check that the Telnet server is running
When a 5250 session to IBM i is refused or never shows Sign On, check the Telnet server with NETSTAT, start it with STRTCPSVR *TELNET, and check QINTER.
A 5250 client reaches IBM i through the system's Telnet server. If that server is not running, or not listening on the port you use, the connection is refused or never shows the Sign On display. Someone who can already get to the system has to check it.
What the client shows
- Connection refused: nothing is listening on that port. The Telnet server may be ended, or you may have the wrong port.
- Timed out: the packets are not getting through. That is usually the network or a firewall, not the Telnet server.
- Connects, but no Sign On display: the server is listening, but the session cannot finish. A common reason is that the interactive subsystem is not active (see below).
See Connection abort, reset and timed-out errors for the wording of these errors.
Is the server listening?
On an IBM i command line, type NETSTAT and choose option 3 (connection status). Look for a line with local port telnet in state Listen. Press F14 to show port numbers instead of names: plain Telnet is normally port 23. If you connect with TLS, look for the secure port as well, usually 992.
IBM i runs the Telnet server as jobs named QTVTELNET and QTVDEVICE in subsystem QSYSWRK. If they are missing, the server is not running.
Start or restart it
STRTCPSVR SERVER(*TELNET)
To restart a server that is listed but not working, end it first with ENDTCPSVR SERVER(*TELNET), then start it again. Run NETSTAT again to check that port 23 is in Listen state.
To have the Telnet server start every time TCP/IP starts, set its autostart attribute:
CHGTELNA AUTOSTART(*YES)
CHGTELNA needs *IOSYSCFG special authority.
If it will not start
- A missing exit program. If a program is registered for a Telnet exit point but the program no longer exists, the server usually does not start. Run
WRKREGINFand check exit pointsQIBM_QTG_DEVINITandQIBM_QTG_DEVTERMwith option 8. This often happens after security software is removed but its exit programs stay registered. - TLS settings. If you do not use TLS, IBM suggests setting Allow secure sockets layer to
*NOinCHGTELNAand trying again. If you do use it, a valid, unexpired certificate must be assigned to the Telnet server application (QIBM_QTV_TELNET_SERVER) in Digital Certificate Manager. If TLS stopped working after an upgrade or PTF, see 5250 TLS stops working after an IBM i upgrade or PTF: QSSLPCL and QSSLCSL. - The job log. Look for messages about the start attempt in your job log (
WRKJOB, option 10, F10 for details) and in theQTVTELNETandQTVDEVICEjob logs. - Port restrictions.
CFGTCPoption 4 lists TCP/IP port restrictions, which can keep Telnet off its port.
Listening, but nobody can sign on
- QINTER is not active. Telnet sessions do not complete when the interactive subsystem is down, and IBM notes that no error is written to the Telnet job logs in this case. Check with
WRKSBSand start it withSTRSBS QINTER. - No virtual devices. Each Telnet session uses a virtual display device. If
QAUTOVRTis 0 or too low, new sessions fail. See IBM i "Cannot automatically select virtual device".
When Telnet is down for everyone
You cannot fix Telnet over Telnet. IBM's Telnet troubleshooting steps start the server from System i Navigator (Network, Servers, TCP/IP, then right-click Telnet and choose Start), and its support note recommends a 5250 console session when TCP/IP itself has to be restarted (ENDTCP and STRTCP), because all TCP/IP connections end while it is down.
Related
- Signing on to IBM i
- 5250 display devices and device names
- TLS for 3270 and 5250
- Telnet basics
- 5250 TLS stops working after an IBM i upgrade or PTF: QSSLPCL and QSSLCSL
- Set up TLS for IBM i Telnet on port 992: DCM, QIBM_QTV_TELNET_SERVER and ALWSSL
- IBM i SSH "Connection refused" on port 22: start sshd with STRTCPSVR *SSHD and autostart it