You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何配置Artifactory CEPH S3直传机制?切换后无法上传求助

Artifactory 7.38.8 切换直传机制后无法上传文件的解决办法

问题描述

Artifactory版本7.38.8,原本使用**最终上传机制(Eventual Upload Mechanism)运行正常,切换至直传机制(Direct Upload Mechanism)**后,所有文件上传操作均失败,报错信息如下:

错误日志

{
  "errors" : [ {
    "status" : 500,
    "message" : "Expecting stream to be instance of FileWrappingInputStream"
  } ]
}
2022-08-16T07:56:25.351Z [jfrt ] [ERROR] [31d9214b03152aae] [o.a.w.s.RepoFilter:315        ] [http-nio-8081-exec-8] - Upload request of example-repo-local:test/1/delivery/test.sh failed due to {}
java.lang.RuntimeException: Expecting stream to be instance of FileWrappingInputStream

当前Binary Store配置(binarystore.xml)

<config version="1">
    <chain>
        <provider id="cache-fs" type="cache-fs">
            <provider id="s3" type="s3"/>
        </provider>
    </chain>
    <provider type="s3" id="s3">
        <bucketName>xxx</bucketName>
        <endpoint>xxx.xx.xx.xxx</endpoint>
        <port>8060</port>
        <credential>xxxxx</credential>
        <identity>xxxxx</identity>
        <s3AwsVersion>AWS2</s3AwsVersion>
        <httpsOnly>false</httpsOnly>
        <property name="s3service.disable-dns-buckets" value="true"/>
    </provider>
</config>

问题原因

直传机制要求Binary Store的链配置中必须包含spool组件——这个组件负责将客户端上传的流式数据临时写入本地磁盘,生成FileWrappingInputStream供后续的S3直传流程使用。原配置的链中仅包含cache-fs和s3,缺少这个关键环节,导致无法处理流式上传请求。

解决方案

修改binarystore.xml,在链的最前端添加spool provider,配置示例如下:

<config version="1">
    <chain>
        <provider id="spool" type="spool"/>
        <provider id="cache-fs" type="cache-fs">
            <provider id="s3" type="s3"/>
        </provider>
    </chain>
    <provider type="s3" id="s3">
        <bucketName>xxx</bucketName>
        <endpoint>xxx.xx.xx.xxx</endpoint>
        <port>8060</port>
        <credential>xxxxx</credential>
        <identity>xxxxx</identity>
        <s3AwsVersion>AWS2</s3AwsVersion>
        <httpsOnly>false</httpsOnly>
        <property name="s3service.disable-dns-buckets" value="true"/>
    </provider>
    <!-- 可自定义spool临时文件存储路径,默认在ARTIFACTORY_HOME/var/data/spool -->
    <provider type="spool" id="spool">
        <!-- <dir>/path/to/your/custom/spool/directory</dir> -->
    </provider>
</config>

操作步骤

  1. 停止Artifactory服务
  2. 替换ARTIFACTORY_HOME/var/etc/artifactory目录下的binarystore.xml文件
  3. 启动Artifactory服务
  4. 测试文件上传功能是否恢复正常

内容的提问来源于stack exchange,提问作者AllenLee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 16:27:25