Unable to insert data to hive table

Issue

0: jdbc:hive2://node01.example.com> insert into test values(1);
INFO  : Compiling command(queryId=hive_20220715162834_0a6fd7f1-050a-4962-9d3b-80b59429adaf): insert into test values(1)
INFO  : Semantic Analysis Completed (retrial = false)
INFO  : Created Hive schema: Schema(fieldSchemas:[FieldSchema(name:col1, type:int, comment:null)], properties:null)
INFO  : Completed compiling command(queryId=hive_20220715162834_0a6fd7f1-050a-4962-9d3b-80b59429adaf); Time taken: 2.053 seconds
INFO  : Executing command(queryId=hive_20220715162834_0a6fd7f1-050a-4962-9d3b-80b59429adaf): insert into test values(1)
INFO  : Query ID = hive_20220715162834_0a6fd7f1-050a-4962-9d3b-80b59429adaf
INFO  : Total jobs = 1
INFO  : Launching Job 1 out of 1
INFO  : Starting task [Stage-1:MAPRED] in serial mode
INFO  : Subscribed to counters: [] for queryId: hive_20220715162834_0a6fd7f1-050a-4962-9d3b-80b59429adaf
INFO  : Session is already open
INFO  : Dag name: insert into test values(1) (Stage-1)
ERROR : FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.tez.TezTask. /tmp/snappy-1.0.4.1-4d6876cd-e02c-4a93-947e-0c5020626092-libsnappyjava.so: /tmp/snappy-1.0.4.1-4d6876cd-e02c-4a93-947e-0c5020626092-libsnappyjava.so: failed to map segment from shared object: Operation not permitted
INFO  : Completed executing command(queryId=hive_20220715162834_0a6fd7f1-050a-4962-9d3b-80b59429adaf); Time taken: 0.27 seconds
INFO  : OK
Error: Error while compiling statement: FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.tez.TezTask. /tmp/snappy-1.0.4.1-4d6876cd-e02c-4a93-947e-0c5020626092-libsnappyjava.so: /tmp/snappy-1.0.4.1-4d6876cd-e02c-4a93-947e-0c5020626092-libsnappyjava.so: failed to map segment from shared object: Operation not permitted (state=08S01,code=-101)
Error: Error while compiling statement: FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Could not initialize class org.xerial.snappy.Snappy (state=08S01,code=-101)

Caused

This is because /tmp is mounted with noexec options:

# mount | grep /tmp
/dev/mapper/rhel-tmp on /tmp type ext4 (rw,nosuid,nodev,noexec,relatime,data=ordered)

Resolution

Remount with exec options:

# mount /tmp -o remount,exec

also edit on /etc/fstab for permanent upon restart.

Apply on all nodes then restart all services.

References