Java Proxy based web application deployed to WebSphere and targetting Gen Transaction Enabler server fails intermittently and the SystemOut.log contains "[Function: TCPIPConnection::readData]Connection unexpectantly closed by server"

book

Article ID: 5179

calendar_today

Updated On:

Products

CA Gen CA Gen - Build Tool CA Gen - Workstation Toolset CA Gen - Host Encyclopedia CA Gen - Run Time Distributed 3RD PARTY TSO

Issue/Introduction

Java Proxy based web application deployed to WebSphere targetting Gen Transaction Enabler server fails intermittently. The SystemOut.log contains message:

com.ca.gen85.csu.exception.CSUException: [Function: TCPIPConnection::readData]Connection unexpectantly closed by server

The problem can be worked around by either restarting the WebSphere JVM instance OR by restarting the Gen Transaction Enabler.

Cause

The message "Connection unexpectantly closed by server" is coming from the Gen user exit TCPIPDynamicCoopFlowExit.java which by default makes 2 attempts to establish the connection to the server. Sometimes this message can indicate that more attempts need to be configured in the exit. However in this case the Transaction Enabler aefuf (funnel) log file showed it was reaching its 245 client connection limit i.e.

... ==>MAX USER CONNECTIONS 245 EXCEEDED, REJECTING CLIENT 

... 

... ==>Error:fdAlloc:No fd slots available! 

... ==>aefuf: USER: UF fd=-1, rejected, MAX sockets

Therefore retry attempts would continue to be unsuccessful until restarting either the JVM instance or Transaction Enabler to clear all the client-server socket connections.

Environment

CA Gen 8.5, 8.6Distributed Processing application

Resolution

There are 2 options to resolve the problem

EITHER: 

1. Add more aefuf instances and control the routing of the java proxy client threads so that < 245 connect to each aefuf

OR: 

2. Set the "connection_persistence" flag to "N" in the deployed commcfg.properties file so once each transaction has completed the connection/socket will be released. 

Option #2 would probably be easiest to implement in a AppServer environment like WebSphere as long as any client thread initialisation at JVM start-up also does not exceed the 245 limit

Additional Information

Transaction Enabler Limitations

Distributed Processing > Working With Distributed Processing > Comm Config Files > commcfg.properties