开发者社区 > 大数据与机器学习 > 大数据计算 MaxCompute > 正文

大数据计算MaxCompute可以帮忙看下这个报错原因是什么吗?

大数据计算MaxCompute可以帮忙看下这个报错原因是什么吗

image.png

Traceback (most recent call last):
File "", line 31, in
for record in reader:
File "/home/tops/lib/python3.7/site-packages/odps/models/readers.py", line 121, in iter
for record in self.read():
File "/home/tops/lib/python3.7/site-packages/odps/models/readers.py", line 159, in read
start, rec_count, step=step, compress=compress, columns=columns
File "/home/tops/lib/python3.7/site-packages/odps/models/readers.py", line 81, in _retry_iter_reader
start, record_count, step, compress=compress, columns=columns, counter=counter
File "/home/tops/lib/python3.7/site-packages/odps/models/readers.py", line 141, in _open_and_iter_reader
start, record_count, compress=compress, columns=columns
File "/home/tops/lib/python3.7/site-packages/odps/utils.py", line 905, in call_with_retry
return callable(args, *kwargs)
File "/home/tops/lib/python3.7/site-packages/odps/tunnel/instancetunnel.py", line 187, in open_record_reader
start, count, compress=compress, columns=columns, reader_cls=TunnelRecordReader
File "/home/tops/lib/python3.7/site-packages/odps/tunnel/instancetunnel.py", line 160, in _open_reader
resp = self._client.get(url, stream=True, params=params, headers=headers)
File "/home/tops/lib/python3.7/site-packages/odps/rest.py", line 248, in get
return self.request(url, 'get', stream=stream,
kwargs)
File "/home/tops/lib/python3.7/site-packages/odps/rest.py", line 177, in request
pass
File "/home/tops/lib/python3.7/contextlib.py", line 119, in exit
next(self.gen)
File "/home/tops/lib/python3.7/site-packages/odps/rest.py", line 244, in _request
errors.throw_if_parsable(res, self._endpoint, self._tag)
File "/home/tops/lib/python3.7/site-packages/odps/errors.py", line 97, in throw_if_parsable
raise parse_response(resp, endpoint, tag)
odps.errors.ODPSError: StatusConflict: RequestId: 2024020911360943e3db0b11ecc6c9 Tag: TUNNEL Endpoint: http:// dt.cn-shanghai.maxcompute.aliyun-inc.com
The download session is expired.
2024-02-09 11:36:09 INFO =================================================================
2024-02-09 11:36:09 INFO Exit code of the Shell command 1
2024-02-09 11:36:09 INFO --- Invocation of Shell command completed ---
2024-02-09 11:36:09 ERROR Shell run failed!
2024-02-09 11:36:09 ERROR Current task status: ERROR
2024-02-09 11:36:09 INFO Cost time is: 92651.194s
/home/admin/alisatasknode/taskinfo//20240208/datastudio/09/51/52/9gdaueoa5s3m7fui2e2dsc8o/T3_4925124095.log-END-EOF

展开
收起
真的很搞笑 2024-02-14 20:25:13 89 0
1 条回答
写回答
取消 提交回答
  • 根据你提供的错误信息,该问题是由于在阿里云MaxCompute中使用DataWorks或SDK读取数据时,下载会话过期导致的。具体错误信息为:

    ODPSError: StatusConflict: RequestId: ... Tag: TUNNEL Endpoint: ...
    The download session is expired.
    

    MaxCompute Tunnel服务(用于高效地上传和下载大表数据)在进行数据读取时,创建了一个临时的下载会话,但该会话在数据读取过程中过期了。这可能是因为在读取数据的时间超过了Tunnel会话的默认有效期。

    解决办法:

    1. 检查你的代码逻辑,确保在获取TunnelReader后尽快完成数据读取,避免长时间无操作导致会话过期。
    2. 调整MaxCompute Tunnel服务的会话超时时间。通常情况下,可以通过调整SDK的相关参数来延长会话有效期。
    2024-02-15 08:57:23
    赞同 展开评论 打赏

MaxCompute(原ODPS)是一项面向分析的大数据计算服务,它以Serverless架构提供快速、全托管的在线数据仓库服务,消除传统数据平台在资源扩展性和弹性方面的限制,最小化用户运维投入,使您经济并高效的分析处理海量数据。

相关产品

  • 云原生大数据计算服务 MaxCompute
  • 相关电子书

    更多
    Data+AI时代大数据平台应该如何建设 立即下载
    大数据AI一体化的解读 立即下载
    极氪大数据 Serverless 应用实践 立即下载