github-actions[bot] commented on issue #14935:
URL: 
https://github.com/apache/dolphinscheduler/issues/14935#issuecomment-1722949691

   ### 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
   
   Use SSSD to synchronize users from LDAP to worker nodes, and enable LDAP 
authentication on Dolphinscheduler API Server.
   The users synchronized from LDAP will not appear in the /etc/passwd file, 
which leads to the judgment that the user does not exist and the corresponding 
user will be created, but the user creation will fail.
   Then use the user to submit the job and report an error:
   [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