Skip to content

Indexing failing with No such file or directory error in newer version of opengrok #4873

@jkjha

Description

@jkjha

Describe the bug
Indexing failing for projects with the newer version of opengrok.

This setup was working fine earlier, but after upgrading the OpenGrok version, I’ve started seeing indexing failures across multiple projects.

For instance, in this specific project, the indexing fails with the error shown below. However, to unblock the user, I created a copy of the same project, and indexing works correctly there.

Could you please check if any recent changes might be causing this issue?
For reference, the repository size of this project is around 12 GB, and it’s an existing project that used to index successfully before the upgrade.

2025-10-15 02:08:50.310+0000 FINE t65 DefaultIndexChangedListener.fileRemove: Remove: '/example_project-github/third_party/photon/docs/photon_troubleshoot/photonos-logo-sm.png'
2025-10-15 02:09:13.164+0000 SEVERE t65 Indexer.lambda$doIndexerExecution$59: An error occurred while updating index
java.io.FileNotFoundException: /opengrok/src/example_project-github/abc-core/java-toolkit/java-runtime/restdoc/src/main/templates/restdoc/static/images/ui-bg_flat_75_ffffff_40x100.png (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152)
	at org.opengrok.indexer.index.IndexDatabase.getAnalyzerFor(IndexDatabase.java:1265)
	at org.opengrok.indexer.index.IndexDatabase.checkSettings(IndexDatabase.java:2296)
	at org.opengrok.indexer.index.IndexDatabase.processFileHistoryBased(IndexDatabase.java:1694)
	at org.opengrok.indexer.index.IndexDatabase.indexDownUsingHistory(IndexDatabase.java:930)
	at org.opengrok.indexer.index.IndexDatabase.getIndexDownArgs(IndexDatabase.java:845)
	at org.opengrok.indexer.index.IndexDatabase.update(IndexDatabase.java:657)
	at org.opengrok.indexer.index.Indexer.lambda$doIndexerExecution$59(Indexer.java:1246)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

2025-10-15 02:09:13.167+0000 SEVERE t1 Indexer.runMain: Indexer failed with IndexerException
2025-10-15 02:09:13.167+0000 INFO t1 Indexer.runMain: Suppressed exceptions (1 in total):
2025-10-15 02:09:13.167+0000 INFO t1 Indexer.runMain: 1: /opengrok/src/example_project-github/abc-core/java-toolkit/java-runtime/restdoc/src/main/templates/restdoc/static/images/ui-bg_flat_75_ffffff_40x100.png (No such file or directory)
2025-10-15 02:09:13.168+0000 INFO t1 Statistics.logIt: Indexer finished (took 0:17:00)
2025-10-15 02:09:13.168+0000 FINE t1 Shutdown.logRuntimeExit: Runtime.exit() called with status: 1
java.lang.Throwable: Runtime.exit(1)
	at java.base/java.lang.Shutdown.logRuntimeExit(Shutdown.java:179)
	at java.base/java.lang.Shutdown.exit(Shutdown.java:160)
	at java.base/java.lang.Runtime.exit(Runtime.java:188)
	at java.base/java.lang.System.exit(System.java:1920)
	at org.opengrok.indexer.index.Indexer.main(Indexer.java:170)

Opengrok Version in use: 1.14.3 (docker version with project sync being managed manually)

Command used:

root@opengrok-c7d4775bb-dvjjl:/usr/local/tomcat# /venv/bin/python3 /venv/bin/opengrok-reindex-project -J=-XX:-UseGCOverheadLimit -J=-Xmx36g -J=-server --api_timeout 300 --jar /opengrok/lib/opengrok.jar -t /opengrok/etc/logging.properties.template -p %PROJ% -d /opengrok/log/example_project-github -U http://localhost:8080/ -P example_project-github/ -- --connectTimeout 300 -r dirbased -G -m 4096 --leadingWildCards on -c /usr/local/bin/ctags -o /opengrok/etc/ctags.config -U http://localhost:8080/ -H example_project-github/

INFO: file with extra options for ctags: /opengrok/etc/ctags.config
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.

Indexer command for project example_project-github failed (return code 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions