Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72503

SEVERE o.j.p.l.s.d.LuceneSearchBackend#create: create lucene search backend failed: java.nio.file.NoSuchFileException: /write.lock

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • lucene-search-plugin
    • None
    • jenkins 2.414.1, running in k8s

          [JENKINS-72503] SEVERE o.j.p.l.s.d.LuceneSearchBackend#create: create lucene search backend failed: java.nio.file.NoSuchFileException: /write.lock

          Vladyslav added a comment - - edited

          Have a similar error.

          Observed behavior:
          after changing the plugin configuration via UI lucenePath variable is empty. This triggers attempt of index creation if the root folder / . 

          </org.jenkinsci.plugins.lucene.search.config.SearchBackendConfiguration>jenkins@9b55144d7b60:~$ cat org.jenkinsci.plugins.lucene.search.config.SearchBackendConfiguration.xml
          <?xml version='1.1' encoding='UTF-8'?>
          <org.jenkinsci.plugins.lucene.search.config.SearchBackendConfiguration plugin="lucene-search@408.v0fb_8d1093c83">
            <lucenePath></lucenePath>
            <useSecurity>true</useSecurity>
            <luceneSearchEnabled>true</luceneSearchEnabled> 

          CasC plugin declines attempts to change `lucenePath`:

          io.jenkins.plugins.casc.UnknownAttributesException: searchBackendConfiguration: Invalid configuration elements for type: class org.jenkinsci.plugins.lucene.search.config.SearchBackendConfiguration : lucenePath.
          Available attributes : luceneSearchEnabled, useSecurity
          at io.jenkins.plugins.casc.BaseConfigurator.handleUnknown(BaseConfigurator.java:389)
          at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:374)
          at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:293)
          at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:360)
          at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:293)
          .... 

          I assume that its due to not optimal configuration in https://github.com/jenkinsci/lucene-search-plugin/blob/lucene-search/src/main/java/org/jenkinsci/plugins/lucene/search/config/SearchBackendConfiguration.java

          How to fix:

          • it looks only setup of `Lucene directory` parameter in the `Free Text Search` Jenkins configuration to default value can temporary fix the issue. Be aware that the path will not be visible in UI, you can see the current path only in the configuration file. After config changes you need to setup the path again.

          Expected behavior:

          • path is visible in UI and does no change after change to configs.
          • ability to use CasC plugin to change the `lucenePath` variable.

          Expected behaviour:

          Vladyslav added a comment - - edited Have a similar error. Observed behavior: after changing the plugin configuration via UI lucenePath variable is empty. This triggers attempt of index creation if the root folder / .  </org.jenkinsci.plugins.lucene.search.config.SearchBackendConfiguration>jenkins@9b55144d7b60:~$ cat org.jenkinsci.plugins.lucene.search.config.SearchBackendConfiguration.xml <?xml version= '1.1' encoding= 'UTF-8' ?> <org.jenkinsci.plugins.lucene.search.config.SearchBackendConfiguration plugin= "lucene-search@408.v0fb_8d1093c83" > <lucenePath></lucenePath> <useSecurity> true </useSecurity> <luceneSearchEnabled> true </luceneSearchEnabled> CasC plugin declines attempts to change `lucenePath`: io.jenkins.plugins.casc.UnknownAttributesException: searchBackendConfiguration: Invalid configuration elements for type: class org.jenkinsci.plugins.lucene.search.config.SearchBackendConfiguration : lucenePath. Available attributes : luceneSearchEnabled, useSecurity at io.jenkins.plugins.casc.BaseConfigurator.handleUnknown(BaseConfigurator.java:389) at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:374) at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:293) at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:360) at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:293) .... I assume that its due to not optimal configuration in https://github.com/jenkinsci/lucene-search-plugin/blob/lucene-search/src/main/java/org/jenkinsci/plugins/lucene/search/config/SearchBackendConfiguration.java How to fix: it looks only setup of `Lucene directory` parameter in the `Free Text Search` Jenkins configuration to default value can temporary fix the issue. Be aware that the path will not be visible in UI, you can see the current path only in the configuration file. After config changes you need to setup the path again. Expected behavior: path is visible in UI and does no change after change to configs. ability to use CasC plugin to change the `lucenePath` variable. Expected behaviour:

          Here the fix https://github.com/jenkinsci/lucene-search-plugin/pull/70

          rsandell could you please review it? Change is trivial.

          Pavel Valodzka added a comment - Here the fix https://github.com/jenkinsci/lucene-search-plugin/pull/70 rsandell could you please review it? Change is trivial.

            rsandell rsandell
            captain wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: