OSS 上傳出現異常

2021-09-20 00:24:11 字數 2543 閱讀 5406

分析:

有明顯報錯資訊的先 google 一下,看看是作業系統錯誤還是 ossbrower 丟擲,經過鑑定錯誤是 linux 系統底層返回,說明當時系統的 ossbrower 所在的目錄磁碟滿了,開源的錯誤到處可以看到,自行解決即可。

分析:

如果分片上傳成功,肯定不會出現訪問 404 的情況,檢查下

io error

背景:客戶端上傳 oss 過程**現 「uploadfile:fail write error: ssl=0x76d62a40: i/o error during system call, software caused connection abort 」

分析:

這個是標準的 android 系統的報錯,不是 oss 的問題,有很多開源的錯誤都有描述,建議參考下

參考1參考2

背景:could not resolve host

2018/10/24 14:03:47 hlg_matting_pref (pid=15693)(error): parseurl2image.hpp(186), read_element: image_url_service connect fail: could not resolve host: da.oss-cn-hangzhou-internal.aliyuncs.com, url:

上傳 oss 檔案解析失敗,dns 無法解析於網域名稱,此問題需要排查下 dns 是否工作正常,或者主機上的 dns 服務是否正常。

背景:python sdk 分片上傳失敗

使用者通過 python sdk 的分片上傳函式上傳到 oss 失敗,碎片管理**現很對碎片。

c# sdk 分片上傳報錯

錯誤    2019/2/13 10:24:28    serverapi    0    無    "failed to stop service. system.invalidoperationexception: an unhandled exception was detected ---> system.io.ioexception: unable to read data from the transport connection: the connection was closed.

at aliyun.oss.util.asyncresult.waitforcompletion()

at aliyun.oss.common.communication.retryableserviceclient.endsend(iasyncresult ar)

at aliyun.oss.util.ossutils.endoperationhelper[tresult](iserviceclient serviceclient, iasyncresult asyncresult)

at saas.common.aliyun.multipartuploadsample.uploadpartcallback(iasyncresult ar)

at aliyun.oss.common.communication.serviceclientimpl.<>c__displayclass5.b__4(iasyncresult ar)

at system.net.lazyasyncresult.complete(intptr usertoken)

at system.threading.executioncontext.runinternal(executioncontext executioncontext, contextcallback callback, object state, boolean preservesyncctx)

at system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state, boolean preservesyncctx)

at system.threadin..."

### 排查

oss 上傳後,但顯示長度為 0

1) 首先排查下客戶端上傳是用什麼方式 (sdk、api、工具)不同的方法可能使用也是不同的。確認好使用 sdk 我們使用客戶端的原檔案進行上傳測試,看問題是否可以復現。

2) 獲取當前問題發生的 oss requestid

3)當獲取到 requestid 查詢到日誌後,先看下使用者上傳的結果是 200 還是異常的,如果是 200 說明上傳成功;

其次看下使用者寫入的長度是多大?如果客戶寫入的就是 0 位元組,那麼和 md5 沒有任何關係,oss 除了分片、斷點續傳方法對第一片的大小有限制(100kb)外,其餘的普通上傳方法均沒有對檔案最小值做限制,也就是使用者可以上傳乙個空檔案。

EXT Struct2檔案上傳出現異常

action類 為 public string readexcel throws exception int length excelfilefilename.length int start excelfilefilename.indexof if excelfilefilename.substr...

service stop時出現異常

sbin service line 66 23299 terminated env i lang lang path path term term 原因是 我把管理指令碼的名稱設為和後台程序名稱一樣,即 後台程序名稱 deamon name,指令碼名稱 etc init.d deamon name ...

struts 檔案上傳出現錯誤

org.apache.struts2.interceptor.fileuploadinterceptorintercept content type not allowed attachment upload 56479d11 12d541899e4 8000 00000001.tmp image ...