oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.36k stars 748 forks source link

can't select project after indexing #3420

Closed chkp-baselz closed 3 years ago

chkp-baselz commented 3 years ago

Hey, after indexing using java -Djava.util.logging.config.file=/opengrok/etc/logging.properties -jar /opengrok/dist/lib/opengrok.jar -c /usr/local/bin/ctags -s /opengrok/src -d /opengrok/data -H -P -S -G -W /opengrok/etc/configuration.xml -U http://localhost:8080/source I can't select projects to search on image

also, I have attached my configration.xml configuration.zip

Thank you for your help

chkp-baselz commented 3 years ago

Hey @vladak , I'm trying to deploy the web once again, but I haven't deleted /opengrok/data folder, is it nessccary? after deploying it requested index, since I got "an error saying that it cannot read the configuration file" I have indexed again using the regular java -Djava.util.logging.config.file=/opengrok/etc/logging.properties -jar /opengrok/dist/lib/opengrok.jar -c /usr/local/bin/ctags -s /opengrok/src -d /opengrok/data -H -P -S -G -W /opengrok/etc/configuration.xml -U http://localhost:8080/source

vladak commented 3 years ago

If you are just redeploying the same web app version as before, the data should remain intact (assuming /opengrok/data is your data root). The default configuration file in the stock web.xml is /var/opengrok/etc/configuration.xml. If your configuration file lives elsewhere (which it is given you are running the indexer with -W /opengrok/etc/configuration.xml), you have to modify web.xml. Again, the opengrok-deploy Python tool can help there (using the -c option).

chkp-baselz commented 3 years ago

@vladak thnx for the info, I have also updated the version from 1.5.8 to 1.5.11 since I'm deploying again, in this case should I clear data folder?

vladak commented 3 years ago

As always when upgrading, you need to look at the release notes for each release to find out if reindex from scratch is needed. The release notes are on https://github.com/oracle/opengrok/releases

chkp-baselz commented 3 years ago

@vladak yes, as I can see "suggester rebuild/init is now gracefully terminated on undeploy" , but what about /data folder, should I clear?

vladak commented 3 years ago

The data root should be only wiped out whenever you need to reindex from scratch. The release notes will tell you that. For example, the release notes for 1.5.0 have that. This is always written in bold letters. Besides release notes, the quite clear indication is the semantic versioning scheme we use. If the major or minor number changes, you need to reindex from scratch.

chkp-baselz commented 3 years ago

Hey @vladak , I run indexing daily using this command java -Djava.util.logging.config.file=/opengrok/etc/logging.properties -jar /opengrok/dist/lib/opengrok.jar -c /usr/local/bin/ctags -s /opengrok/src -d /opengrok/data -H -P -S -G -W /opengrok/etc/configuration.xml -U http://localhost:8080/source, Should I wipe data folder daily before indexing? In that case would it take more time to index?

vladak commented 3 years ago

Definitely not. Reindex from scratch (i.e. deleting data root and indexing) should only happen if it is necessary, i.e. when upgrading across versions that necessitate it (e.g. change the index format). Reindexing from scratch is always costly operation, unless you are running with small input data. For example, for the instance I maintain internally it takes whole week to reindex from scratch.

Are you still trying to solve the original problem ?

chkp-baselz commented 3 years ago

@vladak it has passed I can seethe projects image

but when I have retried to index, it took 3 days without a finish so I have stopped it, is it normal? should I re-index until it finished

vladak commented 3 years ago

Okay, so the original issue is resolved.

vladak commented 3 years ago

As for the long indexing time, you need to take a look into the indexer logs to see what it is doing. Incremental reindex should not take days that's for sure.

chkp-baselz commented 3 years ago

@vladak where can I find the indexing logs? there was no any output of the command?

vladak commented 3 years ago

The java.util.logging.config.file Java option specifies the location of the logging configuration that governs what is being logged, how and where.