End TCP/IP Server (ENDTCPSVR)

The End TCP/IP Server (ENDTCPSVR) command is used to end the TCP/IP application server jobs that are specified in the SERVER parameter. If the jobs have any current active connections, these connections are ended immediately. If the ENDTCPSVR command is used to end a server that is not active, a diagnostic message may be returned.

The End TCP/IP Server command can only be used when TCP/IP is fully operational. When the system is in restricted state, this command is not allowed.

Additional servers can automatically be added to the list of servers that ENDTCPSVR will support by using the Add TCP/IP Server (ADDTCPSVR) command.

Restrictions:

Parameters

Keyword Description Choices Notes
SERVER Server application Single values: *ALL
Other values (up to 300 repetitions): Character value
Optional, Positional 1
HTTPSVR HTTP server Single values: *ALL
Other values: Element list
Optional
Element 1: Server instance Name, *ADMIN
DNSSVR DNS server Single values: *ALL
Other values: Element list
Optional
Element 1: Server instance Name
TCMSVR TCM server Single values: *NONE
Other values: Element list
Optional
Element 1: Instance name Character value, *ALL
TOMCATSVR ASFTOMCAT server Single values: *NONE
Other values: Element list
Optional
Element 1: Server instance name Character value, *ALL
INSTANCE Instance Character value, *DFT, *ALL Optional

Server application (SERVER)

Specifies which of the TCP/IP application server jobs is to be ended by this command.

Additional TCP/IP servers could also be available if they were added by running the Add TCP/IP Server (ADDTCPSVR) command.

For a list of all supported values for this parameter, you can press F4 (Prompt) for this parameter when prompting this command.

Single values

*ALL
All of the TCP/IP server jobs are ended.

Other values (up to 300 repetitions)

*BOOTP
The bootstrap protocol (BOOTP) server is ended.
*DBG
The Debug server is ended.
*DDM
The Distributed Data Management (DDM) server job is ended.
*DHCP
The Dynamic Host Configuration Protocol (DHCP) server job is ended.
*DIRSRV
The LDAP directory services (DIRSVR) server job is ended.
*DLFM
The DataLink File Manager (DLFM) server job is ended.
*DNS
The Domain Name System (DNS) server job is ended unless:
  • A specific server instance name is specified for the DNSSVR parameter. Then only the specified instance is ended.

To end all instances of the DNS server, specify one of the following:

  ENDTCPSVR   SERVER(*DNS)
  ENDTCPSVR   SERVER(*DNS)  DNSSVR(*ALL)

*DOMINO
The Lotus Domino (DOMINO) server is ended.
*EDRSQL
The Extended Dynamic Remote SQL (EDRSQL) server is ended.
*FTP
All File Transfer Protocol (FTP) server jobs are ended.
*HTTP
All instances of the HyperText Transfer Protocol (HTTP) server are ended unless:
  • A specific server instance name is specified for the HTTPSVR parameter. Then only the specified instance is ended.
  • The *ADMIN special value is specified for the HTTPSVR parameter. Then only the administration server is ended.

To end all instances of the HTTP server, specify one of the following:

  ENDTCPSVR   SERVER(*HTTP)
  ENDTCPSVR   SERVER(*HTTP)  HTTPSVR(*ALL)

The HTTP server is also known as the IBM HTTP Server.

*IAS
The Integrated Web Application (IAS) server is ended.
*INETD
The Internet Daemon (INETD) server is ended.
*LPD
All line printer daemon (LPD) servers are ended.
*MGTC
The Management Central (MGTC) server is ended.
*NETSVR
The NetServer (NETSVR) server is ended.
*NTP
All Simple Network Time Protocol (SNTP) services servers are ended.

Note: If both client and server SNTP services have been started, running the ENDTCPSVR command specifying SERVER(*NTP) will end both client and server services. If you wanted to end just the client or just the server SNTP service, you will need to run the Start TCP/IP Server (STRTCPSVR) command again, specifying SERVER(*NTP) and NTPSRV(*CLIENT) or NTPSRV(SERVER).

*OMPROUTED
The OMPROUTER Daemon (OMPROUTED) server is ended. The Open Shortest Path First (OSPF) and Routing Information Protocol (RIP) server jobs are ended. Specifying SERVER(*OMPROUTED) and INSTANCE(*OSPF) will end only the OSPF server job. Specifying SERVER(*OMPROUTED) and INSTANCE(*RIP) will end only the RIP server job.
*ONDMD
The OnDemand (ONDMD) server job is ended.
*POP
All Post Office Protocol (POP3) mail server jobs are ended.
*QOS
The Quality of Service (QOS) server is ended.
*REXEC
All Remote Execution (REXEC) servers are ended.
*ROUTED
The Router Daemon (ROUTED) server is ended.
*SMTP
All jobs associated with Simple Mail Transfer Protocol (SMTP) in the QSYSWRK subsystem are ended. The bridge job in the QSNADS subsystem is not ended.
*SNMP
All jobs associated with the Simple Network Management Protocol (SNMP) agent in the QSYSWRK subsystem are ended.
*SRVSPTPRX
The Service and Support Proxy (SRVSPTPRX) server is ended.
*SSHD
The Secure Shell (SSH) Daemon server is ended.
*TCM
The Triggered Cache Manager (TCM) server is ended unless:
  • A specific server instance name is specified for the TCMSVR parameter. Then only the specified instance is ended.

To end all instances of the TCM server, specify:

  ENDTCPSVR   SERVER(*TCM)  TCMSVR(*ALL)

*TELNET
All TELNET server jobs are ended.
*TFTP
All Trivial File Transfer Protocol (TFTP) server jobs are ended.
*VPN
The Virtual Private Network (VPN) server is ended.
*WEBFACING
The WebFacing server is ended.

HTTP server (HTTPSVR)

Specifies the name of the HTTP server instance to end. The SERVER parameter specified must be *HTTP or this parameter is ignored.

If multiple HTTP server instances have been defined, you can choose to end all instances, or end one specific instance by specifying the instance name to be ended.

*ALL
All instances of the HTTP server that are currently running are ended.
*ADMIN
The Administration Server is ended. The Administration Server is an instance of the HTTP server that allows administration of certain system functions using a Web browser.
name
Specify the name of the HTTP server instance to be ended.

DNS server (DNSSVR)

Specifies the name of the DNS server instance to end. The SERVER parameter specified must be *DNS or this parameter is ignored.

If multiple DNS server instances have been defined, you can choose to end all instances, or end one specific instance by specifying the instance name to be ended.

*ALL
All instances of the DNS server that are currently running are ended.
name
Specify the name of the DNS server instance to be ended.

TCM server (TCMSVR)

Specifies the name of the TCM server instance to end. The SERVER parameter specified must be *TCM or this parameter is ignored.

If multiple TCM server instances have been defined, you can choose to end all instances, or end one specific instance by specifying the instance name to be ended.

*NONE
No instances of the TCM server that are currently running are ended.
*ALL
All instances of the TCM server that are currently running are ended.
character-value
Specify the name of the TCM server instance to be ended.

ASFTOMCAT server (TOMCATSVR)

Specifies the name of the Tomcat server instance to end. The SERVER parameter specified must be *ASFTOMCAT or this parameter is ignored.

If multiple Tomcat server instances have been defined, you can choose to end all instances, or end one specific instance by specifying the instance name to be ended.

*NONE
No instances of the Tomcat server that are currently running are ended.
*ALL
All instances of the Tomcat server that are currently running are ended.
character-value
Specify the name of the Tomcat server instance to be ended.

Instance (INSTANCE)

Specifies the name of the server instance to end. This parameter may be specified if the SERVER parameter is *DIRSRV, *DNS, *HTTP, *OMPROUTED, or *TCM. It may also be specified for user-defined servers which support multiple server instances.

*DFT
The default server or servers are ended. If the SERVER parameter is *DIRSRV, the QUSRDIR server instance will be ended. If the SERVER parameter is *HTTP or *DNS, all defined server instances will be ended. If the SERVER parameter is *OMPROUTED, both the *OSPF and *RIP server jobs are ended. If the SERVER parameter is *TCM, no defined server instances will be ended
*ALL
All instances of the server that are currently running are ended.
character-value
Specify the name of the server instance to be ended. Up to 32 characters may be specified.

Examples

Example 1: Ending All TCP/IP Servers

ENDTCPSVR   SERVER(*ALL)

This command ends all active TCP/IP application server jobs.

Example 2: Ending the LPD Servers

ENDTCPSVR   SERVER(*LPD)

This command ends the TCP/IP LPD application server jobs.

Example 3: Ending a Specific HTTP Server Instance

ENDTCPSVR   SERVER(*HTTP)  HTTPSVR(HTTP1)
ENDTCPSVR   SERVER(*HTTP)  INSTANCE(HTTP1)

These commands end the TCP/IP HTTP application server instance named HTTP1.

Example 4: Ending a Specific DNS Server Instance

ENDTCPSVR   SERVER(*DNS)  DNSSVR(DNS1)
ENDTCPSVR   SERVER(*DNS)  INSTANCE(DNS1)

These commands end the TCP/IP DNS application server instance named DNS1.

Example 5: All Directory Services Server Instances

ENDTCPSVR   SERVER(*DIRSRV) INSTANCE(*ALL)

This command ends all instances of the Directory Services server.

Error messages

*ESCAPE Messages

CPF3894
Cancel reply received for message &1.
TCP1A0A
&1 ended abnormally. Reason code is &2.
TCP1A11
&1 failed.
TCP1A77
&1 completed successfully; however errors occurred.