Network firewalls might prematurely terminate long-running tasks or queries submitted from SAS® Enterprise Guide®


When SAS Enterprise Guide submits a long-running task or query to execute against a SAS workspace server, the network's firewall might prematurely close the polling client connection.

SAS Enterprise Guide always has two connections open across two ports (8561, the metadata-server port, and 8591, the workspace-server port). When a job runs for a long time, the connection across the workspace-server port remains active while SAS Enterprise Guide and the SAS® Metadata Server communicate. However, the metadata-server port sits idle while the job runs, and it is severed if a Transmission Control Protocol (TCP) time-out is set to disconnect idle connections.

After the client connection is closed by the firewall, an error that is similar to the following might appear in the client session:

An error occurred executing the workspace job "job_name". The server is disconnected.

With SAS Enterprise Guide logging enabled, the firewall closure against the network connection generates the following types of error messages inside the client log file:

ERROR SAS.Shared.Exceptions.ServerExceptionHelper [(null)] - MapException() - Mapping error for:
System.Runtime.InteropServices.COMException (0x80010108): The object invoked has disconnected from its clients.
(Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))
ERROR SAS.Shared.Exceptions.ServerExceptionHelper [(null)] - MapException() - Mapping error for:
System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable.
(Exception from HRESULT: 0x800706BA)

Neither the SAS Metadata Server nor the SAS Enterprise Guide client can initiate a disconnection without user intervention. However, several conditions can cause such a disconnect, including the following:

Why Other Networked Applications Do Not Experience Similar Disconnections

Other applications (for example, email clients) do not rely on a constant stream of communication with their server counterparts. Consequently, these applications can re-establish connections to their servers as needed. SAS Enterprise Guide, on the other hand, cannot re-establish a new connection to the SAS Metadata Server. To maintain the user's session, SAS Enterprise Guide must maintain a connection to the metadata server. If that connection is lost, the SAS Enterprise Guide session is disconnected, and the error is generated.

SAS logs do not provide any insight as to the cause of these disconnections because the SAS® System does not initiate the disconnection. When an external force (for example, a firewall) acts to sever a connection, the SAS log can show only that the connection was lost. Because SAS is not aware that a disconnection is about to occur, neither SAS Enterprise Guide nor other SAS components can prevent the disconnection.

Workaround

For releases earlier than SAS® 9.4, the network administrator can set the TCP/IP KEEPALIVE time-out interval to a value just below the firewall's time-out limit. The setting is changed within the company TCP/IP network.

SAS 9.4 and later provide the new feature that enables the SAS administrator to set an object server parameter on the workspace server to ensure that firewalls do not disconnect inactive connected clients. The KEEPALIVE parameter sends an event packet to inactive clients on a regular interval (in seconds) to prevent disconnection by network firewalls.

Using SAS® 9.4 Management Console, introduce the KEEPALIVE=interval parameter into the Object Server Parameters field. The Object Server Parameters field is located within the properties of the SASApp Workspace Server. Here is an example: keepalive=240

Explanation: This setting sends an event packet at an interval of every 240 seconds (4 minutes) to prevent the network firewall from being disconnected.

After the KEEPALIVE=interval parameter has been coded in the Object Server Parameters field of the SASApp Workspace Server, the SAS administrator should refresh or restart the SAS Object Spawner.

For more details about this setting, see OBJECTSERVERPARMS System Option in the SAS® 9.4 Intelligence Platform Administration documentation.