Dolphinscheduler: [Bug][runtime] useradd: invalid user name '10000' when run flink job on k8s

Created on 16 Mar 2021  ·  8Comments  ·  Source: apache/dolphinscheduler

For better global communication, Please describe it in English. If you feel the description in English is not clear, then you can append description in Chinese(just for Mandarin(CN)), thx! *
*
Describe the bug

I have deployed dolphinscheduler on k8s with helm, and I run a flink job , but got the message[ useradd: invalid user name '10000' ]

below is the full log:

[INFO] 2021-03-16 17:21:13.843  - [taskAppId=TASK-1-1-1]:[115] - create dir success /tmp/dolphinscheduler/exec/process/1/1/1/1
[INFO] 2021-03-16 17:21:13.853  - [taskAppId=TASK-1-1-1]:[115] - create linux os user : 10000
[INFO] 2021-03-16 17:21:13.854  - [taskAppId=TASK-1-1-1]:[115] - execute cmd : sudo useradd -g root 10000
[ERROR] 2021-03-16 17:21:13.859  - [taskAppId=TASK-1-1-1]:[105] - useradd: invalid user name '10000'

org.apache.dolphinscheduler.common.shell.AbstractShell$ExitCodeException: useradd: invalid user name '10000'

    at org.apache.dolphinscheduler.common.shell.AbstractShell.runCommand(AbstractShell.java:209)
    at org.apache.dolphinscheduler.common.shell.AbstractShell.run(AbstractShell.java:124)
    at org.apache.dolphinscheduler.common.shell.ShellExecutor.execute(ShellExecutor.java:127)
    at org.apache.dolphinscheduler.common.shell.ShellExecutor.execCommand(ShellExecutor.java:104)
    at org.apache.dolphinscheduler.common.shell.ShellExecutor.execCommand(ShellExecutor.java:87)
    at org.apache.dolphinscheduler.common.utils.OSUtils.exeShell(OSUtils.java:395)
    at org.apache.dolphinscheduler.common.utils.OSUtils.exeCmd(OSUtils.java:385)
    at org.apache.dolphinscheduler.common.utils.OSUtils.createLinuxUser(OSUtils.java:290)
    at org.apache.dolphinscheduler.common.utils.OSUtils.createUser(OSUtils.java:264)
    at org.apache.dolphinscheduler.common.utils.FileUtils.createWorkDirAndUserIfAbsent(FileUtils.java:175)
    at org.apache.dolphinscheduler.server.worker.processor.TaskExecuteProcessor.process(TaskExecuteProcessor.java:139)
    at org.apache.dolphinscheduler.remote.handler.NettyServerHandler$1.run(NettyServerHandler.java:128)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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:748)
[INFO] 2021-03-16 17:21:13.860  - [taskAppId=TASK-1-1-1]:[115] - create user name fail 10000

To Reproduce

  1. deploy by helm on k8s
  2. upload flink jar
  3. create a workflow
  4. run flink workflow

Expected behavior
flink job run normaly

Screenshots
image

Which version of Dolphin Scheduler:
-dockerimage: apache/dolphinscheduler:latest

Most helpful comment

hope to see 1.3.6 docs soon. Flink support many resource managers like yarn , k8s and so on. and support many job submit mode, does DS let user choose those options? . I think flink on native k8s is the easiest way to create a flink cluster. if there is a default options. I want it is the native k8s. 😄

All 8 comments

@haydenzhourepo On linux, you cannot create user named 10000. Please change it to a valid username.

By the way, please tell us the version of Dolphin Scheduler Helm Chart and the image id of apache/dolphinscheduler:latest

@chengshiwen
image

where and how to change it, is there a document? thanks

@haydenzhourepo In Tenant Manage (租户管理), you should create a tenant like ds, and then, you need to associate this tenant to a user.

For more information, please refer to the official document https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/kubernetes-deployment.html

By the way, the flink binary release is not packaged into the image of dolphinscheduler. If you want to run flink task, you need to mount the flink binary release into the container.

For a quick test, you can run a shell or python task.

Thanks , i want use DS as a deploy tool for production , i will try to flnd the way to package flink binary to the container.

@chengshiwen ds use the tenant code as username to create user, I changed the tenant to a valid Linux name then the program can create user normally. so I think this is a bug. we should validate the tenant code that user inputs. I will give a pr to fix this problem.

@haydenzhourepo This problem does exist, welcome to submit pr.

In the 1.3.6 document, I will give a task support matrix on docker and k8s, and this work will show what additional steps some tasks like hadoop and flink may require to be executed successfully.

hope to see 1.3.6 docs soon. Flink support many resource managers like yarn , k8s and so on. and support many job submit mode, does DS let user choose those options? . I think flink on native k8s is the easiest way to create a flink cluster. if there is a default options. I want it is the native k8s. 😄

Was this page helpful?
0 / 5 - 0 ratings