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

   ### 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
   
   I saw that cmd is supported in 3.2.0 and above, but I still can't use cmd to 
execute tasks in version 3.3.1. It will get stuck.
   
   I have set the interceptor to cmd
   
   # The interceptor type of Shell task, e.g. bash, sh, cmd
   shell.interceptor.type=cmd
   
   ### What you expected to happen
   
   [LOG-PATH]: C:\worker-server\logs\20251022\155331008648608\2\31\35.log, 
[HOST]: x.x.x.x:1234
   2025-10-22 16:27:21.213 INFO  - 🐬 Initialize Task Context
   2025-10-22 16:27:21.416 INFO  - TenantCode: Administrator check successfully
   2025-10-22 16:27:21.431 INFO  - TaskInstance working directory: 
C:worker-server/exec/process/35 create successfully
   2025-10-22 16:27:21.447 INFO  - Download resources successfully: 
   ResourceContext(resourceItemMap={})
   2025-10-22 16:27:21.447 INFO  - 🐬 Load Task Instance Plugin
   2025-10-22 16:27:21.447 INFO  - Initialized physicalTask: PYTHON successfully
   2025-10-22 16:27:21.447 INFO  - Initialize python task params {
     "localParams" : [ ],
     "varPool" : [ ],
     "rawScript" : "print(123)",
     "resourceList" : [ ]
   }
   2025-10-22 16:27:21.447 INFO  - Set taskVarPool: null successfully
   2025-10-22 16:27:21.510 INFO  - 🐬 Execute Task Instance
   2025-10-22 16:27:21.510 INFO  - raw python script : print(123)
   2025-10-22 16:27:21.525 INFO  - tenantCode :Administrator, task 
dir:C:worker-server/exec/process/35
   2025-10-22 16:27:21.525 INFO  - generate python script 
file:C:worker-server/exec/process/35/py_35.py
   2025-10-22 16:27:21.525 INFO  - #-*- encoding=utf8 -*-
   
   print(123)
   2025-10-22 16:27:21.556 WARN  - k8s config is not supported in windows
   2025-10-22 16:27:21.556 INFO  - Final Shell file is : 
   @echo off
   cd /d %~dp0
   ${PYTHON_LAUNCHER} C:worker-server/exec/process/35/py_35.py
   2025-10-22 16:27:21.556 WARN  - sudo is not supported in windows
   2025-10-22 16:27:21.556 INFO  - Executing shell command : cmd.exe 
C:worker-server\exec\process\35\35.bat
   2025-10-22 16:27:21.572 ERROR - Get task pid failed
   java.lang.NoSuchFieldException: pid
        at java.base/java.lang.Class.getDeclaredField(Class.java:2411)
        at 
org.apache.dolphinscheduler.plugin.task.api.AbstractCommandExecutor.getProcessId(AbstractCommandExecutor.java:339)
        at 
org.apache.dolphinscheduler.plugin.task.api.AbstractCommandExecutor.run(AbstractCommandExecutor.java:142)
        at 
org.apache.dolphinscheduler.plugin.task.python.PythonTask.handle(PythonTask.java:96)
        at 
org.apache.dolphinscheduler.server.worker.executor.PhysicalTaskExecutor.doTriggerTaskPlugin(PhysicalTaskExecutor.java:75)
        at 
org.apache.dolphinscheduler.task.executor.AbstractTaskExecutor.start(AbstractTaskExecutor.java:81)
        at 
org.apache.dolphinscheduler.task.executor.worker.TaskExecutorWorker.start(TaskExecutorWorker.java:65)
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
   2025-10-22 16:27:21.588 INFO  - process start, process id is: 0
   2025-10-22 16:27:22.588 INFO  -  -> 
        Microsoft Windows [版本 10.0.17763.1339]
        (c) 2018 Microsoft Corporation。保留所有权利。
   
   ### How to reproduce
   
   use windows worker 
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   3.3.1
   
   ### 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