我有一个Jenkins作业(每3小时运行一次),它将数据从远程服务器传输到我的数据仓库,通常需要大约2个小时才能完成,最近我得到了下面的错误。
Jenkins作业通过SSH连接远程服务器,并通过Python (Sql_runner_procedure)调用一个load_foreign_schema_postgresql过程。
我创建了另一个Jenkins作业(每2分钟运行一次),用于移植特定的表,因为我们希望该表被频繁更新,所以对该作业的调用也是一样的,上面的作业连续运行了几次,并且在某些时间表上出现了上述错误,所以有人可以帮助我了解为什么会发生这种情况,以及如何解决它?
错误:
+ python -u sql_runner_procedure.py /home/etl/bi/datawrapper/data_loader.sql
##################Executing##############################
CALL load_foreign_schema_postgresql('odoo_server', 'public', 'dl', 'ft', log_table_schema_name := 'log',
log_table_name := 'fr_table'
-- ,recreate_indices := FALSE
);
Traceback (most recent call last):
File "sql_runner_procedure.py", line 23, in <module>
pg_cur.execute(sql)
psycopg2.errors.ConnectionFailure: SSL SYSCALL error: EOF detected
CONTEXT: remote SQL command: START TRANSACTION ISOLATION LEVEL REPEATABLE READ
SQL statement "CREATE TABLE dl.account_account_type AS
SELECT *
FROM ft.account_account_type;"
PL/pgSQL function load_foreign_schema_postgresql(text,text,text,text,boolean,boolean,text,text) line 151 at EXECUTE
Process leaked file descriptors. See https://jenkins.io/redirect/troubleshooting/process-leaked-file-descriptors for more information
Build step 'Execute shell' marked build as failure
Finished: FAILURE
我在运行Jenkins作业里面的构建脚本是
First connect the server with SSH then,
export PYTHONPATH=/home/etl/bi/
cd /home/etl/bi/
python -u sql_runner_procedure.py /home/etl/bi/datawrapper/data_loader.sql
kill $(ps -ef | grep [m]ysql_tunnel | awk '{print $2}')
发布于 2019-08-22 13:53:34
根据描述,我想这肯定是由于jobs.You的重叠所致,应该检查作业是否与相同的端口一起运行,如果您使用的是端口forwarding.You,则应该更改端口或创建一个计划,比如这些作业不会重叠。
https://stackoverflow.com/questions/57177459
复制相似问题