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

同版本使用docker部署挂载原数据文件夹报错 #5045

Closed
TtBJSH opened this issue Dec 13, 2023 · 5 comments
Closed

同版本使用docker部署挂载原数据文件夹报错 #5045

TtBJSH opened this issue Dec 13, 2023 · 5 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@TtBJSH
Copy link

TtBJSH commented Dec 13, 2023

系统信息

halo2.7

使用的哪种方式运行?

Docker

在线站点地址

https://tonehub.cn:9590/

发生了什么?

一开始使用docker部署的halo2.7版本,正常运行有多篇博客,前段时间突然崩掉了,但挂载了本地数据,现在重新拉取镜像,重新运行数据,挂载原有数据文件无法启动。

相关日志输出

__  __      __
   / / / /___ _/ /___
  / /_/ / __ `/ / __ \
 / __  / /_/ / / /_/ /
/_/ /_/\__,_/_/\____/

Version: 2.7.0
2023-12-13T20:16:29.972+08:00  INFO 7 --- [           main] run.halo.app.Application                 : Starting Application v2.7.0 using Java 17.0.7 with PID 7 (/application/BOOT-INF/classes started by root in /application)
2023-12-13T20:16:29.988+08:00  INFO 7 --- [           main] run.halo.app.Application                 : No active profile set, falling back to 1 default profile: "default"
2023-12-13T20:16:33.510+08:00  INFO 7 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2023-12-13T20:16:33.515+08:00  INFO 7 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data R2DBC repositories in DEFAULT mode.
2023-12-13T20:16:33.948+08:00  INFO 7 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 408 ms. Found 1 R2DBC repository interfaces.
2023-12-13T20:16:39.584+08:00  INFO 7 --- [           main] org.pf4j.DefaultPluginStatusProvider     : Enabled plugins: []
2023-12-13T20:16:39.589+08:00  INFO 7 --- [           main] org.pf4j.DefaultPluginStatusProvider     : Disabled plugins: []
2023-12-13T20:16:39.596+08:00  INFO 7 --- [           main] org.pf4j.DefaultPluginManager            : PF4J version 3.9.0 in 'deployment' mode
2023-12-13T20:16:44.596+08:00  INFO 7 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 5 endpoint(s) beneath base path '/actuator'
2023-12-13T20:16:49.426+08:00  WARN 7 --- [           main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'r2dbcScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/R2dbcInitializationConfiguration.class]: Failed to execute database script
2023-12-13T20:16:49.431+08:00  INFO 7 --- [           main] r.h.a.e.c.DefaultControllerManager       : Shutting down 0 controllers...
2023-12-13T20:16:49.432+08:00  INFO 7 --- [           main] r.h.a.e.c.DefaultControllerManager       : Shutdown 0 controllers.
2023-12-13T20:16:49.433+08:00  INFO 7 --- [           main] r.h.a.e.controller.DefaultController     : Disposing controller garbage-collector-controller
2023-12-13T20:16:49.434+08:00  INFO 7 --- [           main] r.h.a.e.controller.DefaultController     : Controller garbage-collector-controller is disposed
2023-12-13T20:16:49.485+08:00  INFO 7 --- [           main] .s.b.a.l.ConditionEvaluationReportLogger : 

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2023-12-13T20:16:49.523+08:00 ERROR 7 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'r2dbcScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/R2dbcInitializationConfiguration.class]: Failed to execute database script
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-6.0.10.jar:6.0.10]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598) ~[spring-beans-6.0.10.jar:6.0.10]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) ~[spring-beans-6.0.10.jar:6.0.10]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.10.jar:6.0.10]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.10.jar:6.0.10]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.10.jar:6.0.10]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.10.jar:6.0.10]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973) ~[spring-beans-6.0.10.jar:6.0.10]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:941) ~[spring-context-6.0.10.jar:6.0.10]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608) ~[spring-context-6.0.10.jar:6.0.10]
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:436) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:150) ~[spring-boot-3.1.1.jar:3.1.1]
	at run.halo.app.Application.main(Application.java:28) ~[classes/:2.7.0]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[application/:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:95) ~[application/:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[application/:na]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[application/:na]
Caused by: org.springframework.r2dbc.connection.init.UncategorizedScriptException: Failed to execute database script
	at org.springframework.r2dbc.connection.init.DatabasePopulator.lambda$populate$4(DatabasePopulator.java:65) ~[spring-r2dbc-6.0.10.jar:6.0.10]
	at reactor.core.publisher.Mono.lambda$onErrorMap$27(Mono.java:3769) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Mono.lambda$onErrorResume$29(Mono.java:3859) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoUsingWhen$ResourceSubscriber.onError(MonoUsingWhen.java:203) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:106) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Operators.error(Operators.java:198) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoError.subscribe(MonoError.java:53) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4495) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:106) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxRetry$RetrySubscriber.onError(FluxRetry.java:95) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onError(MonoFlatMap.java:180) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.pool.AbstractPool$Borrower.fail(AbstractPool.java:475) ~[reactor-pool-1.0.0.jar:1.0.0]
	at reactor.pool.SimpleDequePool.lambda$drainLoop$9(SimpleDequePool.java:429) ~[reactor-pool-1.0.0.jar:1.0.0]
	at reactor.core.publisher.FluxDoOnEach$DoOnEachSubscriber.onError(FluxDoOnEach.java:186) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onError(FluxMapFuseable.java:340) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoSupplier$MonoSupplierSubscription.request(MonoSupplier.java:134) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.request(FluxMapFuseable.java:360) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxDoOnEach$DoOnEachSubscriber.request(FluxDoOnEach.java:108) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2341) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onSubscribe(FluxContextWrite.java:101) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxDoOnEach$DoOnEachSubscriber.onSubscribe(FluxDoOnEach.java:121) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onSubscribe(FluxMapFuseable.java:265) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoSupplier.subscribe(MonoSupplier.java:48) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4495) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onComplete(FluxConcatArray.java:258) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxConcatArray.subscribe(FluxConcatArray.java:78) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Flux.subscribe(Flux.java:8773) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Flux.subscribeWith(Flux.java:8894) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Flux.subscribe(Flux.java:8739) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Flux.subscribe(Flux.java:8663) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.pool.SimpleDequePool.drainLoop(SimpleDequePool.java:451) ~[reactor-pool-1.0.0.jar:1.0.0]
	at reactor.pool.SimpleDequePool.pendingOffer(SimpleDequePool.java:598) ~[reactor-pool-1.0.0.jar:1.0.0]
	at reactor.pool.SimpleDequePool.doAcquire(SimpleDequePool.java:294) ~[reactor-pool-1.0.0.jar:1.0.0]
	at reactor.pool.AbstractPool$Borrower.request(AbstractPool.java:430) ~[reactor-pool-1.0.0.jar:1.0.0]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2341) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2215) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.pool.SimpleDequePool$QueueBorrowerMono.subscribe(SimpleDequePool.java:716) ~[reactor-pool-1.0.0.jar:1.0.0]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxRetry$RetrySubscriber.resubscribe(FluxRetry.java:117) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoRetry.subscribeOrReturn(MonoRetry.java:50) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4480) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onError(MonoFlatMap.java:180) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxMap$MapSubscriber.onError(FluxMap.java:134) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Operators.error(Operators.java:198) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoError.subscribe(MonoError.java:53) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoDeferContextual.subscribe(MonoDeferContextual.java:55) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4495) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.MonoUsingWhen.subscribe(MonoUsingWhen.java:96) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4495) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.Mono.block(Mono.java:1711) ~[reactor-core-3.5.7.jar:3.5.7]
	at org.springframework.boot.r2dbc.init.R2dbcScriptDatabaseInitializer.runScripts(R2dbcScriptDatabaseInitializer.java:68) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.runScripts(AbstractScriptDatabaseInitializer.java:146) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.applyScripts(AbstractScriptDatabaseInitializer.java:108) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.applySchemaScripts(AbstractScriptDatabaseInitializer.java:98) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.initializeDatabase(AbstractScriptDatabaseInitializer.java:76) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.afterPropertiesSet(AbstractScriptDatabaseInitializer.java:66) ~[spring-boot-3.1.1.jar:3.1.1]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1816) ~[spring-beans-6.0.10.jar:6.0.10]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766) ~[spring-beans-6.0.10.jar:6.0.10]
	... 23 common frames omitted
	Suppressed: java.lang.Exception: #block terminated with an error
		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:102) ~[reactor-core-3.5.7.jar:3.5.7]
		at reactor.core.publisher.Mono.block(Mono.java:1712) ~[reactor-core-3.5.7.jar:3.5.7]
		... 31 common frames omitted
Caused by: org.springframework.dao.DataAccessResourceFailureException: Failed to obtain R2DBC Connection
	at org.springframework.r2dbc.connection.ConnectionFactoryUtils.lambda$getConnection$0(ConnectionFactoryUtils.java:90) ~[spring-r2dbc-6.0.10.jar:6.0.10]
	at reactor.core.publisher.Mono.lambda$onErrorMap$28(Mono.java:3783) ~[reactor-core-3.5.7.jar:3.5.7]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94) ~[reactor-core-3.5.7.jar:3.5.7]
	... 79 common frames omitted
Caused by: io.r2dbc.spi.R2dbcNonTransientResourceException: File corrupted while reading record: "/root/.halo2/db/halo-next.mv.db". Possible solution: use the recovery tool [90030-214]
	at io.r2dbc.h2.H2DatabaseExceptionFactory.convert(H2DatabaseExceptionFactory.java:76) ~[r2dbc-h2-1.0.0.RELEASE.jar:1.0.0.RELEASE]
	at io.r2dbc.h2.H2ConnectionFactory.getSessionClient(H2ConnectionFactory.java:119) ~[r2dbc-h2-1.0.0.RELEASE.jar:1.0.0.RELEASE]
	at io.r2dbc.h2.H2ConnectionFactory.lambda$new$0(H2ConnectionFactory.java:53) ~[r2dbc-h2-1.0.0.RELEASE.jar:1.0.0.RELEASE]
	at reactor.core.publisher.MonoSupplier$MonoSupplierSubscription.request(MonoSupplier.java:126) ~[reactor-core-3.5.7.jar:3.5.7]
	... 71 common frames omitted
Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: File corrupted while reading record: "/root/.halo2/db/halo-next.mv.db". Possible solution: use the recovery tool [90030-214]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:678) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.message.DbException.get(DbException.java:212) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:166) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.mvstore.db.Store.<init>(Store.java:145) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.engine.Database.<init>(Database.java:324) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.engine.Engine.openSession(Engine.java:92) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.engine.Engine.openSession(Engine.java:222) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.engine.Engine.createSession(Engine.java:201) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338) ~[h2-2.1.214.jar:2.1.214]
	at io.r2dbc.h2.client.SessionClient.<init>(SessionClient.java:58) ~[r2dbc-h2-1.0.0.RELEASE.jar:1.0.0.RELEASE]
	at io.r2dbc.h2.H2ConnectionFactory.getSessionClient(H2ConnectionFactory.java:117) ~[r2dbc-h2-1.0.0.RELEASE.jar:1.0.0.RELEASE]
	... 73 common frames omitted
Caused by: org.h2.mvstore.MVStoreException: File is corrupted - unable to recover a valid set of chunks [2.1.214/6]
	at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:1038) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.mvstore.MVStore.<init>(MVStore.java:463) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.mvstore.MVStore$Builder.open(MVStore.java:4082) ~[h2-2.1.214.jar:2.1.214]
	at org.h2.mvstore.db.Store.<init>(Store.java:136) ~[h2-2.1.214.jar:2.1.214]
	... 80 common frames omitted

附加信息

No response

@TtBJSH
Copy link
Author

TtBJSH commented Dec 13, 2023

原来的低版本没有文件备份,怎样才能恢复以前的数据啊

@JohnNiang
Copy link
Member

JohnNiang commented Dec 13, 2023

Hi @TtBJSH ,感谢在这里反馈问题!

/kind support

如果出现了 H2 数据库损毁的问题,我们暂时无能为力,所以我们在官方文档中有提示“不建议在生产环境下使用 H2 数据库”。如果数据很重要的话,可以尝试将 /root/.halo2/db/halo-next.mv.db 发送到我的邮箱(johnniang#halo.run),我尝试使用 H2 的 Recovery Tool 看能否修复(不一定能成功)。

@f2c-ci-robot f2c-ci-robot bot added the kind/support Categorizes issue or PR as a support question. label Dec 13, 2023
@TtBJSH TtBJSH closed this as completed Dec 14, 2023
@TtBJSH
Copy link
Author

TtBJSH commented Dec 14, 2023

你好@TtBJSH,感谢这里反馈问题!

/善意的支持

如果出现 H2 数据库损坏损坏的问题,我们暂时无休止力,所以我们在官方文档中有提示“不建议在生产环境下使用 H2 数据库”。如果数据很重要的话,可以尝试将其发送到我的邮箱/root/.halo2/db/halo-next.mv.dbjohnniang#halo.run),我尝试使用H2的恢复工具看能否修复(不一定能成功)。

非常感谢,已发送至 johnniang#foxmail.com

@JohnNiang
Copy link
Member

Hi @TtBJSH ,非常抱歉,我已经尽我所能,但仍旧无法恢复。

page size total: 6827327 bytes, page count: 16571, average page size: 412 bytes
map 0: 1084834 bytes, 15%
map 1: 1330 bytes, 0%
map 2: 50420 bytes, 0%
map 5: 537 bytes, 0%
map 6: 26301 bytes, 0%
map 7: 1390040 bytes, 20%
map 8: 2997557 bytes, 43%
map 9: 1077948 bytes, 15%
map b: 118063 bytes, 1%
map c: 80297 bytes, 1%
ERROR: org.h2.mvstore.MVStoreException: File is corrupted - unable to recover a valid set of chunks [2.1.214/6]
org.h2.mvstore.MVStoreException: File is corrupted - unable to recover a valid set of chunks [2.1.214/6]
        at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004)
        at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:1038)
        at org.h2.mvstore.MVStore.<init>(MVStore.java:463)
        at org.h2.mvstore.MVStore$Builder.open(MVStore.java:4082)
        at org.h2.mvstore.MVStoreTool.info(MVStoreTool.java:352)
        at org.h2.tools.Recover.process(Recover.java:243)
        at org.h2.tools.Recover.execute(Recover.java:226)
        at run.halo.child.Main.main(Main.java:9)

建议:

  1. 不要在生产环境下使用 H2 数据库。
  2. 无论使用哪种数据库,勤备份。

@TtBJSH
Copy link
Author

TtBJSH commented Dec 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

2 participants