Jobs do not inherit the environment variables of the user profile starting JobServer

Talend Version 6.4.1

Summary

When you start JobServer, the Job does not inherit the environment variables of your user profile.
Additional Versions  
Product Talend Data Integration
Component JobServer
Problem Description

After starting JobServer using the start_rs.sh script file, the output of the environment from a terminal matches with the output of the environment generated by the Job. This was also crosschecked with the /proc/PID/environ file used by JobServer.

Problem root cause Different sets of environment variables were noticed when JobServer was started using the systemd option.
Solution or Workaround

For the environment variables to work correctly when JobServer is started using systemctl, you have to use either an Environment or an EnvironmentFile directive.

 

Solution 1

[Unit]
Requires=coreos-metadata.service
After=coreos-metadata.service

[Service]
EnvironmentFile=/run/metadata/coreos

Solution 2

[Service]
# Client Env Vars
Environment=ETCD_CA_FILE=/path/to/CA.pem

 

More information, see Using environment variables in systemd units

 

JIRA ticket number  
Version history
Revision #:
3 of 3
Last update:
‎07-31-2018 01:29 PM
Updated by: