-
Notifications
You must be signed in to change notification settings - Fork 5k
[BUG] Permission denied if not found dolphinscheder-env.sh #3125
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
when worker server execute the task , if not found dolphinscheder-env.sh, will get System.getProperty("user.home") + File.separator + ".bash_profile" , and it will lead to Permission denied error, something like [INFO] 2020-07-04 12:43:12.640 - [taskAppId=TASK-3-58-65]:[121] - -> /tmp/dolphinscheduler/exec/process/1/3/58/65/3_58_65.command: line 4: /Users/stone/.bash_profile: Permission denied
the related code in CommonUtils.java
public static String getSystemEnvPath() {
String envPath = PropertyUtils.getString(Constants.DOLPHINSCHEDULER_ENV_PATH);
if (StringUtils.isEmpty(envPath)) {
URL envDefaultPath = CommonUtils.class.getClassLoader().getResource(Constants.ENV_PATH);
if (envDefaultPath != null){
envPath = envDefaultPath.getPath();
logger.debug("env path :{}", envPath);
}else{
envPath = System.getProperty("user.home") + File.separator + ".bash_profile";
}
}
return envPath;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working