You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "icefery (via GitHub)" <gi...@apache.org> on 2023/12/10 16:19:51 UTC

Re: [I] [Bug] [upgrade] upgrade 3.2.0 ,dataX Bug [dolphinscheduler]

icefery commented on issue #15065:
URL: https://github.com/apache/dolphinscheduler/issues/15065#issuecomment-1849009800

   > export DATAX_LAUNCHER and PYTHON_LAUNCHER in /etc/profile in linux. after that, execute datax task, it works. but i think it should 'source dolphinscheduler_env.sh' in datax script file. export DATAX_LAUNCHER and PYTHON_LAUNCHER in dolphinscheduler_env.sh。
   
   According to the log, datax task uses `sudo -u root -i <SH_FILE>` to execute, and `<SH_FILE>` can not get default envinonment variables.
   
   I found creating an `Environment` and using it while creating `Datax Task` could also work well, this might be more helpful in container environment than `/etc/profile`.
   
   ```shell
   export JAVA_HOME=/opt/java/openjdk
   export PYTHON_LAUNCHER=/opt/soft/python/bin/python
   export DATAX_LAUNCHER=/opt/soft/datax/bin/datax.py
   export PATH=$JAVA_HOME/bin:$PATH
   ```
   
   https://github.com/apache/dolphinscheduler/blob/e648d6d2adede44c11711c313b5f27d4474961c5/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java#L137


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org