dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[QUESTION] Python scripts use error reporting python脚本使用报错

Open xiaot502 opened this issue 6 years ago • 5 comments

*For better global communication, please give priority to using English description, thx! *

Describe the question Because the shell only supports execution on the work machine, but in real life, the scheduler is a separate server, and the scripts are elsewhere Server execution.So here I'm using python's paramiko package to log into a server remotely to execute the shell command.but The error of environment variable appears as follows: [taskAppId= task-1-92-103]:[106] -- > sudo: /opt/soft/python: command not found I checked the dolphinscheduler_env.sh file and changed it to my python installation path. What else do I need to do For my configuration to take effect, the python execution command was found correctly. Common. The properties files about dolphinscheduler. Env. The path of the path attribute is correct, the corresponding file is also for export PYTHON_HOME = / opt/miniconda3 specific reference to capture

由于shell只是支持在work机器上执行,但是在实际工作中,调度器是一个单独的服务器,脚本在其他的 服务器执行。所以我这里采用python的paramiko包 远程登录某个服务器来执行shell命令。但是 出现了环境变量报错如下: [taskAppId=TASK-1-92-103]:[106] - -> sudo: /opt/soft/python: command not found 我检查了dolphinscheduler_env.sh 文件已经更改成我的python安装路径,那么还需要配置哪里 使我的配置生效,python执行命令被正确找到 common.properties文件关于dolphinscheduler.env.path 属性的路径是正确的,对应的文件也是争取的export PYTHON_HOME=/opt/miniconda3 具体参照截图 -[1.2.1-preview] image image

QQ图片20200507174345

Additional context I think a server might have multiple python versions installed, such as yum having to rely on python2.7, and then I installed a 3.7 Version, so can you make the execution path of python a configuration?Such as my address in/opt/miniconda3 / bin/python3.7 is an absolute address, then access to execute python scripts.

我认为一个服务器可能装了多个python版本,比如yum必须依赖python2.7,然后我安装了一个3.7 版本,所以能不能把python的执行路径做成一个配置?比如我的地址在/opt/miniconda3/bin/python3.7 是一个绝对执行地址,然后接入要执行的python脚本。

**Requirement or improvement

  • Please describe about your requirements or improvement suggestions.

xiaot502 avatar May 07 '20 08:05 xiaot502

Hi.You can take a look at this first this issue #2548

samz406 avatar May 07 '20 09:05 samz406

嗨。您可以先看一下本期#2548 I went to install after unzipping the package to modify the dolphinscheduler_env.sh file and then reinstalling it using install.sh All stop under the directory and start all over again. Sh is still an error, at will I this is not the teacher you mentioned the boot path is wrong .I stress path in the home directory, install path in 3 server "/ opt/dolphinscheduler1.2.1"


我在解压包修改了dolphinscheduler_env.sh文件,然后使用install.sh 重新安装一遍之后,到安装 目录下全部停止再重新start-all.sh 依然是报错,随意我这个不是老师你所提到的启动路径不对 造成的。我的解压路径在home目录,安装路径在3台服务器的"/opt/dolphinscheduler1.2.1"

xiaot502 avatar May 07 '20 09:05 xiaot502

Whether your problem has been resolved?

xingchun-chen avatar Nov 05 '20 08:11 xingchun-chen

+1

cmhello88 avatar Mar 11 '21 07:03 cmhello88

Close the question since it has been replied

chengshiwen avatar Apr 10 '21 11:04 chengshiwen