SQL30081N A communication error when running batch jobs against a DB2 database

Posted on 2006-05-24
Medium Priority
Last Modified: 2008-02-01
We are having a batch job called "C". This is basically a J2EE application client which runs third in our batch trail. The first two J2EE aplication client batch jobs, namely are "A" and "B". "A" starts at 3:30 AM followed by "B". Both these jobs run successfully in nearly less than 3 minutes after which our next job "C" kicks off. This is around 3:33 AM. Now, normally "C" takes less than 15 minutes to finish. This was running fine for past 1.5 yrs. But since past two months we are observing a strange behaviour. This job "C" keeps hanging for almost two hrs. and nothing is written to the logs. After about 2 hrs. it errors out around 5:33 AM and error message in the logs is as follows:

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "<IP Address>". Communication function detecting the error: "recv". Protocol specific error code(s): "73", "*", "0". SQLSTATE=08001

This is consuming more than 2 hrs time of the other jobs that are supposed to run after "C" and delaying those. So nowadays we monitor "C" for about an hour. If it does not run successfully, we cancel and rerun it. On a second attempt it is always successful!!!.

We have not been able to figure out that why it fails the first time. Any help/pointers will be appreciated. Thanks.
Question by:kulkaraj
  • 2
LVL 13

Accepted Solution

ghp7000 earned 672 total points
ID: 16757488
simple solution #1-start batch job C at later interval, say 3:50 and see if it resolves the problem.
simple solution #2-make sure that database is available for batch job C-for example, are you sure that there is no database backup being performed when batch job C tries to connect? are you sure that the network is available for batch job C to connect to the database? (perhaps network goes offline for maintenance, security sweep or other task, check with your network admin to make sure nothing is changing in the network at that time)
simple solution #3-what is the value of database manager parameter MAXAGENTS? According to the docvs, "0" in the error message MAY mean there are not enough agents available for the process to connect.
simple solution #4-check the db2diag.log for clues as to what is taking place

please specify the platform you are using

Assisted Solution

sachinwadhwa earned 664 total points
ID: 16760498
error 73 is for AIX:

The connection might have been closed by the remote gateway or server at the TCP/IP level (eg. firewall problem, power failure, network failure).


Client side connection pooling is enabled and is not handling connection failures. Code the application to retry a connection if a failure is received when connecting to the database and connection pooling is enabled.


post text from db2diag.log (from server & client both)

Expert Comment

ID: 16760511
one more thing, try following:

Add 'QUERYTIMEOUTINTERVAL=0' on client's side's db2cli.ini file

Assisted Solution

theonlyexpert earned 664 total points
ID: 16831669
well usually you get a comm error after one of the following

1. the instance is down
2. the db is unavailable (backup/restore/etc)
3. a force command had been issued earlier or the instance had been stopped and started
4. not enough agents for the server to take connections.

after job b completes you could try forcing all applications and then running c.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Loops Section Overview
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question