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

Artifactory连接S3 Minio对象存储失败排查求助

Artifactory对接Minio对象存储端口异常排查

对接Artifactory与Minio对象存储时启动失败,报连接被拒绝错误。已在binarystore.xml中指定Minio端口为9000,但系统实际尝试连接443端口,需补充配置参数解决。

当前配置文件(binarystore.xml)

<config version="2">
        <chain template="s3-storage-v3"/>
        <provider id="s3-storage-v3" type="s3-storage-v3">
                <endpoint>http://s3_minio_ip:9000</endpoint>
                <identity>username</identity>
                <credential>password</credential>
                <path></path>
                <bucketName>test</bucketName>
        </provider>
</config>

启动报错日志

2024-10-21T09:28:22.624Z [jfrt ] [WARN ] [f030324f462f1e16] [ifactoryApplicationContext:288] [art-init            ] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'blobInfoServiceImpl' defined in URL [jar:file:/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/artifactory/WEB-INF/lib/artifactory-addons-common-7.59.13.jar!/org/artifactory/addon/common/blobinfo/BlobInfoServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'replicatorServiceImpl' defined in URL [jar:file:/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/artifactory/WEB-INF/lib/artifactory-addons-common-7.59.13.jar!/org/artifactory/addon/common/replicator/ReplicatorServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'artifactDistributionStatusWriterServiceImpl': Unsatisfied dependency expressed through field 'taskService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'taskServiceImpl': Unsatisfied dependency expressed through field 'addonsManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'addonsManagerImpl': Unsatisfied dependency expressed through method 'setEntitlementService' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'JFConnectServiceImpl': Unsatisfied dependency expressed through method 'setAccessService' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessServiceImpl': Unsatisfied dependency expressed through method 'setCentralConfigService' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'centralConfig': Unsatisfied dependency expressed through field 'authService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityServiceImpl': Unsatisfied dependency expressed through method 'setBuildService' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'buildServiceImpl': Unsatisfied dependency expressed through method 'setUploadService' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'uploadServiceImpl': Unsatisfied dependency expressed through method 'setTrafficService' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'trafficServiceImpl': Unsatisfied dependency expressed through method 'setRepositoryService' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repositoryServiceImpl': Unsatisfied dependency expressed through field 'storageService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'storageServiceImpl': Unsatisfied dependency expressed through method 'setBinaryStore' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'artifactoryBinaryServiceImpl': Unsatisfied dependency expressed through method 'setBinaryService' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'binaryInternalService': Invocation of init method failed; nested exception is com.amazonaws.SdkClientException: Unable to execute HTTP request:Connect to 172.17.14.223:443 [/172.17.14.223] failed: Connection refused
2024-10-21T09:28:22.636Z [jfrt ] [ERROR] [f030324f462f1e16] [ctoryContextConfigListener:126] [art-init            ] - Application could not be initialized: Connection refused
java.lang.reflect.InvocationTargetException: null
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
  at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
  at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
  at org.artifactory.lifecycle.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:267)
  at org.artifactory.lifecycle.webapp.servlet.ArtifactoryContextConfigListener$1.run(ArtifactoryContextConfigListener.java:122)

解决方法

问题根源是Artifactory的S3 v3驱动默认使用虚拟主机式访问,会忽略端点中指定的端口,转而使用HTTPS默认的443端口。需补充以下配置参数:

  • 添加<pathStyleAccess>true</pathStyleAccess>:强制启用路径式存储访问,让端点配置的端口生效(Minio默认采用路径式访问)。
  • 若使用HTTP而非HTTPS,添加<disableSslVerification>true</disableSslVerification>:避免SSL验证逻辑触发端口切换。
  • 额外检查:确认Minio服务确实在9000端口监听,且Artifactory服务器能正常访问该端口(无防火墙/安全组拦截)。

修改后的配置示例

<config version="2">
        <chain template="s3-storage-v3"/>
        <provider id="s3-storage-v3" type="s3-storage-v3">
                <endpoint>http://s3_minio_ip:9000</endpoint>
                <identity>username</identity>
                <credential>password</credential>
                <path></path>
                <bucketName>test</bucketName>
                <pathStyleAccess>true</pathStyleAccess>
                <disableSslVerification>true</disableSslVerification>
        </provider>
</config>

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.17 02:20:11