JS - JobScheduler
  1. JS - JobScheduler
  2. JS-1839

The ${java.io.tmpdir} directory should be configurable from ./bin/jobscheduler_agent_instance.sh script

    Details

    • Type: Feature Feature
    • Status: Dismissed (View Workflow)
    • Priority: Minor Minor
    • Resolution: Works as designed
    • Affects Version/s: 1.12.8
    • Fix Version/s: 1.12.9
    • Component/s: JS Universal Agent
    • Labels:
      None

      Description

      Current Situation

      • When two or more Agent instances are running on the same server then the Agents read the same ./lib/log4j.xml configuration. 
      • The log4j files has configuration ${java.io.tmpdir}/jade-client.log file, which creates the_ jade-client.log_ file at  ${java.io.tmpdir} directory.
      • As a result, multiple instances of YADE JITL job are writing to the same log file.
      • Also if a user wants to configure the log location or temp directory on a per Agent basis, it's not possible. According to KB article How do you change the directory JobScheduler uses for temporary files If a user tries to configure as JAVA_OPTIONS  JAVA_OPTIONS="-Djava.io.tmpdir=/tmp/agentA in ./bin/jobscheduler_agent_instance.sh  script, it does not have any effect, the Agent does not read this java.io.tmpdir parameter.

      Desired Behavior

      • The temp directory for should be configurable per agent basis in the  ./bin/jobscheduler_agent_instance.sh script.

      Maintainer Note

      • There are already all possibilities to assign Java options per Agent or per Job.
      • Settings can be made in the instance script ./bin/jobscheduler_agent_[port].sh for each Agent instance separately.
      • The environment variable JAVA_OPTIONS only determines the Java options of the Agent and not the Java options of the Jobs.
      • If you set JAVA_OPTIONS="-Djava.io.tmpdir=/path/to/myDir" then you will see that the Agent also uses this temporary directory, because e.g. temporary files are created there by the Agent.
      • Since JS-1751 the environment variable SCHEDULER_JOB_JAVA_OPTIONS was introduced in the Agent's instance script, with which the Java options of all jobs can be set which are processed by the Agent instance.
        • Here -Djava.io.tmpdir=/path/to/myDir has to be set to be considered by the logger of the JITL jobs such as YADE job.
        • You can also set Java options per Job with
          <job  process_class="myAgent" java_options="-Djava.io.tmpdir=/path/to/myDir">
              <params />
              <script  language="java:javascript">
                  <![CDATA[
          function spooler_process(){
                  spooler_log.info(java.lang.System.getProperty("java.io.tmpdir"));
          	return false;
          }
                  ]]>
              </script>
              <run_time />
          </job>
          

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Oliver Haufe
              Reporter:
              Mahendra Patidar
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: