<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: System.getenv() when run Job from TAC in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365797#M129366</link>
    <description>&lt;P&gt;- /etc/environment - for all users&lt;/P&gt;&lt;P&gt;- talenduser - /home/talenduser/.bashrc&lt;/P&gt;&lt;P&gt;this user from which Talend start&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;same user used for run ESB Runtime with only /etc/environment settings - and function work from OSGI jobs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S.&lt;/P&gt;&lt;P&gt;of course echo from Talenduser show correct variables, it was first what tested&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 11:23:25 GMT</pubDate>
    <dc:creator>vapukov</dc:creator>
    <dc:date>2018-06-05T11:23:25Z</dc:date>
    <item>
      <title>System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365793#M129362</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with community edition we are use&amp;nbsp;System.getenv() for retrieve OS variables, it work fine everywhere:&lt;/P&gt;&lt;P&gt;- windows, linux, macOS&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- from Studio&lt;/P&gt;&lt;P&gt;- from shell&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also same function work under Talend ESB Runtime as expected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but when Job implemented on TAC, this function stop work and return null (in Studio for subscription version - all fine)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;variables defined in:&lt;/P&gt;&lt;P&gt;/etc/environment (normally for Community and Runtime)&lt;/P&gt;&lt;P&gt;.bachrc (duplicated when try to resolve)&lt;/P&gt;&lt;P&gt;setenv.sh&amp;nbsp;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;duplicated&lt;/SPAN&gt;&lt;SPAN&gt; when try to resolve)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;server of course was restarted after any changes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;look like TAC start processes without passing environment, any recommendations how to fix this would be pretty appreciated !&lt;BR /&gt;&lt;BR /&gt;Thanks, Vlad&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365793#M129362</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2024-11-16T08:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365794#M129363</link>
      <description>&lt;P&gt;I suspect this is because your job servers are not located on your TAC machine and/or you do not have the system environment variables set up on all of your job servers. The jobs do not take any environment settings from the TAC since they do not run on the TAC (unless you have a job server on there as well). When you use a virtual job server (made up of several job servers) you will need to have these variables set up on ALL job servers or the jobs will only work intermittently.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 10:40:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365794#M129363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T10:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365795#M129364</link>
      <description>&lt;P&gt;it is single server installation - all on same server &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; only SVN on remote&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 11:05:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365795#M129364</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-05T11:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365796#M129365</link>
      <description>&lt;P&gt;Then this is likely to do with permissions and OS environment variable settings. Which user is running your services (Talend Job Services, etc) and are the environment variables configured for them? What you are trying to do certainly works. I use this all of the time. However it can get frustrating trying to track down what is wrong sometimes. Can you echo the variables from the command line on the machine using the user which runs the Job server service. That is the first thing to try.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 11:19:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365796#M129365</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T11:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365797#M129366</link>
      <description>&lt;P&gt;- /etc/environment - for all users&lt;/P&gt;&lt;P&gt;- talenduser - /home/talenduser/.bashrc&lt;/P&gt;&lt;P&gt;this user from which Talend start&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;same user used for run ESB Runtime with only /etc/environment settings - and function work from OSGI jobs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S.&lt;/P&gt;&lt;P&gt;of course echo from Talenduser show correct variables, it was first what tested&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 11:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365797#M129366</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-05T11:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365798#M129367</link>
      <description>&lt;P&gt;This is strange.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;look like TAC start processes without passing environment, any recommendations how to fix this would be pretty appreciated !" -&amp;nbsp; This is not the case as environment variables are never passed to a Talend job. Using the code you have demonstrated shows you are requesting them from within an already started job. This is an issue with the Java and/or (more likely) your server config. TAC has absolutely no effect on this. It literally just passes the executable to the appropriate jobserver and starts the job. That is all. I suspect your Jobserver service is not running under the user you suspect it is. You can test this by creating a job&amp;nbsp;which&amp;nbsp;uses a tSystem control to try your echo statements.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 13:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365798#M129367</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T13:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365799#M129368</link>
      <description>&lt;P&gt;for me, environment variables are load on logon.&lt;/P&gt;&lt;P&gt;TAC is used to Schedule background tasks on multiples runtime servers. you did not need to be logged to run task on Talend runtime environment. Local service have to run but independent sub processes did not need any environment variables.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 13:37:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365799#M129368</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-06-05T13:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365800#M129369</link>
      <description>With tac the best way is to use context variables.</description>
      <pubDate>Tue, 05 Jun 2018 13:40:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365800#M129369</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-06-05T13:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365801#M129370</link>
      <description>&lt;P&gt;I use (and have done for a few years, across versions from 5 forward) a procedure where my implicit context load (for DI jobs) retrieves context variables from a database. So that there is absolutely no difference required from first DEV compilation, through QA to PROD, I configure each of my environments with context database credentials using system variables. This means I can configure each of my environments on creation and do not have to touch my jobs again no matter which environment they run on. I only use the Default context because having multiple contexts will end up with issues no matter how thorough you think you....especially if there is a team of developers. I do this with my ESB work as well, but use PropertyPlaceholder to receive my "context"" variables so that I have exactly the same values across the board. I also add another layer of complexity in many environments as many of my customers do not like human readable values to be stored even in environment settings. For this I use JASYPT. I do not experience this issue unless service users are incorrect OR there is a new Job Server that has not been configured. I have used this on Windows and Unix and apart from the configuration of the servers, the implementation is exactly the same.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I use this routine code in my Implicit Context settings (they can run code as well as accept hardcoded values) and within my jobs sometimes....although I tend to load everything from the Implicit Context if it is suitable.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;    /**
     * getEnvironmentVariable: used to retrieve Environment Variables
     * 
     * {talendTypes} String
     * 
     * {Category} Implicit Context Load
     * 
     * {param} string("TalendContextPassword") variableName: the parameter name to be returned

     * 
     * {example} getEnvironmentVariable("TalendContextPassword") # returns "My Password"
     */
	public static String getEnvironmentVariable(String variableName) {
		String returnVal = System.getenv(variableName);

		if (returnVal == null) {
			System.out.println(variableName
					+ " does not exist or holds no value");
		}

		return returnVal;
	}&lt;/PRE&gt; 
&lt;P&gt;This works for running on my DEV Studio (my machine is configured with environment variables on Windows), running jobs from the command line (Windows or Linux) and running by starting on TAC. To add even more of a potential for problems to this mix, I automatically load tasks into the TAC using my ESB runtime (when a file is dropped in a folder and the required job is not yet live) by using the MetaServlet API to find the required job in my Nexus and load to the TAC. No contexts are set up in the TAC because this process renders doing that unnecessary. It also enables me to have new jobs that supersede already existing jobs to be used as soon as they are logged in my background database as being the "live" job.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This all works without fault and n my current project I have had no problems with this across 3 environments for the last 6 months. As I said, there is nothing in Talend stopping this from working. It is an implementation problem.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 14:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365801#M129370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T14:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365802#M129371</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;This is strange.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;SPAN&gt;TAC has absolutely no effect on this. It literally just passes the executable to the appropriate jobserver and starts the job. That is all. I suspect your Jobserver service is not running under the user you suspect it is. You can test this by creating a job&amp;nbsp;which&amp;nbsp;uses a tSystem control to try your echo statements.&lt;/SPAN&gt;&lt;/P&gt; 
 &lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;thank You, sometime brain storm help &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; (not in this case :-))) )&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;just for close all ideas about users&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;file /etc/environment - affected for all users&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/13046624/how-to-permanently-export-a-variable-in-linux" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/13046624/how-to-permanently-export-a-variable-in-linux&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 21:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365802#M129371</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-05T21:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365803#M129372</link>
      <description>&lt;P&gt;we use of course&lt;/P&gt; 
&lt;P&gt;but question about - how to read OS variables &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 21:35:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365803#M129372</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-05T21:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365804#M129373</link>
      <description>&lt;P&gt;Does your job work on the TAC if you manually run it via the command line on that machine? For example, compile on Studio and take the zip, explode it and run it using the script file provided. Is that able to retrieve the system environment variables?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 21:45:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365804#M129373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T21:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365805#M129374</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;I use this routine code in my Implicit Context settings (they can run code as well as accept hardcoded values) and within my jobs sometimes....although I tend to load everything from the Implicit Context if it is suitable.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;PRE&gt;    /**
     * getEnvironmentVariable: used to retrieve Environment Variables
     * 
     * {talendTypes} String
     * 
     * {Category} Implicit Context Load
     * 
     * {param} string("TalendContextPassword") variableName: the parameter name to be returned

     * 
     * {example} getEnvironmentVariable("TalendContextPassword") # returns "My Password"
     */
	public static String getEnvironmentVariable(String variableName) {
		String returnVal = System.getenv(variableName);

		if (returnVal == null) {
			System.out.println(variableName
					+ " does not exist or holds no value");
		}

		return returnVal;
	}&lt;/PRE&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;This all works without fault and n my current project I have had no problems with this across 3 environments for the last 6 months. As I said, there is nothing in Talend stopping this from working. It is an implementation problem.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;I use similar construction (little different, but still - it work last 2.5 year) ... until this case&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Tell me please - what implementation problem it could be? &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; what could restrict read settings available for 100% users on this server?&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-06 at 08.45.54.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Ly9j.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152490iC0C83193CB05AE22/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Ly9j.png" alt="0683p000009Ly9j.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-06 at 08.18.43.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyXP.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154452i5ED95D63D278E12F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyXP.png" alt="0683p000009LyXP.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 21:47:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365805#M129374</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-05T21:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365806#M129375</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;Does your job work on the TAC if you manually run it via the command line on that machine? For example, compile on Studio and take the zip, explode it and run it using the script file provided. Is that able to retrieve the system environment variables?&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;thank You, will test and this also&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 21:49:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365806#M129375</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-05T21:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365807#M129376</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;Does your job work on the TAC if you manually run it via the command line on that machine? For example, compile on Studio and take the zip, explode it and run it using the script file provided. Is that able to retrieve the system environment variables?&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-06 at 09.00.01.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyHr.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145740i6F90ED7A341B756B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyHr.png" alt="0683p000009LyHr.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;all work from ssh - as it must &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;and not correct from TAC:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-06 at 09.04.00.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyRS.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131953i28BC58CBE6F803BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyRS.png" alt="0683p000009LyRS.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;and again correct from karaf:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-06 at 09.05.31.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyXZ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157287i600BBD93D3DFE5A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyXZ.png" alt="0683p000009LyXZ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 22:01:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365807#M129376</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-05T22:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365808#M129377</link>
      <description>&lt;P&gt;Did you say that your TAC, Job Server and Runtime are all running on the same server?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, where is it getting the context_filepath from? That is the same in all 3 tests.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 22:18:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365808#M129377</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T22:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365809#M129378</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;Did you say that your TAC, Job Server and Runtime are all running on the same server?&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;Also, where is it getting the context_filepath from? That is the same in all 3 tests.&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;yes - all 3 on same server&lt;/P&gt; 
&lt;P&gt;yes and no - this is different case &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; (and as You can see - on TAC - variable is NULL, not the same)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;on each server and/or machine defined 2 variables:&lt;/P&gt; 
&lt;P&gt;- talend_env - dev/prod/local&lt;/P&gt; 
&lt;P&gt;- talend_context_path - base folder for talenduser config files, it could be not only context file, it could be templates for emails, some other files and etc&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if variables defined, we have combined name for current config file:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;/opt/talenduser/config/context_prod.csv&lt;/LI&gt; 
 &lt;LI&gt;/opt/talenduser/config/context_local.csv&lt;/LI&gt; 
 &lt;LI&gt;/opt/talenduser/config/context_dev.csv&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;if variables - not defined (or not accessible) - default context file:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;/opt/talenduser/config/context_dev.csv&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 22:22:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365809#M129378</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-05T22:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365810#M129379</link>
      <description>&lt;P&gt;Can you add a call to retrieve the&amp;nbsp;PATH variable in your job? This should exist for all your users. My suspicion is that this will be returned. If that is the case it suggests that the user running the job (or the Job server) does not have access to those variables. Sorry to go back to this, but that can be the only reason for this. The Java that works in the ESB is exactly the same (I assume) as the Java that is running in the job in the job server and on the Studio. All the Job Server does is start the job. The job runs in its own JVM as essentially a standalone application. The only thing that can possibly cause this is a permissions/user issue. It is incredibly easy to have different users running Talend services, particularly on Linux.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 22:42:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365810#M129379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T22:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365811#M129380</link>
      <description>&lt;P&gt;PATH is work&lt;/P&gt; 
&lt;P&gt;and much more interesting - 
 &lt;STRIKE&gt;
   it work definitely from /etc/environment: 
 &lt;/STRIKE&gt; (edited) ... it strange&lt;/P&gt; 
&lt;PRE&gt;&lt;STRONG&gt;root@talend-prod-02:/opt/test/testEnvVariables# echo $PATH&lt;/STRONG&gt;
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/TalendTools-6.4.1/mongodb/bin
root@talend-prod-02:/opt/test/testEnvVariables# su talenduser
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;talenduser@talend-prod-02:/opt/test/testEnvVariables$ echo $PATH&lt;/STRONG&gt;&lt;/FONT&gt;
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;talenduser@talend-prod-02:/opt/test/testEnvVariables$ cat /etc/environment&lt;/STRONG&gt;&lt;/FONT&gt;
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
talend_env="prod"
talend_context_path="/opt/talenduser/config/"&lt;/PRE&gt; 
&lt;P&gt;so, 
 &lt;STRIKE&gt;
   it read /etc/environment 
 &lt;/STRIKE&gt; ...&amp;nbsp;it take it from ...&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-06 at 10.32.40.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyOE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137252iF4BDDFA420B51A5C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyOE.png" alt="0683p000009LyOE.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;PATH from /etc/environment:&lt;BR /&gt;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games&lt;BR /&gt;PATH under talenduser shell:&lt;/PRE&gt; 
&lt;PRE&gt;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games&lt;BR /&gt;PATH from TAC&lt;BR /&gt;/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games|&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jun 2018 23:33:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365811#M129380</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-05T23:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: System.getenv() when run Job from TAC</title>
      <link>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365812#M129381</link>
      <description>&lt;P&gt;AND TAC - do not show HOME &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;----------+---=|
|talend_env|talend_context_path|context_filepath                      |system_path                                             |home|
|=---------+-------------------+--------------------------------------+--------------------------------------------------------+---=|
|null      |null               |/opt/talenduser/config/context_dev.csv|/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games|null|&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;it must be:&lt;/P&gt; 
&lt;PRE&gt;|talend_env|talend_context_path    |context_filepath                        |system_path                  |home           |
|=---------+-----------------------+----------------------------------------+-----------------------------+--------------=|
|local     |/opt/talenduser/config/|/opt/talenduser/config/context_local.csv|/usr/bin:/bin:/usr/sbin:/sbin|/Users/vladimir|
'----------+-----------------------+----------------------------------------+-----------------------------+---------------'&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;(samples for local)&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Warning: Parameter "dwh_export_path" is a new parameter of Implicit_Context_Context
.----------+-----------------------+---------------------------------------+----------------------------------------------------------------------------------------+----------------.
|                                                                                     tLogRow_1                                                                                      |
|=---------+-----------------------+---------------------------------------+----------------------------------------------------------------------------------------+---------------=|
|talend_env|talend_context_path    |context_filepath                       |system_path                                                                             |home            |
|=---------+-----------------------+---------------------------------------+----------------------------------------------------------------------------------------+---------------=|
|prod      |/opt/talenduser/config/|/opt/talenduser/config/context_prod.csv|/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games|/home/talenduser|
'----------+-----------------------+---------------------------------------+----------------------------------------------------------------------------------------+----------------'&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jun 2018 00:06:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/System-getenv-when-run-Job-from-TAC/m-p/2365812#M129381</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-06T00:06:26Z</dc:date>
    </item>
  </channel>
</rss>

