apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
https://seatunnel.apache.org/
Apache License 2.0
7.58k stars 1.67k forks source link

Using rest-api to submit job is failed. #6794

Open pppeace opened 2 months ago

pppeace commented 2 months ago

Discussed in https://github.com/apache/seatunnel/discussions/6793

Originally posted by **pppeace** May 4, 2024 When I using rest-api to submit a job (mysql2mysql, a simple job), it's failure. And the response is `{"status":"fail","message":"null"}` Here are the steps that I did ``` -- mysql 准备数据表 mysql -h xxx -uroot -proot mysql> use test; mysql> create table st_src(id int, name varchar(255)); Query OK, 0 rows affected (0.32 sec) mysql> create table st_sink like st_src; Query OK, 0 rows affected (0.25 sec) mysql> insert into st_src values(1, 'A'); Query OK, 1 row affected (0.03 sec) mysql> insert into st_src values(2, 'B'); Query OK, 1 row affected (0.09 sec) mysql> insert into st_src values(3, 'C'); Query OK, 1 row affected (0.03 sec) ================================================================================================================================================================================================================================================ -- seatunnel version: 2.3.3 -- seatunnel api.conf # Set the basic configuration of the task to be performed env { execution.parallelism = 1 job.mode = "BATCH" } source { Jdbc { url = "jdbc:mysql://xxx:3306/test" driver = "com.mysql.cj.jdbc.Driver" user = "root" password = "root" query = "select * from st_src" } } sink { Jdbc { url = "jdbc:mysql://xxx:3306/test" driver = "com.mysql.cj.jdbc.Driver" user = "root" password = "root" database = "test" table = "st_sink" query = "insert into st_sink values(?,?)" } } ================================================================================================================================================================================================================================================ -- 启动集群 ./bin/seatunnel-cluster.sh -d -- 查看集群服务 jps | grep SeaTunnelServer -- 集群模式提交任务 ./bin/seatunnel.sh --config config/api.conf *********************************************** Job Statistic Information *********************************************** Start Time : 2024-05-04 20:14:00 End Time : 2024-05-04 20:14:04 Total Time(s) : 3 Total Read Count : 3 Total Write Count : 3 Total Failed Count : 0 *********************************************** -- 这里可以确认 seatunnel cluster 配置和任务 conf 都没有问题 ================================================================================================================================================================================================================================================ -- Rest-api ---- 获取所有运行中任务(成功,空列表) curl -X GET http://localhost:5801/hazelcast/rest/maps/running-jobs ---- 获取所有已完成任务(无信息,未报错) curl -X GET http://localhost:5801/hazelcast/rest/maps/finished-jobs/ ---- 获取系统监控指标信息(成功) curl -X GET http://localhost:5801/hazelcast/rest/maps/system-monitoring-information | jq ---- 提交任务 curl -X POST http://localhost:5801/hazelcast/rest/maps/submit-job \ -H "Content-Type: application/json" \ --data '{ "env":{ "job.mode":"batch" }, "source":[ { "plugin_name":"Jdbc", "url":"jdbc:mysql://xxx:3306/test", "driver":"com.mysql.cj.jdbc.Driver", "user":"root", "password":"root", "query":"select * from st_src" } ], "transform":[ ], "sink":[ { "plugin_name":"Jdbc", "url":"jdbc:mysql://xxx:3306/test", "driver":"com.mysql.cj.jdbc.Driver", "user":"root", "password":"root", "database":"test", "table":"st_sink", "query":"insert into st_sink values(?,?)" } ] }' ---- response {"status":"fail","message":"null"} ``` I also tried to find the logs to get more information, but there is nothing in ${SEATUNNEL_HOME}/logs/seatunnel-engine-server.log(just some 'Job info detail', seems cycle). Anybody can help with this? pretty thanks.
github-actions[bot] commented 4 weeks ago

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.