halo-dev / halo

强大易用的开源建站工具。
https://www.halo.run
GNU General Public License v3.0
34.02k stars 9.71k forks source link

上传用户头像出现BUG #4852

Closed xzyone closed 9 months ago

xzyone commented 12 months ago

是什么版本出现了此问题?

2.10.2

使用的什么数据库?

H2

使用的哪种方式运行?

Docker

在线站点地址

No response

发生了什么?

当时使用的upyun插件,但是好像配置有错,头像保存路径选择的也是upyun。

然后点击上传头像,在截取大小后提交,然后头像框开始无限刷新,也无法重新上传。

https://vip.helloimg.com/images/2023/11/14/ovsbAX.gif https://vip.helloimg.com/images/2023/11/14/ovsoxq.gif

尝试直接在用户元数据删除头像数据,没有效果,重新打开后数据还在。 https://vip.helloimg.com/images/2023/11/14/ovsMjM.gif

错误日志 image

相关日志输出

date    stream  content
2023/11/14 16:51:12 stdout  
2023/11/14 16:51:12 stdout  at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
2023/11/14 16:51:12 stdout  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
2023/11/14 16:51:12 stdout  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
2023/11/14 16:51:12 stdout  at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
2023/11/14 16:51:12 stdout  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[na:na]
2023/11/14 16:51:12 stdout  at run.halo.app.extension.controller.DefaultController$Worker.run(DefaultController.java:163) ~[api-2.10.2.jar:na]
2023/11/14 16:51:12 stdout  at run.halo.app.core.extension.reconciler.UserReconciler.reconcile(UserReconciler.java:35) ~[classes/:2.10.2]
2023/11/14 16:51:12 stdout  at run.halo.app.core.extension.reconciler.UserReconciler.reconcile(UserReconciler.java:52) ~[classes/:2.10.2]
2023/11/14 16:51:12 stdout  at java.base/java.util.Optional.ifPresent(Unknown Source) ~[na:na]
2023/11/14 16:51:12 stdout  at run.halo.app.core.extension.reconciler.UserReconciler.lambda$reconcile$0(UserReconciler.java:61) ~[classes/:2.10.2]
2023/11/14 16:51:12 stdout  at run.halo.app.core.extension.reconciler.UserReconciler.handleAvatar(UserReconciler.java:67) ~[classes/:2.10.2]
2023/11/14 16:51:12 stdout  at java.base/java.util.Optional.ifPresent(Unknown Source) ~[na:na]
2023/11/14 16:51:12 stdout  at run.halo.app.core.extension.reconciler.UserReconciler.lambda$handleAvatar$2(UserReconciler.java:83) ~[classes/:2.10.2]
2023/11/14 16:51:12 stdout  at java.base/java.util.Optional.ifPresent(Unknown Source) ~[na:na]
2023/11/14 16:51:12 stdout  at run.halo.app.core.extension.reconciler.UserReconciler.lambda$handleAvatar$1(UserReconciler.java:86) ~[classes/:2.10.2]
2023/11/14 16:51:12 stdout  java.lang.IllegalStateException: User avatar attachment not found.

附加信息

No response

JohnNiang commented 12 months ago

Thanks for reaching out here!

/triage needs-information

建议去 Console 下载完整的错误日志,并上传到这里。

xzyone commented 12 months ago

halo-log-2023-11-14 17_04.log

JohnNiang commented 12 months ago

Hi @xzyone ,从所提供的日志中可以发现,配置的 UPYun 存储可能无法正常上传文件,建议去附件测试一下 UPYun 所对应的存储策略能否正常上传文件。

关于上传头像后出错的关键日志如下所示:

2023-11-14T15:27:40.328+08:00 ERROR 8 --- [boundedElastic-49] a.w.r.e.AbstractErrorWebExceptionHandler : [14736824-2057]  500 Server Error for HTTP POST "/apis/api.console.halo.run/v1alpha1/attachments/upload"

software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Certificate for <oneimg.oneimg.s3.api.upyun.com> doesn't match any of the subject alternative names: [*.s3.api.upyun.com, s3.api.upyun.com]
    at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:111) ~[na:na]
    Suppressed: software.amazon.awssdk.core.exception.SdkClientException: Request attempt 1 failure: Unable to execute HTTP request: Certificate for <oneimg.oneimg.s3.api.upyun.com> doesn't match any of the subject alternative names: [*.s3.api.upyun.com, s3.api.upyun.com]
    Suppressed: software.amazon.awssdk.core.exception.SdkClientException: Request attempt 2 failure: Unable to execute HTTP request: Certificate for <oneimg.oneimg.s3.api.upyun.com> doesn't match any of the subject alternative names: [*.s3.api.upyun.com, s3.api.upyun.com]
    Suppressed: software.amazon.awssdk.core.exception.SdkClientException: Request attempt 3 failure: Unable to execute HTTP request: Certificate for <oneimg.oneimg.s3.api.upyun.com> doesn't match any of the subject alternative names: [*.s3.api.upyun.com, s3.api.upyun.com]
    Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
    *__checkpoint ⇢ run.halo.app.security.InitializeRedirectionWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ run.halo.app.security.authentication.login.UsernamePasswordLogoutHandler [DefaultWebFilterChain]
    *__checkpoint ⇢ run.halo.app.security.authentication.login.DelegatingLogoutPageGeneratingWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ run.halo.app.security.authentication.login.UsernamePasswordAuthenticator [DefaultWebFilterChain]
    *__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ AnonymousAuthenticationWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ CorsWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
    *__checkpoint ⇢ org.springframework.web.filter.reactive.ServerHttpObservationFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ HTTP POST "/apis/api.console.halo.run/v1alpha1/attachments/upload" [ExceptionHandlingWebHandler]
Original Stack Trace:
        at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:111) ~[na:na]
        at software.amazon.awssdk.core.exception.SdkClientException.create(SdkClientException.java:47) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.utils.RetryableStageHelper.setLastException(RetryableStageHelper.java:223) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:83) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:36) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
        at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:56) ~[na:na]
        at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:36) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:42) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:48) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:31) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37) ~[na:na]
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26) ~[na:na]
        at software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:193) ~[na:na]
        at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:103) ~[na:na]
        at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.doExecute(BaseSyncClientHandler.java:171) ~[na:na]
        at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.lambda$execute$1(BaseSyncClientHandler.java:82) ~[na:na]
        at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.measureApiCallSuccess(BaseSyncClientHandler.java:179) ~[na:na]
        at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) ~[na:na]
        at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) ~[na:na]
        at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) ~[na:na]
        at software.amazon.awssdk.services.s3.DefaultS3Client.headObject(DefaultS3Client.java:5438) ~[na:na]
        at run.halo.s3os.S3OsAttachmentHandler.lambda$checkFileExistsAndRename$29(S3OsAttachmentHandler.java:392) ~[na:na]
        at reactor.core.publisher.MonoSupplier$MonoSupplierSubscription.request(MonoSupplier.java:126) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2341) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.MonoSupplier.subscribe(MonoSupplier.java:48) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:77) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:46) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.Mono.subscribe(Mono.java:4480) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onComplete(FluxConcatArray.java:258) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.FluxConcatArray.subscribe(FluxConcatArray.java:78) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.MonoUsing.subscribe(MonoUsing.java:109) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.Mono.subscribe(Mono.java:4495) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.11.jar:3.5.11]
        at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.11.jar:3.5.11]
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
        at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
Caused by: javax.net.ssl.SSLPeerUnverifiedException: Certificate for <oneimg.oneimg.s3.api.upyun.com> doesn't match any of the subject alternative names: [*.s3.api.upyun.com, s3.api.upyun.com]
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:507) ~[na:na]
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:437) ~[na:na]
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384) ~[na:na]
    at software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory.connectSocket(SdkTlsSocketFactory.java:65) ~[na:na]
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[na:na]
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[na:na]
    at software.amazon.awssdk.http.apache.internal.conn.ClientConnectionManagerFactory$DelegatingHttpClientConnectionManager.connect(ClientConnectionManagerFactory.java:86) ~[na:na]
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[na:na]
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[na:na]
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[na:na]
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[na:na]
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[na:na]
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[na:na]
    at software.amazon.awssdk.http.apache.internal.impl.ApacheSdkHttpClient.execute(ApacheSdkHttpClient.java:72) ~[na:na]
    at software.amazon.awssdk.http.apache.ApacheHttpClient.execute(ApacheHttpClient.java:254) ~[na:na]
    at software.amazon.awssdk.http.apache.ApacheHttpClient.access$500(ApacheHttpClient.java:104) ~[na:na]
    at software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:231) ~[na:na]
    at software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:228) ~[na:na]
    at software.amazon.awssdk.core.internal.util.MetricUtils.measureDurationUnsafe(MetricUtils.java:63) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.executeHttpRequest(MakeHttpRequestStage.java:77) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:56) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:39) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:73) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:42) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:78) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:40) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:50) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:36) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:81) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:36) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
    at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:56) ~[na:na]
    at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:36) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:42) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:48) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:31) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37) ~[na:na]
    at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26) ~[na:na]
    at software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:193) ~[na:na]
    at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:103) ~[na:na]
    at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.doExecute(BaseSyncClientHandler.java:171) ~[na:na]
    at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.lambda$execute$1(BaseSyncClientHandler.java:82) ~[na:na]
    at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.measureApiCallSuccess(BaseSyncClientHandler.java:179) ~[na:na]
    at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) ~[na:na]
    at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) ~[na:na]
    at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) ~[na:na]
    at software.amazon.awssdk.services.s3.DefaultS3Client.headObject(DefaultS3Client.java:5438) ~[na:na]
    at run.halo.s3os.S3OsAttachmentHandler.lambda$checkFileExistsAndRename$29(S3OsAttachmentHandler.java:392) ~[na:na]
    at reactor.core.publisher.MonoSupplier$MonoSupplierSubscription.request(MonoSupplier.java:126) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2341) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.MonoSupplier.subscribe(MonoSupplier.java:48) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:77) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:46) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.Mono.subscribe(Mono.java:4480) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onComplete(FluxConcatArray.java:258) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.FluxConcatArray.subscribe(FluxConcatArray.java:78) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.MonoUsing.subscribe(MonoUsing.java:109) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.Mono.subscribe(Mono.java:4495) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.11.jar:3.5.11]
    at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.11.jar:3.5.11]
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
    at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
xzyone commented 12 months ago

对,是无法上传的,所以我删除了这个策略,改为使用了s3,但现在他还一直在刷新。

我刚刚重新配置了UPyun的存储策略,并成功上传文件。但现在在头像设置页面还在刷新。

JohnNiang commented 12 months ago

Hi @xzyone ,看看是否需要重新设置一下头像的存储位置,设置路径:设置 -> 用户设置 -> 头像存储位置

xzyone commented 12 months ago

试过了😂设置upyun,或者设置为本地、s3的都不行。 我可以给您个权限,您来测试一下?

guqing commented 11 months ago

Hi @xzyone 可以提供一个复现步骤吗,我无法复现此问题

xzyone commented 11 months ago

Hi @xzyone 可以提供一个复现步骤吗,我无法复现此问题

成功复现。

又拍云插件除了上传目录一栏,其他配置项都要正确配置,上传目录一栏填写“/${year}/${month}/${day}”,然后在个人资料页面设置头像,点提交就会出现这个问题。

另外,现在又拍云支持s3协议了,用s3插件很完美,建议下架又拍云插件。

guqing commented 11 months ago

成功复现了,https://github.com/AirboZH/plugin-uposs 并不是 halo 官方提供的插件,已经归档了没有在维护,不适合新版本的 halo,attachmentService.getPermalink 是后续添加的而 plugin-uposs 没有适配这个方法导致无法得到期望的结果,关键代码如下: https://github.com/halo-dev/halo/blob/aa9f84ea6f90de70b4ec8cfb5b7976f5b948659e/application/src/main/java/run/halo/app/core/extension/reconciler/UserReconciler.java#L84-L87

因此不建议在 halo 新版本中使用此插件,不过 console 可以考虑处理一下异常情况,比如上传后获取不到头像链接等待一定时间后就停止请求转而提示用户异常,避免异常情况下无法弥补的问题

guqing commented 11 months ago

/kind improvement

xzyone commented 11 months ago

bravo

xzyone commented 11 months ago

不好意思没看到新标签

ruibaby commented 9 months ago

/assign