-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用代理地址的S3存储策略上传附件到minio云存储报错 #99
Comments
Hi @carolcoral,建议到 console 下载一下完整的日志文件上传到评论 |
不建议直接把密钥发出来,服务器容易受攻击
…---原始邮件---
发件人: ***@***.***>
发送时间: 2023年11月21日(周二) 下午5:02
收件人: ***@***.***>;
抄送: ***@***.***>;
主题: [halo-dev/plugin-s3] 使用代理地址的S3存储策略上传附件到minio云存储报错 (Issue #99)
是什么版本出现了此问题?
2.10.2
使用的什么数据库?
PostgreSQL
使用的哪种方式运行?
Docker Compose
在线站点地址
https://blog.cnkj.site
发生了什么?
环境
Version
halo: 2.10.2
plugin-s3: 1.6.3
Url
源站地址: https://redirect.cnkj.site:19096
代理地址: https://api.minio.cnkj.site
MinIO 测试信息
Access Key: SEBlFRMzQ4a0SkQT4l1a
Secret Key: FrZR9TXRrioMuzd2wUUnBJkvOxmUv6gDTDF5xXa1
Buckets: test
操作
使用1panel对minio的api端口进行反向代理
在halo博客中 附件 - 存储策略 中新增minio作为云存储
成功添加云存储后上传附件
使用 源站地址 上传成功
使用 代理地址 上传失败
查看 halo 后台日志返回为 null
使用1Panel 面板设置 中的 备份帐号 - minio 进行验证发现可以正常使用并上传内容
相关日志输出
datestreamcontent
2023/11/21 15:57:39stdout
2023/11/21 15:57:39stdout at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
2023/11/21 15:57:39stdout at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
2023/11/21 15:57:39stdout at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
2023/11/21 15:57:39stdout at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
2023/11/21 15:57:39stdout at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
2023/11/21 15:57:39stdout at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.Mono.subscribe(Mono.java:4495) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.MonoUsing.subscribe(MonoUsing.java:109) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.FluxConcatArray.subscribe(FluxConcatArray.java:78) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onComplete(FluxConcatArray.java:258) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.Mono.subscribe(Mono.java:4480) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:46) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:77) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.MonoSupplier.subscribe(MonoSupplier.java:48) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2341) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at reactor.core.publisher.MonoSupplier$MonoSupplierSubscription.request(MonoSupplier.java:126) ~[reactor-core-3.5.11.jar:3.5.11]
2023/11/21 15:57:39stdout at run.halo.s3os.S3OsAttachmentHandler.lambda$checkFileExistsAndRename$29(S3OsAttachmentHandler.java:392) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.services.s3.DefaultS3Client.headObject(DefaultS3Client.java:5438) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.measureApiCallSuccess(BaseSyncClientHandler.java:179) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.lambda$execute$1(BaseSyncClientHandler.java:82) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.doExecute(BaseSyncClientHandler.java:171) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:103) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:193) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:31) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:48) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:42) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:36) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:56) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:36) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:81) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:36) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:50) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:40) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:78) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:42) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:73) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:30) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:40) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.core.internal.handler.BaseClientHandler.lambda$successTransformationResponseHandler$7(BaseClientHandler.java:266) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler$Crc32ValidationResponseHandler.handle(AwsSyncClientHandler.java:95) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:43) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:85) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) ~[na:na]
2023/11/21 15:57:39stdout at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) ~[na:na]
2023/11/21 15:57:39stdoutOriginal Stack Trace:
2023/11/21 15:57:39stdout *__checkpoint ⇢ HTTP POST "/apis/api.console.halo.run/v1alpha1/attachments/upload" [ExceptionHandlingWebHandler]
2023/11/21 15:57:39stdout *__checkpoint ⇢ org.springframework.web.filter.reactive.ServerHttpObservationFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ CorsWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ AnonymousAuthenticationWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ run.halo.app.security.authentication.login.UsernamePasswordAuthenticator [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ run.halo.app.security.authentication.login.DelegatingLogoutPageGeneratingWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ run.halo.app.security.authentication.login.UsernamePasswordLogoutHandler [DefaultWebFilterChain]
2023/11/21 15:57:39stdout *__checkpoint ⇢ run.halo.app.security.InitializeRedirectionWebFilter [DefaultWebFilterChain]
2023/11/21 15:57:39stdoutError has been observed at the following site(s):
2023/11/21 15:57:39stdout Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
2023/11/21 15:57:39stdout at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) ~[na:na]
2023/11/21 15:57:39stdoutsoftware.amazon.awssdk.services.s3.model.S3Exception: null (Service: S3, Status Code: 403, Request ID: 1799945C92D122FB, Extended Request ID: 7987905dee74cdeb212432486a178e511309594cee7cb75f892cd53e35f09ea4)
2023/11/21 15:57:39stdout
2023/11/21 15:57:39stdout2023-11-21T15:57:39.672+08:00 ERROR 7 --- [ndedElastic-508] a.w.r.e.AbstractErrorWebExceptionHandler : [65e55a31-22492] 500 Server Error for HTTP POST "/apis/api.console.halo.run/v1alpha1/attachments/upload"
附加信息
No response
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
测试信息,专门用于给你们测试使用 |
已上传 halo-log-2023-11-21 17_28.log |
Hi @carolcoral 我看这里日志显示: |
看看【插件】->【对象存储(Amazon S3 协议)】->【关联s3文件】能否正常读取 |
没有上传成功,里面没有文件是无法读取的 |
今天重新尝试了一下仍然无法正常上传,添加防火墙端口允许全部。 Sceret 相关信息是正确的,因为使用相同的配置信息可以在1Panel中添加minio帐号并成功上传备份。 |
手动在后台上传一个文件到策略文件夹下试试 |
因为很多issue都是反向代理minio出现的问题,这与插件无关 |
那就对了,之前有人和你一样的错误 #48 |
|
读写权限、桶、secret等信息肯定正确的啊。。。我都说了,使用 |
查看了该ISSUE的相关内容,最后好像也没有解决啊。。不过情况有点类似,使用源站(有端口)可以正常上传,如果反向代理源站地址到 80 端口上则无法正常上传 |
十分钟前我才又换了一个新IP地址的服务器上的1Panel尝试上传,可以使用 |
他们都是反向代理出的问题,现象也是1panel可以上传。但是使用 s3browser 和本插件都有错误。原因出在反向代理,具体什么问题我不清楚。如果真是插件问题的话s3browser是不会上传报错的。 |
那我晚上回去再试试,现在电脑系统是MacOS的无法安装S3Browser |
首先感谢。当然,这些方法我都尝试过,除了google相关内容(nginx minio代理无法上传)并且完整的阅读了minio官方对于使用Nginx代理minio的代码块,但是通过修改并不能使我的 参考官方文档给出的nginx配置进行了修改,然而结果并不是期望的效果。 |
Hi @carolcoral ,如果 Halo 在使用源站可以正常上传文件,而试用代理站点却不能上传,这足以说明 Halo 侧针对源站上传功能是正常的,建议将重点放在反向代理这块儿排查。 不过我会尝试在本地搭建一个 MinIO 和 Nginx 测试能否正常上传。 |
服务就是本地部署的,只使用一层代理是可以正常访问的,但是目前我用了两层代理。 网络结构:docker compose部署 MinIO - 本地Nginx代理docker桥接端口(HTTPS) - 1Panel 面板使用Openresty 代理 本地Nginx代理地址 |
nginx 日志
反代理后就会无法上传,其他正常 |
@longjuan @JohnNiang Docker 网桥内http协议没毛病,反代去掉9000走https就有问题了,反代理http协议 还没试过 |
这个问题,我前面已经问过了,已经确定了是1panel的openresty默认配置问题导致的,建议去1panel反馈,我已经在1panel群里反馈过了,但是一直没有得到修复。 |
@JohnNiang @guqing @longjuan 你们内部也向1panel开发组反馈下哇 |
目前解决办法有几种: |
Hi @cyril-cheng ,我们和 1Panel 的沟通也是通过 GitHub Issue 进行的,没有所谓的内部开发组。 更建议已开源的方式去 1Panel 仓库提交 Issue 反馈。开发者不一定看群消息,但一定会看 Issue 的。 |
算了不提了,1panel二话不说就给我盖了,官方推荐配置又不是没试过,上次提的时候还请 @longjuan 远程弄了都不行。 |
Hi @cyril-cheng,描述 Issue 的时候也可以提一下你参考过的文档,尝试过的步骤。 如果能确定 OpenResty 的问题且定位到的话,可能有助于修复这个问题。 |
建议重新OPEN 1Panel中的OpenResty 的ISSUE,我在cloudeve上进行尝试,可以稳定复现: |
其中 redirect.x.x 使用的是NAS自身的nginx代理服务,api.minio.x.x 使用的是1p中的openresty代理的 redirect.x.x |
你去。。。我都被盖2次了 |
nginx直接反代理也会有这个问题 |
可以写一个接口mock程序,把请求头全部打出来,把minio换成这个程序,看看是不是少了什么请求头,过几天有空了我可以试一试,你们也可以尝试一下
…---原始邮件---
发件人: ***@***.***>
发送时间: 2023年12月6日(周三) 上午10:18
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [halo-dev/plugin-s3] 使用代理地址的S3存储策略上传附件到minio云存储报错 (Issue #99)
使用 https://redirect.x.x:9001 地址可以正常生成存储策略(即上传文件)
使用 https://api.minio.x.x 地址则无法正常生成存储策略上传文件
其中 redirect.x.x 使用的是NAS自身的nginx代理服务,api.minio.x.x 使用的是1p中的openresty代理的 redirect.x.x
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
建议检查一下是否正确配置过这些 headers: proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; 不管是 Nginx 还是 OpenResty, |
@JohnNiang S3 Browser 能上传的话 应该就是这个插件有问题了,但是插件日志不够详细也不知道哪里有问题 |
应该是请求头传递问题 我把雷池的贴出来你参考下 @carolcoral |
upstream backend_1 {
server 127.0.0.1:9001;
keepalive 128;
keepalive_timeout 75;
}
map $scheme $hsts_header {
https "max-age=5184000";
}
server {
listen 0.0.0.0:443 ssl http2;
server_name www.example.com;
ssl_certificate /etc/nginx/certs/cert_1.crt;
ssl_certificate_key /etc/nginx/certs/cert_1.key;
error_page 497 =302 https://$host:$server_port$request_uri;
if ($host !~* ^(www\.example\.com)$) {
rewrite ^ /not_found_page last;
}
location = /not_found_page {
internal;
root /etc/nginx/not_found_pages;
try_files /default_not_found_page.html =404;
}
location = /forbidden_page {
internal;
root /etc/nginx/forbidden_pages;
try_files /default_forbidden_page.html =403;
}
location = /acl_page {
internal;
root /etc/nginx/acl_pages;
try_files /default_acl_page.html =429;
}
location ^~ / {
proxy_pass http://backend_1;
include proxy_params;
include /etc/nginx/custom_params/backend_1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
add_header Strict-Transport-Security $hsts_header;
t1k_append_header SL-CE-SUID 1;
t1k_body_size 1024k;
tx_body_size 4k;
t1k_error_page 403 /forbidden_page;
t1k_error_page 429 /acl_page;
tx_error_page 403 /forbidden_page;
}
} 这个配置是可以正确使用的。 |
签名校验失败,nginx请求头没传递过去 |
应该没问题的,那S3 Browser 就不计算签名了么? |
经排查,是由于反向代理过程中请求头改变造成的问题: @cyril-cheng 是使用 1panel 的 OpenResty 反向代理,使用了非标准80/443端口。由于 1panel 反向代理默认配置文件为 @dysf888 是使用 cf zero trust ,请求经过 cf 时把 |
@carolcoral 请尝试: 加入
反向代理配置修改和加入
|
经过尝试,仍然无法正常上传(修改配置后已重启openresty) |
halo-log-2023-12-08 14_30.log |
我早上测试环境有误,抱歉抱歉 |
我今天使用也是报错了,按照上面的改完1panel里的openresty配置,都重启了,最后日志里还是minio返回403 |
@longjuan 我最近用typecho开辟了个人摄影照片记录的站,用到了这个插件,也是使用aws 官方s3 php sdk,同样的配置 plugin-s3 403 ,这个插件一切正常 |
@ruibaby @guqing @longjuan 各位佬,我也遇到了此问题,并成功解决了。我相信我和@carolcoral 的问题应该是一模一样的。
@carolcoral @YOMIkio 以及其他有问题的小伙伴们,可以重新创建下MinIO的反向代理,然后在MinIO应用的API端口反向代理中增加一行 希望我的回答能够帮助到大家,并终结此问题。 |
是什么版本出现了此问题?
2.10.2
使用的什么数据库?
PostgreSQL
使用的哪种方式运行?
Docker Compose
在线站点地址
https://blog.cnkj.site
发生了什么?
环境
Version
Url
MinIO 测试信息
操作
附件
-存储策略
中新增minio作为云存储源站地址
上传成功代理地址
上传失败null
面板设置
中的备份帐号
-minio
进行验证发现可以正常使用并上传内容相关日志输出
附加信息
No response
The text was updated successfully, but these errors were encountered: