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

恢复重启失败 #6443

Closed
yangshifei opened this issue Aug 6, 2024 · 6 comments · Fixed by #6753
Closed

恢复重启失败 #6443

yangshifei opened this issue Aug 6, 2024 · 6 comments · Fixed by #6753
Assignees
Labels
kind/support Categorizes issue or PR as a support question.
Milestone

Comments

@yangshifei
Copy link

系统信息

使用的哪种方式运行?

Docker

发生了什么?

恢复重启报错

复现步骤

No response

相关日志输出

halo-1    | 2024-08-06T17:00:52.587+08:00 ERROR 6 --- [    restartMain] run.halo.app.actuator.RestartEndpoint    : Failed to restart.
halo-1    |
halo-1    | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luceneSearchEngine' defined in class path resource [run/halo/app/config/HaloConfiguration.class]: org.apache.lucene.index.CorruptIndexException: file mismatch, expected id=5dwap95plonp9cu0a9m8erzzs, got=5c7joop4zy1eflcwflxtprpq4 (resource=BufferedChecksumIndexInput(MemorySegmentIndexInput(path="/root/.halo2/indices/halo/_1.si")))
halo-1    |     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:962) ~[spring-context-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) ~[spring-context-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-3.3.1.jar:3.3.1]
halo-1    |     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.3.1.jar:3.3.1]
halo-1    |     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.3.1.jar:3.3.1]
halo-1    |     at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) ~[spring-boot-3.3.1.jar:3.3.1]
halo-1    |     at run.halo.app.actuator.RestartEndpoint.doRestart(RestartEndpoint.java:48) ~[classes/:2.18.0]
halo-1    |     at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
halo-1    | Caused by: java.lang.RuntimeException: org.apache.lucene.index.CorruptIndexException: file mismatch, expected id=5dwap95plonp9cu0a9m8erzzs, got=5c7joop4zy1eflcwflxtprpq4 (resource=BufferedChecksumIndexInput(MemorySegmentIndexInput(path="/root/.halo2/indices/halo/_1.si")))
halo-1    |     at run.halo.app.search.lucene.LuceneSearchEngine.afterPropertiesSet(LuceneSearchEngine.java:249) ~[classes/:2.18.0]
halo-1    |     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1835) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) ~[spring-beans-6.1.10.jar:6.1.10]
halo-1    |     ... 15 common frames omitted
halo-1    | Caused by: org.apache.lucene.index.CorruptIndexException: file mismatch, expected id=5dwap95plonp9cu0a9m8erzzs, got=5c7joop4zy1eflcwflxtprpq4 (resource=BufferedChecksumIndexInput(MemorySegmentIndexInput(path="/root/.halo2/indices/halo/_1.si")))
halo-1    |     at org.apache.lucene.codecs.CodecUtil.checkIndexHeaderID(CodecUtil.java:371) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |     at org.apache.lucene.codecs.CodecUtil.checkIndexHeader(CodecUtil.java:255) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |     at org.apache.lucene.codecs.lucene99.Lucene99SegmentInfoFormat.read(Lucene99SegmentInfoFormat.java:98) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |     at org.apache.lucene.index.SegmentInfos.parseSegmentInfos(SegmentInfos.java:411) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |     at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:368) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |     at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:304) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |     at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:293) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |     at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1088) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |     at run.halo.app.search.lucene.LuceneSearchEngine.afterPropertiesSet(LuceneSearchEngine.java:245) ~[classes/:2.18.0]
halo-1    |     ... 17 common frames omitted
halo-1    |     Suppressed: org.apache.lucene.index.CorruptIndexException: checksum passed (ae510). possibly transient resource issue, or a Lucene or JVM bug (resource=BufferedChecksumIndexInput(MemorySegmentIndexInput(path="/root/.halo2/indices/halo/_1.si")))
halo-1    |             at org.apache.lucene.codecs.CodecUtil.checkFooter(CodecUtil.java:501) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |             at org.apache.lucene.codecs.lucene99.Lucene99SegmentInfoFormat.read(Lucene99SegmentInfoFormat.java:104) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |             ... 23 common frames omitted
halo-1    |     Suppressed: org.apache.lucene.index.CorruptIndexException: checksum passed (42757b45). possibly transient resource issue, or a Lucene or JVM bug (resource=BufferedChecksumIndexInput(MemorySegmentIndexInput(path="/root/.halo2/indices/halo/segments_1")))
halo-1    |             at org.apache.lucene.codecs.CodecUtil.checkFooter(CodecUtil.java:501) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |             at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:375) ~[lucene-core-9.11.1.jar:9.11.1 0c087dfdd10e0f6f3f6faecc6af4415e671a9e69 - 2024-06-23 12:31:02]
halo-1    |             ... 21 common frames omitted
halo-1    |

附加信息

No response

@JohnNiang
Copy link
Member

建议删除 ~/.halo2/indices 后重启即可。

@ruibaby
Copy link
Member

ruibaby commented Aug 7, 2024

/kind support

@f2c-ci-robot f2c-ci-robot bot added the kind/support Categorizes issue or PR as a support question. label Aug 7, 2024
@JohnNiang
Copy link
Member

/close

If the issue persists, feel free to reopen it.

@f2c-ci-robot f2c-ci-robot bot closed this as completed Aug 13, 2024
Copy link

f2c-ci-robot bot commented Aug 13, 2024

@JohnNiang: Closing this issue.

In response to this:

/close

If the issue persists, feel free to reopen it.

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.

@JohnNiang
Copy link
Member

/reopen

为解决该问题,我们可以尝试优化以下几点:

  1. 备份时忽略索引目录 indices/**
  2. 恢复时同样忽略索引目录 indices/**

@f2c-ci-robot f2c-ci-robot bot reopened this Sep 4, 2024
Copy link

f2c-ci-robot bot commented Sep 4, 2024

@JohnNiang: Reopened this issue.

In response to this:

/reopen

为解决该问题,我们可以尝试优化以下几点:

  1. 备份时忽略索引目录 indices/**
  2. 恢复时同样忽略索引目录 indices/**

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.

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

Successfully merging a pull request may close this issue.

3 participants