Troubleshooting for Amazon RDS for Db2 - Amazon Relational Database Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Troubleshooting for Amazon RDS for Db2

The following content can help you troubleshoot issues that you encounter with RDS for Db2.

For more information about general Amazon RDS troubleshooting issues, see Troubleshooting for Amazon RDS.

File I/O error

When you use the LOAD command, you might encounter a file I/O error. For example, you run the following LOAD command:

db2 "call sysproc.admin_cmd('load from "DB2REMOTE://s3test//public/datapump/t6.del" of del lobs from "DB2REMOTE://s3test/public/datapump/" modified by lobsinfile MESSAGES ON SERVER insert INTO RDSDB.t6 nonrecoverable ')"

The LOAD command returns the following message:

Result set 1 -------------- ROWS_READ ROWS_SKIPPED ROWS_LOADED ROWS_REJECTED ROWS_DELETED ROWS_COMMITTED ROWS_PARTITIONED NUM_AGENTINFO_ENTRIES MSG_RETRIEVAL MSG_REMOVAL -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- --------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - - - - - - - - SELECT SQLCODE, MSG FROM TABLE(SYSPROC.ADMIN_GET_MSGS('1594987316_285548770')) AS MSG CALL SYSPROC.ADMIN_REMOVE_MSGS('1594987316_285548770') 1 record(s) selected. Return Status = 0 SQL20397W Routine "SYSPROC.ADMIN_CMD" execution has completed, but at least one error, "SQL1652", was encountered during the execution. More information is available. SQLSTATE=01H52

To view the error message, you run the SQL command as suggested in the previous response. SELECT SQLCODE, MSG FROM TABLE(SYSPROC.ADMIN_GET_MSGS('1594987316_285548770')) AS MSG returns the following message:

SQLCODE MSG --------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SQL2025N An I/O error occurred. Error code “438”. Media on which this error occurred: “DB2REMOTE://s3test//public/datapump/t6.del” SQL3500W The utility is beginning the LOAD phase at time “07/05/2024 21:21:48.082954” SQL1652N File I/O error occurred

The Db2 diagnostic logs contain a log file similar to the following one:

2024-07-05-21.20.09.440609+000 I1191321E864 LEVEL: Error PID : 2710 TID : 139619509200640 PROC : db2sysc 0 INSTANCE: rdsdb NODE : 000 DB : NTP APPHDL : 0-12180 APPID: xxx.xx.x.xxx.xxxxx.xxxxxxxxxxxx UOWID : 5 ACTID: 1 AUTHID : ADMIN HOSTNAME: ip-xx-xx-x-xx EDUID : 147 EDUNAME: db2lmr 0 FUNCTION: DB2 UDB, oper system services, sqloS3Client_GetObjectInfo, probe:219 MESSAGE : ZRC=0x870F01B6=-2029059658=SQLO_FAILED "An unexpected error is encountered" DATA #1 : String, 29 bytes S3:HeadObject request failed. DATA #2 : signed integer, 4 bytes 99 DATA #3 : String, 0 bytes Object not dumped: Address: 0x00007EFC08A9AE38 Size: 0 Reason: Zero-length data DATA #4 : String, 33 bytes curlCode: 28, Timeout was reached

This file I/O error could result from a number of different scenarios. For example, your RDS for Db2 DB instance and your Amazon S3 bucket might not use the same VPC or be in the same Amazon Web Services Region. Regardless of the scenario, the solution is the same: You need to create a VPC gateway endpoint, and then add outbound rules to your security group.

Step 1: Create a VPC gateway endpoint for Amazon S3

When you first create an RDS for Db2 DB instance, Amazon RDS creates the DB instance with three private subnets, a security group, and no public access. The security group prevents any S3 traffic from leaving the private subnet.

To allow traffic between your RDS for Db2 DB instance and S3, you need to create a gateway endpoint that connects to S3. When you create the endpoint, be sure to select the route table that you want to associate with this endpoint.

Note

If you encounter an error when you are creating the VPC endpoint that states that the selected route table already has a route, do one of the following options:

Route table selected when creating VPC gateway endpoint.

For more information, see Create a gateway endpoint in the Amazon VPC User Guide.

Step 2: Add outbound rules to the security group

This step assumes that you created a gateway endpoint in Step 1: Create a VPC gateway endpoint for Amazon S3. In this step, you add outbound rules to a private subnet in the security group for your VPC. These outbound rules allow HTTP and HTTPS traffic.

For the Destination value, open the context (right-click) menu for Search, and under Prefix lists, choose the prefix of the gateway endpoint that you created. The format of the prefix is com.amazonaws.Amazon Web Services Region.s3, for example, com.amazonaws.us-west-2.s3.

Outbound rules for HTTP and HTTPS traffic to S3.

For more information, see Security group rules in the Amazon VPC User Guide.