Troubleshooting: Talend products installation on RedHat/CentOS 8 fails - 7.0

author
EnrichVersion
7.0
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Installation and Upgrade
EnrichPlatform
Talend Studio

Troubleshooting: Talend products installation on RedHat/CentOS 8 fails

Before you begin

Follow this troubleshooting article if the installation of Talend products fails under this specific configuration:
  • You use RedHat 8 or CentOS 8.
  • SELinux subsystem is active (this is the default behavior).
  • You are installing Talend products on a second hard-drive or in a non-standard directory (/srv for example).

During the installation of the product, this error message appears:
Error: There had been an error. 
Error running /bin/systemctl start talend-tac-7.3.1 : 
Job talend-tac-7.3.1.service failed because the control process exited with error code.

When you execute the command journalctl -xe | grep talend-<product>-<version>.service (in this example: journalctl -xe | grep talend-tac-7.3.1.service), this is the result:
systemd : talend-tac-7.3.1.service: Failed to execute command: Permission denied
systemd : talend-tac-7.3.1.service: Failed at step EXEC spawning /mnt/opt/Talend-7.3.1/utils/srv_tac: Permission denied

Procedure

  1. Check the file labels in the installation folder. Make sure usr_t is used. With SELinux, SystemD can only run scripts from files labeled usr_t.
    In the following example, the /opt directory is compared to the /mnt/opt directory.
    [root@centos8 ~]# ls -dZ /mnt/opt
    system_u:object_r:mnt_t:s0 /mnt/opt
    [root@centos8 ~]# ls -dZ /opt
    system_u:object_r:usr_t:s0 /opt
  2. If usr_t is not used, change the labels.
    [root@centos8 ~]# semanage fcontext -a -t usr_t "/mnt/opt(/.*)?"
    [root@centos8 ~]# restorecon -R -v /mnt/opt
    Relabeled /mnt/opt from system_u:object_r:mnt_t:s0 to system_u:object_r:usr_t:s0
    Relabeled /mnt/opt/test.sh from unconfined_u:object_r:mnt_t:s0 to unconfined_u:object_r:usr_t:s0

Results

You can now resume the installation. For more information, see RedHat documentation.