Jrebel-i opened a new issue, #14935:
URL: https://github.com/apache/dolphinscheduler/issues/14935

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   使用SSSD从LDAP同步用户至worker节点,Dolphinscheduler API Server开启LDAP认证,
   从LDAP同步到的用户,并不会出现在/etc/passwd文件中,导致判断用户不存在并创建对应用户,但是创建用户会失败
   然后使用用户进行作业提交,报错:
   [INFO] 2023-09-18 05:33:26.635 +0000 
org.apache.dolphinscheduler.common.utils.OSUtils:[341] - 
[WorkflowInstance-47][TaskInstance-49] - create linux os user: zhangsan
   [INFO] 2023-09-18 05:33:26.635 +0000 
org.apache.dolphinscheduler.common.utils.OSUtils:[343] - 
[WorkflowInstance-47][TaskInstance-49] - execute cmd: sudo useradd -g 
dolphinscheduler
    zhangsan
   [ERROR] 2023-09-18 05:33:26.653 +0000 
org.apache.dolphinscheduler.common.utils.OSUtils:[327] - 
[WorkflowInstance-47][TaskInstance-49] - useradd: user 'zhangsan' already exists
   
   org.apache.dolphinscheduler.common.shell.AbstractShell$ExitCodeException: 
useradd: user 'zhangsan' already exists
   
        at 
org.apache.dolphinscheduler.common.shell.AbstractShell.runCommand(AbstractShell.java:207)
        at 
org.apache.dolphinscheduler.common.shell.AbstractShell.run(AbstractShell.java:122)
        at 
org.apache.dolphinscheduler.common.shell.ShellExecutor.execute(ShellExecutor.java:126)
        at 
org.apache.dolphinscheduler.common.shell.ShellExecutor.execCommand(ShellExecutor.java:103)
        at 
org.apache.dolphinscheduler.common.shell.ShellExecutor.execCommand(ShellExecutor.java:86)
        at 
org.apache.dolphinscheduler.common.utils.OSUtils.exeShell(OSUtils.java:455)
        at 
org.apache.dolphinscheduler.common.utils.OSUtils.exeCmd(OSUtils.java:444)
        at 
org.apache.dolphinscheduler.common.utils.OSUtils.createLinuxUser(OSUtils.java:344)
        at 
org.apache.dolphinscheduler.common.utils.OSUtils.createUser(OSUtils.java:323)
        at 
org.apache.dolphinscheduler.common.utils.OSUtils.createUserIfAbsent(OSUtils.java:299)
        at 
org.apache.dolphinscheduler.server.worker.utils.TaskExecutionCheckerUtils.checkTenantExist(TaskExecutionCheckerUtils.java:63)
        at 
org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecuteRunnable.beforeExecute(WorkerTaskExecuteRunnable.java:210)
        at 
org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecuteRunnable.run(WorkerTaskExecuteRunnable.java:170)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at 
com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
        at 
com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
        at 
com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
   [INFO] 2023-09-18 05:33:26.653 +0000 
org.apache.dolphinscheduler.common.utils.OSUtils:[300] - 
[WorkflowInstance-47][TaskInstance-49] - create user zhangsan fail
   [ERROR] 2023-09-18 05:33:26.654 +0000 TaskLogLogger-class 
org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecuteRunnable:[179]
 - [WorkflowInstance-47][TaskInstance-49] - Task execute failed, due to meet an 
exception
   org.apache.dolphinscheduler.plugin.task.api.TaskException: TenantCode: 
zhangsan doesn't exist
        at 
org.apache.dolphinscheduler.server.worker.utils.TaskExecutionCheckerUtils.checkTenantExist(TaskExecutionCheckerUtils.java:70)
        at 
org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecuteRunnable.beforeExecute(WorkerTaskExecuteRunnable.java:210)
        at 
org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecuteRunnable.run(WorkerTaskExecuteRunnable.java:170)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at 
com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
        at 
com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
        at 
com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
   
   
   ### What you expected to happen
   
   Job normal submission
   
   ### How to reproduce
   
   When the SSSD is used to synchronize the user from LDAP to the worker node 
and LDAP authentication is enabled on the Dolphinscheduler API Server, an error 
is reported when submitting jobs
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   3.1.x
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to