KBA1738 During DB2 Ingestion Failure Occurs: Failed to Map Segment From Shared Object: Operation Not Permitted
Applicable Delphix Versions
Major Release |
All Sub Releases |
5.2 | 5.2.2.0, 5.2.2.1, 5.2.3.0 |
Issue
During a DB2 dSource link, on a Linux (RHEL) environment, at the beginning of the restore phase (ingestion) the link fails with this error:
restore db TEST from "/tmp/delphix/test/db/TEST.0.db2instance.DBPART000.20180606160330.001" on /db2_toolkit_directory/DB2/mnts/db2instance/TEST into TEST logtarget /db2_toolkit_directory/DB2/mnts/db2instance/TEST/db2instance/TEST/logs newlogpath /db2_toolkit_directory/DB2/mnts/db2instance/TEST/db2instance/TEST/logs replace existing redirect generate script /db2_toolkit_directory/DB2/logs/db2instance/TEST.rstr without prompting SQL2071N An error occurred while accessing the shared library "/db2_toolkit_directory/DB2/mnts/db2instance/TEST/db2instance/NODE". Reason code: "".
Troubleshooting
In looking further, retrieving the db2diag.log from /db2_instance_home/sqllib/db2dump, the error has more detail (names in the log snippet changed to protect the innocent):
2018-06-07-13.02.00.791147-240 E500377E973 LEVEL: Error (OS) PID : 11462 TID : 46922287015680 PROC : db2sysc 0 INSTANCE: db2instance NODE : 000 DB : TEST APPHDL : 0-29745 APPID: *LOCAL.nytit417.180607170202 AUTHID : userDB2 HOSTNAME: db2_environment.hostname.com EDUID : 3440 EDUNAME: db2bm.2546.0 (TEST) 0 FUNCTION: DB2 UDB, oper system services, sqloLoadModule, probe:190 CALLED : OS, -, dlopen OSERR: ENOENT (2) DATA #1 : Library name or path, 113 bytes /db2_toolkit_directory/DB2/mnts/db2instance/TEST/db2instance/NODE0000/SQL00001/MEMBER0000/3440/libdb2compr.so DATA #2 : shared library load flags, PD_TYPE_LOAD_FLAGS, 4 bytes 0 DATA #3 : String, 180 bytes /db2_toolkit_directory/DB2/mnts/db2instance/TEST/db2instance/NODE0000/SQL00001/MEMBER0000/3440/libdb2compr.so: failed to map segment from shared object: Operation not permitted <cut> 2018-06-07-13.02.00.791637-240 E502549E1070 LEVEL: Severe PID : 11462 TID : 46922287015680 PROC : db2sysc 0 INSTANCE: db2instance NODE : 000 DB : TEST APPHDL : 0-29745 APPID: *LOCAL.nytit417.180607170202 AUTHID : userDB2 HOSTNAME: ivdb3278.one-nyp.ms.com EDUID : 3440 EDUNAME: db2bm.2546.0 (DBATEST) 0 FUNCTION: DB2 UDB, database utilities, sqluBMLoadComprLibrary, probe:1511 MESSAGE : SQL2071N An error occurred while accessing the shared library "". Reason code: "". DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes sqlcaid : SQLCA sqlcabc: 136 sqlcode: -2071 sqlerrml: 69 sqlerrmc: /db2_toolkit_directory/DB2/mnts/db2instance/TEST/db2instance/NODE sqlerrp : sqluBMLo sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000 (4) 0x00000000 (5) 0x00000000 (6) 0x00000000 sqlwarn : (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) sqlstate:
Resolution
This is an environmental issue. The problem is caused by an inability to execute the compression library for the compressed db2 backup (we recommend to compress the backups for performance reasons). IBM DB2 makes this copy of the library to load locally, and execution fails.
One reason, if you find the permissions are sufficient for the user to perform the restore is that the NFS attributes included the attribute: -noexec
This effectively prevents the utilization of the library
In this case you need to keep this attribute off any of the mounts used by the Delphix filesystem
Check external links for information on how Linux operating system can configure attributes for NFS
Additional Information