easyscheduler任务成功显示失败问题:Data too long for column 'app_link' at row 1

在使用dolphinscheduler时遇到任务显示失败的异常,尽管所有sqoop import命令执行成功。通过查看执行主机日志,发现因'app_link'字段数据过长导致错误。该字段对应'yarn app id',扩大其varchar长度为5000后,问题得到解决。
摘要由CSDN通过智能技术生成

最近使用dolphinscheduler(原easyscheduler)过程中,发现一个奇怪的问题:在一个shell任务中写了10个sqoop import命令,执行任务,显示执行失败,在UI查看日志发现所有的sqoop都执行成功了,而且shell中也增加了判断,失败就exit 1,都执行成功了最后会exit 0。为什么exit 0,shell脚本还是执行失败?——思路与之前一样,看日志!WEBUI中的日志并无报错,就到执行任务的host节点查看。果然报错了!

[ERROR] 2020-01-03 17:13:26.963  - [taskAppId=TASK-8-81-156]:[189] - 
### Error updating database.  Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'app_link' at row 1
### The error may exist in org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.java (best guess)
### The error may involve org.apache.dolphinscheduler.dao.mapper.TaskInstanceMapper.updateById-Inline
### The error occurred while setting parameters
### SQL: UPDATE t_ds_task_instance  SET flag=?, task_json=?, pid=?, app_link=?, task_type=?, task_instance_priority=?, log_path=?, host=?, start_time=?, state=?, process_instance_id=?, process_definition_id=?, alert_flag=?, execute_path=?, worker_group_id=?, max_retry_times=?, retry_times=?, submit_time=?, name=?, retry_interval=?  WHERE id=?
### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'app_link' at row 1
; Data truncation: Data too long for column 'app_link' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'app_link' at row 1
org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'app_link' at row 1
### The error may exist in org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.java (best guess)
### The error may involve org.apache.dolphinscheduler.dao.mapper.TaskInstanceMapper.updateById-Inline
### The error occurred while setting parameters
### SQL: UPDATE t_ds_task_instance  SET flag=?, task_json=?, pid=?, app_link=?, task_type=?, task_instance_priority=?, log_path=?, host=?, start_time=?, state=?, process_instance_id=?, process_definition_id=?, alert_flag=?, execute_path=?, worker_group_id=?, max_retry_times=?, retry_times=?, submit_time=?, name=?, retry_interval=?  WHERE id=?
### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'app_link' at row 1
; Data truncation: Data too long for column 'app_link' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'app_link' at row 1
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
Data truncation: Data too long for column是指在插入或更新数据时,数据的长度超过了列的最大长度限制。在这种情况下,需要修改数据库字段的长度,以适应较长的数据。 解决方案可以根据具体情况而定。一种常见的解决方案是将列的数据类型更改为更大的数据类型,例如将varchar改为text或mediumtext。这样可以容纳更长的数据。 另外,还可以尝试检查数据是否正确截断或缩短,以使其适应列的长度限制。如果数据确实超过了列的最大长度,那么只能通过增加列的长度或者修改数据以适应列的限制。 在具体操作上,可以通过修改数据库表结构来更改列的长度。例如,使用ALTER TABLE语句修改列的定义。具体的语法将根据数据库的类型而有所不同。 总之,解决Data truncation: Data too long for column问题可以通过修改数据库字段的长度或调整数据来适应列的限制。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [【mysql报错】Data truncation: Data too long for column ‘XXX‘ at row 1](https://blog.csdn.net/ranran0224/article/details/127571063)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [MySql 插入时报:Data truncation: Data too long for column ‘xxx‘ at row 1](https://blog.csdn.net/weixin_51587574/article/details/127889896)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Delphi7.1 Update](https://download.csdn.net/download/chenxh/135104)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值