Skip to content
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

从2.9.0升级到2.10.0后,博客所有前台页面状态码为500,但console可以正常访问 #4673

Closed
chiyu-46 opened this issue Sep 29, 2023 · 6 comments
Labels
area/core Issues or PRs related to the Halo Core kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@chiyu-46
Copy link

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

halo:2.10.0-alpha.1

使用的什么数据库?

H2

使用的哪种方式运行?

Docker

在线站点地址

https://blog.chiyustudio.link/

发生了什么?

从2.9.0升级到2.10.0后,博客所有前台页面状态码为500,但console可以正常访问。
从Docker的日志看,好像和SLF4J有关。

相关日志输出

……
SLF4J: A SLF4J service provider failed to instantiate:
org.slf4j.spi.SLF4JServiceProvider: ch.qos.logback.classic.spi.LogbackServiceProvider not a subtype
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
……
org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'run.halo.app.theme.dialect.GlobalHeadInjectionProcessor' (template: "layout" - line 3, col 3)
……
Caused by: java.lang.ClassCastException: class com.fasterxml.jackson.databind.node.ObjectNode cannot be cast to class com.fasterxml.jackson.databind.JsonNode (com.fasterxml.jackson.databind.node.ObjectNode is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @87aac27; com.fasterxml.jackson.databind.JsonNode is in unnamed module of loader org.pf4j.PluginClassLoader @742ba594)
……
2023-09-29T14:34:31.265+08:00 ERROR 7 --- [oundedElastic-2] o.t.spring6.SpringWebFluxTemplateEngine  : [THYMELEAF][boundedElastic-2] Exception processing template "index": Error during execution of processor 'run.halo.app.theme.dialect.GlobalHeadInjectionProcessor' (template: "layout" - line 3, col 3)
……
org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'run.halo.app.theme.dialect.GlobalHeadInjectionProcessor' (template: "layout" - line 3, col 3)
……
Caused by: java.lang.ClassCastException: class com.fasterxml.jackson.databind.node.ObjectNode cannot be cast to class com.fasterxml.jackson.databind.JsonNode (com.fasterxml.jackson.databind.node.ObjectNode is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @87aac27; com.fasterxml.jackson.databind.JsonNode is in unnamed module of loader org.pf4j.PluginClassLoader @742ba594)
……
2023-09-29T14:34:31.356+08:00 ERROR 7 --- [oundedElastic-2] a.w.r.e.AbstractErrorWebExceptionHandler : [619d0223-3]  500 Server Error for HTTP GET "/"

org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'run.halo.app.theme.dialect.GlobalHeadInjectionProcessor' (template: "layout" - line 3, col 3)
	at org.thymeleaf.processor.element.AbstractElementModelProcessor.process(AbstractElementModelProcessor.java:141) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
	*__checkpoint ⇢ Handler run.halo.app.theme.router.factories.IndexRouteFactory$$Lambda$2429/0x00007f819fa98450@291be803 [DispatcherHandler]
	*__checkpoint ⇢ run.halo.app.cache.PageCacheWebFilter [DefaultWebFilterChain]
	*__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 ⇢ HaloAnonymousAuthenticationWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.web.filter.reactive.ServerHttpObservationFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ HTTP GET "/" [ExceptionHandlingWebHandler]
Original Stack Trace:
		at org.thymeleaf.processor.element.AbstractElementModelProcessor.process(AbstractElementModelProcessor.java:141) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.util.ProcessorConfigurationUtils$ElementModelProcessorWrapper.process(ProcessorConfigurationUtils.java:649) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1510) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.Model.process(Model.java:282) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.Model.process(Model.java:290) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.GatheringModelProcessable.process(GatheringModelProcessable.java:78) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.ProcessorTemplateHandler.handleCloseElement(ProcessorTemplateHandler.java:1640) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.CloseElementTag.beHandled(CloseElementTag.java:139) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.Model.process(Model.java:282) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1587) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.TemplateModel.process(TemplateModel.java:136) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:661) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1103) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1077) ~[thymeleaf-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at org.thymeleaf.spring6.SpringWebFluxTemplateEngine.lambda$createFullStream$0(SpringWebFluxTemplateEngine.java:198) ~[thymeleaf-spring6-3.1.2.RELEASE.jar:3.1.2.RELEASE]
		at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:58) ~[reactor-core-3.5.10.jar:3.5.10]
		at reactor.core.publisher.Mono.subscribe(Mono.java:4495) ~[reactor-core-3.5.10.jar:3.5.10]
		at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.10.jar:3.5.10]
		at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.10.jar:3.5.10]
		at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.10.jar:3.5.10]
		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: java.lang.ClassCastException: class com.fasterxml.jackson.databind.node.ObjectNode cannot be cast to class com.fasterxml.jackson.databind.JsonNode (com.fasterxml.jackson.databind.node.ObjectNode is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @87aac27; com.fasterxml.jackson.databind.JsonNode is in unnamed module of loader org.pf4j.PluginClassLoader @742ba594)
	at java.base/java.lang.Iterable.forEach(Unknown Source) ~[na:na]

附加信息

No response

@JohnNiang
Copy link
Member

这个问题我会尝试复现并解决。

另外,2.10.0 只发布了 alpha 版本,不建议在生产环境下使用,建议先撤回到 2.9.2。

@chiyu-46
Copy link
Author

修正一下,数据库使用的是PostgreSQL 15.3,不是H2

@ruibaby ruibaby added kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. area/core Issues or PRs related to the Halo Core labels Oct 7, 2023
@JohnNiang
Copy link
Member

JohnNiang commented Oct 8, 2023

我这里无法正常复现。从日志中看,可能是因为某些插件引起的问题,可能还需要提供一下当前安装的插件以复现这个问题。

同时,期望能够提供更完整的日志。

@LIlGG
Copy link
Member

LIlGG commented Oct 10, 2023

应该是使用了 Live2d 插件导致的,但目前不知道什么原因,正在排查

@LIlGG
Copy link
Member

LIlGG commented Oct 10, 2023

https://www.halo.run/store/apps/app-oPNFQ?tab=releases

Live2d 插件已经发布最新版,修复了这个问题。

/close

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Oct 10, 2023

@LIlGG: Closing this issue.

In response to this:

https://www.halo.run/store/apps/app-oPNFQ?tab=releases

Live2d 插件已经发布最新版,修复了这个问题。

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@f2c-ci-robot f2c-ci-robot bot closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

No branches or pull requests

4 participants