You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "XimfengYao (via GitHub)" <gi...@apache.org> on 2026/07/09 05:52:03 UTC
[I] [Bug][Zeta] ST-JID not injected into MDC when submitting job via REST API in Docker [seatunnel]
XimfengYao opened a new issue, #11387:
URL: https://github.com/apache/seatunnel/issues/11387
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### What happened
**Description:**
When deploying SeaTunnel 2.3.13 via Docker and submitting jobs through the REST API, the `[%X{ST-JID}]` field in the default mixed log file is always empty. Furthermore, when configuring `routingAppender` to generate separate log files per job, only the `job` directory is created, but no actual log files are generated inside it.
**Environment:**
- SeaTunnel Version: 2.3.13
- Deployment Method: Docker
- Job Submission Method: REST API
**Steps to Reproduce:**
1. Deploy a SeaTunnel 2.3.13 cluster using Docker.
2. Keep the default mixed log configuration and submit a job via the REST API.
3. Check `seatunnel-engine-server.log` and observe that the `[%X{ST-JID}]` field is empty.
4. Modify `log4j2.properties` to change `rootLogger.appenderRef.file.ref` to `routingAppender`.
5. Restart the service and submit another job via the REST API.
6. Check the `/opt/seatunnel/logs/job/` directory.
**Actual Behavior:**
1. Job ID is missing in the mixed logs. Example:
```text
[] 2026-07-09 13:14:14,942 INFO [o.a.s.e.s.TaskExecutionService] [seatunnel-coordinator-service-7] - [localhost]:5801 [seatunnel] [5.1] deploying TaskGroup TaskGroupLocation{jobId=1127467672255135745, pipelineId=1, taskGroupId=2} init success
[] 2026-07-09 13:14:14,943 INFO [o.a.s.e.s.TaskExecutionService] [seatunnel-coordinator-service-7] - [localhost]:5801 [seatunnel] [5.1] deploying TaskGroup TaskGroupLocation{jobId=1127467672255135745, pipelineId=1, taskGroupId=2} success
[] 2026-07-09 13:14:14,943 INFO [s.e.s.t.TransformSeaTunnelTask] [BlockingWorker-TaskGroupLocation{jobId=1127467672255135745, pipelineId=1, taskGroupId=2}] - starting seatunnel transform task, index 0
[] 2026-07-09 13:14:14,945 INFO [.a.s.e.s.t.SourceSeaTunnelTask] [BlockingWorker-TaskGroupLocation{jobId=1127467672255135745, pipelineId=1, taskGroupId=2}] - starting seatunnel source task, index 0
[] 2026-07-09 13:14:16,251 WARN [o.a.s.e.s.TaskExecutionService] [BlockingWorker-TaskGroupLocation{jobId=1127467672255135745, pipelineId=1, taskGroupId=2}] - [localhost]:5801 [seatunnel] [5.1] Exception in org.apache.seatunnel.engine.ser
```
2. After switching to `routingAppender`, the `/opt/seatunnel/logs/job/` directory remains empty. No files like `job-xxx.log` are generated, and all logs are still appended to the main system log:
```text
[root@3556df466995 seatunnel]# ll /opt/seatunnel/logs/job/
total 0
[root@3556df466995 seatunnel]# ll /opt/seatunnel/logs/
total 204
drwxr-xr-x 2 root root 4096 Jul 7 19:26 job
-rw-r--r-- 1 root root 197421 Jul 9 13:42 seatunnel-engine-server.log
```
**Expected Behavior:**
1. For jobs submitted via REST API, `[%X{ST-JID}]` in the execution logs should correctly display the corresponding Job ID.
2. When `routingAppender` is configured, each job should successfully generate an independent log file (e.g., `job-1127467672255135745.log`).
**Root Cause Analysis / Hypothesis:**
It is suspected that when a job is submitted and executed via the REST API, the `ST-JID` is not correctly propagated to the SLF4J MDC in the task execution threads. This directly prevents the `routingAppender` from obtaining the Job ID as a routing key, thereby failing to split log files by job.
### SeaTunnel Version
2.3.13
### SeaTunnel Config
```conf
default
```
### Running Command
```shell
./bin/seatunnel-cluster.sh
```
### Error Exception
```log
no error exception
```
### Zeta or Flink or Spark Version
Zeta 2.3.13
### Java or Scala Version
bishengjdk-8u432-b13
### Screenshots
_No response_
### 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: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][Zeta] ST-JID not injected into MDC when submitting job via REST API in Docker [seatunnel]
Posted by "XimfengYao (via GitHub)" <gi...@apache.org>.
XimfengYao closed issue #11387: [Bug][Zeta] ST-JID not injected into MDC when submitting job via REST API in Docker
URL: https://github.com/apache/seatunnel/issues/11387
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org