0

I want to confugure opengrok source in directory other than /var/opengrok/src. I set OPENGROK_INSTANCE_BASE environment variable to my desired directory. (Just to be sure and for testing I hard coded that variable in Opengrok script.) I created src/ data/ etc/ folder in desired directory. After these I issue sudo ./OpenGrok index commnad. Now from web-browser I can see source in project list, but When I search I see following error

*There was an error!

The source root specified in your configuration does not point to a valid directory! Please configure your webapp. The configured dataRoot '/home/xxnikosr/opengrok/data' refers to a none-exsting or unreadable directory!*

I check permision to /data folder are proper and does exist. Does anybody face same issue? Did I miss any configuration. PS I did Opengrok deploy before creating src/ data/ etc/ directories

user2670032
  • 305
  • 5
  • 5

1 Answers1

1

It seems that even though you set up OPENGROK_INSTANCE_BASE to something other than /var/opengrok, opengrok will continue to read configuration information from /var/opengrok/etc.

(Even more confusing, configuration is correctly written to $OPENGROK_INSTANCE_BASE/etc when the index is created. Tested on Ubuntu 14.4 with opengrok 0.12.1. I consider that a bug.)

The easiest way to fix this would be to either just use the default /var/opengrok as instance base, or create a link /var/opengrok/etc -> $OPENGROK_INSTANCE_BASE/etc. That works for me.

If you want a better solution, the path to /var/opengrok - which seems to be hardwired in the webapp xml - must be changed. For details, see: https://github.com/OpenGrok/OpenGrok/wiki/How-to-install-OpenGrok#optional-need-to-change-web-application-properties-or-name

..Thomas

Thomas Stuefe
  • 385
  • 2
  • 6