CorruptIndexException

Trying to run docker compose file:

services:
  postgres-sonarqube:
    image: postgres:13.6
    container_name: postgres-sonarqube
    ports:
      - 5432:5432
    environment: 
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=pass
    volumes:
      - postgres-sonarqube_data:/var/lib/postgresql/data
  sonarqube:
    links: 
      - "postgres-sonarqube:database"
    image: sonarqube:8.9-community
    container_name: sonarqube
    depends_on:
      - postgres-sonarqube
    ports:
      - 9000:9000
    environment: 
      - sonar.jdbc.username=user
      - sonar.jdbc.password=pass
      - sonar.jdbc.url=jdbc:postgresql://database:5432/sonar
    volumes:
      - sonarqube_data:/opt/sonarqube/data
      - sonarqube_extensions:/opt/sonarqube/extensions
      - sonarqube_logs:/opt/sonarqube/logs
      - sonarqube_conf:/opt/sonarqube/conf
volumes:
  sonarqube_data:
  sonarqube_extensions:
  sonarqube_logs:
  sonarqube_conf:
  postgres-sonarqube_data:

But I get this error:

sonarqube           | 2022.05.10 11:31:55 INFO  es[][o.e.n.Node] initialized
sonarqube           | 2022.05.10 11:31:55 INFO  es[][o.e.n.Node] starting ...
sonarqube           | 2022.05.10 11:31:55 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:39527}, bound_addresses {127.0.0.1:39527}
sonarqube           | 2022.05.10 11:31:55 ERROR es[][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]
sonarqube           | org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to load metadata]; nested: CorruptIndexException[checksum failed (hardware problem?) : expected=173a5c42 actual=c9817ca1 (resource=BufferedChecksumIndexInput(NIOFSIndexInput(path="/opt/sonarqube/data/es7/nodes/0/_state/_0.fdt")))];
sonarqube           |   at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) ~[elasticsearch-cli-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.cli.Command.main(Command.java:77) ~[elasticsearch-cli-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           | Caused by: org.elasticsearch.ElasticsearchException: failed to load metadata
sonarqube           |   at org.elasticsearch.gateway.GatewayMetaState.start(GatewayMetaState.java:197) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.node.Node.start(Node.java:1185) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:335) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:443) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           |   at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166) ~[elasticsearch-7.16.2.jar:7.16.2]
sonarqube           |   ... 6 more
sonarqube           | Caused by: org.apache.lucene.index.CorruptIndexException: checksum failed (hardware problem?) : expected=173a5c42 actual=c9817ca1 (resource=BufferedChecksumIndexInput(NIOFSIndexInput(path="/opt/sonarqube/data/es7/nodes/0/_state/_0.fdt")))
sonarqube           |   at org.apache.lucene.codecs.CodecUtil.checkFooter(CodecUtil.java:419) ~[lucene-core-8.10.1.jar:8.10.1 2f24e6a49d48a032df1f12e146612f59141727a9 - mayyasharipova - 2021-10-12 15:13:05]
sonarqube           |   at org.apache.lucene.codecs.lucene50.Lucene50CompoundFormat.write(Lucene50CompoundFormat.java:100) ~[lucene-core-8.10.1.jar:8.10.1 2f24e6a49d48a032df1f12e146612f59141727a9 - mayyasharipova - 2021-10-12 15:13:55]
sonarqube           |   at org.apache.lucene.index.IndexWriter.createCompoundFile(IndexWriter.java:5313) ~[lucene-core-8.10.1.jar:8.10.1 2f24e6a49d48a032df1f12e146612f59141727a9 - mayyasharipova - 2021-10-12 15:13:05]

1 Like

Hi,

It looks like you’re impacted by this issue.

 
Ann

1 Like

Thanks Ann!! Very helpful!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.