Im getting a lot of errors whenever I run cron:

    * Error thrown in /var/www/vhosts/wordherd.org/httpdocs/sites/all/modules/luceneapi/contrib/luceneapi_node/luceneapi_node.index.inc on line 71.
    * Error thrown in /var/www/vhosts/wordherd.org/httpdocs/sites/all/modules/luceneapi_dym/luceneapi_dym.index.inc on line 84.

And when I try to view index statistics I get this error

Error thrown in /var/www/vhosts/wordherd.org/httpdocs/sites/all/modules/luceneapi/luceneapi.admin.inc  on line 431.

All requirements are met for search lucene api in my status report and I cant figure out why it isn't working.
I saw a similar issue (#717050: Error thrown in luceneapi_node.module and luceneapi_node.module) that was resolved by changing the permissions, but I have tried:
Changing the permissions for just about every directory.
Disabling, Uninstalling and then Reinstalling the module.
All to no avail, any ideas?

Comments

cpliakas’s picture

Category: support » bug

Hi Bizarro.

First, I would check that the settings in admin/settings/luceneapi to see if the permissions are too strict. This is what determines the filesystem permissions are set when index files are created. If you think the settings are OK, please report back.

Thanks,
Chris

Bizarro’s picture

Hi Chris,

Thanks for getting back to me on this. I changed the permissions and got the same errors. I can see the folders for luceneapi_node and _dym created in my FTP program after I run cron, but the folders are empty and I get the same errors. The permissions for these folders are 775.

Let me know if I can provide any more information to get this resolved

Thanks
-Rob

cpliakas’s picture

Hey Rob.

Off hand, do you know if you filed directory resides on a remote filesystem, such as NFS or something similar?

Thanks,
Chris

Bizarro’s picture

Nope, everything is on the same Virtual Private Server

-Rob

cpliakas’s picture

Status: Active » Postponed (maintainer needs more info)

Hi Bizarro.

Looking through the code, the index cannot be opened by the web server. 99% of the time permissions aren't set correctly which causes this error to be thrown. Make sure you know what user the web server is running as, because generally with FTP the user/group that owns the file is different than the one used by the web server.

Thanks,
Chris

bardya’s picture

I have the same issue as I migrated the site from local to vps.

cpliakas, how do you find the user web server is running as? When i looked up the users in the OS i found about 25! the folder in question has 777 permission, and still giving error.

Is there a way to remove the index and start from scracth?

Thanks a bunch!

cpliakas’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Active

Hi bardya.

What VPS? Could it be using a networked file system? One way to find the user is to do an `ls -l` on the files directory to see what user the files are being written as. Whatever owner / permissions the web server is using is what the index needs to be as well. To me, this issue really seems to be something that is outside the scope of the module and has to do with the environment the site is running on. I have been wrong before, but I am demoting this from a "bug report" to "support request" for that reason.

In terms of wiping the index, you can manually delete the sites/default/files/luceneapi_node directory and then select the "wipe index" button in admin/settings/luceneapi_node/statistics. That should do the trick and start you from scratch.

Thanks,
Chris

bardya’s picture

cpliakas thanks for getting back to me. I matched the group and owner of the folder to the rest of the site so we are good on the permission side.

On the index side it took a couple of tries:

Attempt I
I did the following:

  1. Removed folder named luceneapi_node
  2. This allowed me to get the index statistic tab without the error
  3. I selected wipe index
  4. I ran cron to build index

Result I
When i tried to get access to index statistic i got the following error:
Error thrown in ../sites/all/modules/luceneapi/luceneapi.admin.inc on line 431.

Attempt II
So I repeated steps above with one change

  1. Removed folder named luceneapi_node
  2. This allowed me to get the index statistic tab without the error
  3. I selected wipe index and checked the check box "Rebuild index after operation"
  4. Index was built successfully
  5. I ran cron

Result II
When i tried to get access to index statistic everything was good and search worked

damienmckenna’s picture

Version: 6.x-2.2 » 6.x-2.4
Status: Active » Needs review
StatusFileSize
new883 bytes

I'm seeing the luceneapi_node.index.inc error in v6.x-2.4 when I go to /update.php.

Would it not be better if this recorded a watchdog message to warn the site admin of the problem? Try the attached file for a starting point.

damienmckenna’s picture

StatusFileSize
new764 bytes

Looking through the code some more, the problem may very well simply be that $errstr is passed to the luceneapi_index_open() function before it is declared.

damienmckenna’s picture

StatusFileSize
new4.99 KB

Ok, here's a patch that assigns $errstr an empty string before it is used in every function it's used in.

damienmckenna’s picture

I added similar tasks for the submodules:

cpliakas’s picture

Status: Needs review » Closed (won't fix)

Due to end of life announcement.

pico34’s picture

Thank you bardya!
I had a problem with lucenapi 6.24 :
luceneapi_node.index.inc on line 71

My folder 'default/files/luceneapi_node' on my FTP server wasnt correct. I've deleted it, and wiped the index, Rebuilt -> done ! Thanx