Tuesday, August 5, 2014

[RUEI] Issue with ruei-upgrade-12.1.0.6.sh rpm_pre_install: -bash: line 2: /tmp/ruei-migrate: Permission denied

Situation:
I'm upgrading from my current 12.1.0.X RUEI installation to the version 12.1.0.6 due to a malfunction of the TCP Diagnostic tool.
 
I followed the steps on the "Oracle® Real User Experience Insight Installation Guide 12c Release 5 (12.1.0.6) for Linux x86-64". I reached the step 7 on the section "3.11.1 Upgrading the Reporter System from RUEI 12.1.0.x" and got the following error:
[root@gualaca extra]# ./ruei-upgrade-12.1.0.6.sh rpm_pre_install
____________________________________________________________

2014-08-04 14:29:22 rpm_pre_install ...
____________________________________________________________

2014-08-04 14:29:22 check_markers ...
2014-08-04 14:29:23 check_markers done
____________________________________________________________

2014-08-04 14:29:23 drop_mviews ...
2014-08-04 14:29:23 drop_mviews done
____________________________________________________________

2014-08-04 14:29:23 fix_custom_dims ...
2014-08-04 14:29:23 fix_custom_dims done
____________________________________________________________

2014-08-04 14:29:23 rename_fact_tables ...
2014-08-04 14:29:24 rename_fact_tables done
____________________________________________________________

2014-08-04 14:29:24 rename_table_prefix ...
2014-08-04 14:29:24 rename_table_prefix done
____________________________________________________________

2014-08-04 14:29:24 page_stats ...
2014-08-04 14:29:25 page_stats done
____________________________________________________________

2014-08-04 14:29:25 upgrade_report ...
2014-08-04 14:29:25 upgrade_report done
____________________________________________________________

2014-08-04 14:29:25 prepare_kpi_upgrade ...
-bash: line 2: /tmp/ruei-migrate: Permission denied
2014-08-04 14:29:25 prepare_kpi_upgrade ERROR
2014-08-04 14:29:25 rpm_pre_install ERROR

As it seems like a file permission error, I gave all the permissions (777) to the /tmp/ruei-migrate file to see if it was the problem but after I execute it I got the same permission error:
[root@gualaca tmp]# ls -ld ruei-migrate
-rwxrwxrwx 1 root root 1761546 Aug 4 14:51 ruei-migrate
[root@gualaca ~]# /tmp/ruei-migrate
-bash: /tmp/ruei-migrate: Permission denied
Then I created a script (in the /tmp directory) that echoes the string "Hello World" but when I execute it a permission error appears (like ruei-migrate script). So I pointed the problem to the /tmp filesystem. I review the /etc/fstab file and found that the /tmp filesystem does not have the exec option:
[root@gualaca ~]# cat /etc/fstab
/dev/VolGroup00/LogVol02 /tmp ext3 defaults,nodev,nosuid,noexec  1 2

Cause:
The filesystem for the /tmp directory does not have the exec mount option. This option permits the filesystem to execute its binaries.
 
Solution:
Remount the /tmp filesystem with the proper option and try again the RUEI upgrade script:
[root@gualaca ~]# mount -o remount,exec /tmp
[root@gualaca extra]# ./ruei-upgrade-12.1.0.6.sh rpm_pre_install
____________________________________________________________

2014-08-05 10:14:07   rpm_pre_install ...
____________________________________________________________

2014-08-05 10:14:07   check_markers ...
2014-08-05 10:14:08   check_markers done
____________________________________________________________

2014-08-05 10:14:08   drop_mviews ...
2014-08-05 10:14:08   drop_mviews done
____________________________________________________________

2014-08-05 10:14:08   fix_custom_dims ...
2014-08-05 10:14:09   fix_custom_dims done
____________________________________________________________

2014-08-05 10:14:09   rename_fact_tables ...
2014-08-05 10:14:09   rename_fact_tables done
____________________________________________________________

2014-08-05 10:14:09   rename_table_prefix ...
2014-08-05 10:14:10   rename_table_prefix done
____________________________________________________________

2014-08-05 10:14:10   page_stats ...
2014-08-05 10:14:10   page_stats done
____________________________________________________________

2014-08-05 10:14:10   upgrade_report ...
2014-08-05 10:14:11   upgrade_report done
____________________________________________________________

2014-08-05 10:14:11   prepare_kpi_upgrade ...
2014-08-05 10:14:12   prepare_kpi_upgrade done
2014-08-05 10:14:12   rpm_pre_install done