本文介绍作业启动相关的常见问题。
报错:The difference between the request time and the current time is too large
报错详情
Caused by: org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.OSSException: The difference between the request time and the current time is too large. [ErrorCode]: RequestTimeTooSkewed [RequestId]: 61691C47AF60C12A28 [HostId]: oss-bucket-name.oss-cn-shanghai-internal.aliyuncs.com [ResponseError]: <?xml version="1.0" encoding="UTF-8"?> <Error> <Code>RequestTimeTooSkewed</Code> <Message>The difference between the request time and the current time is too large.</Message> <RequestId>61691C47AF60C******12A28</RequestId> <HostId>******.oss-cn-shanghai-internal.aliyuncs.com</HostId> <MaxAllowedSkewMilliseconds>900000</MaxAllowedSkewMilliseconds> <RequestTime>2021-10-15T05:57:31.000Z</RequestTime> <ServerTime>2021-10-15T06:14:31.000Z</ServerTime> </Error> at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.common.utils.ExceptionFactory.createOSSException(ExceptionFactory.java:100) ~[?:?] at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.internal.OSSErrorResponseHandler.handle(OSSErrorResponseHandler.java:70) ~[?:?] at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.common.comm.ServiceClient.handleResponse(ServiceClient.java:257) ~[?:?] at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:140) ~[?:?] at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.common.comm.ServiceClient.sendRequest(ServiceClient.java:70) ~[?:?] at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.internal.OSSOperation.send(OSSOperation.java:83) ~[?:?] at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.internal.OSSOperation.doOperation(OSSOperation.java:145) ~[?:?] at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.internal.OSSOperation.doOperation(OSSOperation.java:102) ~[?:?] at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.internal.OSSBucketOperation.listObjects(OSSBucketOperation.java:411) ~[?:?] at org.apache.flink.fs.osshadoop.shaded.com.aliyun.oss.OSSClient.listObjects(OSSClient.java:443) ~[?:?] at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystemStore.listObjects(AliyunOSSFileSystemStore.java:506) ~[?:?] at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem.getFileStatus(AliyunOSSFileSystem.java:264) ~[?:?] at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem.validatePath(AliyunOSSFileSystem.java:548) ~[?:?] at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem.mkdirs(AliyunOSSFileSystem.java:532) ~[?:?] at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:2326) ~[?:?] at org.apache.flink.fs.osshadoop.common.HadoopFileSystem.mkdirs(HadoopFileSystem.java:196) ~[?:?]
报错原因
您的OSS Bucket开通了版本控制功能,但未配置生命周期规则来定期清理删除标记和不必要的历史版本。过多的删除标记会导致List慢、作业启动失败的问题。详情请参见开通实时计算Flink版。
解决方案
在OSS上配置生命周期规则来定期清理删除标记和不必要的历史版本,详情请参见使用最后一次修改时间的生命周期规则结合版本控制降低存储成本。
报错:Job was submitted in detached mode. Results of job execution, such as accumulators, runtime, etc. are not available.
报错详情
Caused by: org.apache.flink.api.common.InvalidProgramException: Job was submitted in detached mode. Results of job execution, such as accumulators, runtime, etc. are not available. Please make sure your program doesn't call an eager execution function [collect, print, printToErr, count].
报错原因
Flink作业有Detached和Blocking两种提交模式:
Detached是指通过客户端、Java API或RESTful等方式提交的,提交后无法看到作业的运行结果,需通过日志查看作业运行情况,类似于异步回调。
Blocking是指在IDEA或者其他方式直接启动的,可以通过关闭终端或Ctrl+C的方式直接关闭正在运行的Flink作业。
当Flink作业以Detached模式提交时,不能以Collect、Print、PrintToErr或Count等Operator做结尾;当作业以Blocking模式提交时,没有这些限制。
解决方案
使用SQL作业运行。
TableAPI JAR作业不要以Collect、Print、PrintToErr或Count等Operator做结尾。
JAR任务启动失败报错:Http failure response for https://vvp.console.aliyun.com/xxxx/artifacts:download?filename=xxxx.jar: 500 OK
报错详情
报错原因
OSS文件冻结或文件存在违法违规情况导致JAR任务启动失败。
解决方案
对冻结状态进行排查处理,具体操作请参见解决方案。
文档内容是否对您有帮助?