View Full Version : Some basic questions to sphinx
ThorstenA
05-02-2010, 09:08 PM
I installed sphinx and I could see the search results.
After some days I noticed that the vbulletin database table "vbsphinxsearch_queue" had thousands of entries.
I was unsure if that was right and looked at the cronjobs. They were looking right.
I then just run the every-10-minutes-cronjob /usr/local/sphinx/cron/delta.sh That took more than one hour and this time my life board went offline.
As I could not take my board offline as I could not even get to forum.com/admincp, I shut down the /usr/local/sphinx/cron/delta.sh job while it was running by hitting STRG+C.
My forum works good after that, also the sphinx search.
But I can not execute /usr/local/sphinx/cron/delta.sh again, then I always get this error message:
(...)
using config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'...
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
FATAL: failed to parse config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'.
Sphinx 0.9.8-id64-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
using config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'...
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
FATAL: failed to parse config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'.
Sphinx 0.9.8-id64-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
(...)
The forum runs now with the usual vbulletin search engine, but I'd like to know how I can setup sphinx search again :)
Lynne
05-02-2010, 09:15 PM
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
So what is the first line in your file? And is it the correct path for you (I know I had to change it for my path to php).
ThorstenA
05-03-2010, 07:21 AM
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
So what is the first line in your file? And is it the correct path for you (I know I had to change it for my path to php).
It is the #! path to php line and this line is the same as it was before when it was working. Furthermore, in the path to this directory there is a php file. First thing after looking at this error message was that I looked if the vbulletin-sphinx.php file was okay, and it is. Why is it a invalid "token" error?
Personally I just ran the vbulletin-sphinx.php script once and saved its output to a file. I don't see the point of calling PHP every time the indexer is run just to generate the same config file.
Paul M
05-05-2010, 04:11 PM
You are lucky, I cannot get it to run at all.
Sphinx 0.9.8-id64-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
using config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'...
ERROR: error executing '/usr/bin/php -q' in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
pete_brady
05-05-2010, 04:28 PM
check that you edited the $myforumpath in vbulletin-sphinx.php, not the example $myforumpath path like i did.... doh
CarlitoBrigante
05-05-2010, 06:52 PM
The problem is indeed somewhere in the cronjob. Had the same issue Thorsten is reporting in a client's website (he is running litespeed web server). I am trying to look into the delta.sh file to see what could be causing this.
The token error means the PHP path on top is wrong... weird that at first it was running and now it is not running anymore!
ThorstenA
05-05-2010, 07:18 PM
Had the same issue Thorsten is reporting in a client's website (he is running litespeed web server).
Just a short notice, it may not be because of the litespeed web server, I am running a stock directadmin (that is something like plesk or cpanel) 64bit configuration with apache etc. I have software raid1 but other than that my configuration is pretty usual. The high load is pretty strange as I have an i7 8GB with a less than one million post forum with usual less than 300 users online.
CarlitoBrigante
05-05-2010, 07:21 PM
Thorsten, may I ask you if you are running suphp or suexec to run php?
ThorstenA
05-05-2010, 07:25 PM
Thorsten, may I ask you if you are running suphp or suexec to run php?
I am not so familiar with that, but here is what I found: I have seen mod_suexec on php-info. I did not see suphp on php-info.
CarlitoBrigante
05-05-2010, 07:46 PM
Gotcha, just trying to find a pattern in why this is happening. But the culprit seems to be the MySQL query.
ThorstenA
05-05-2010, 08:05 PM
I imported from phpbb a long time ago, maybe its because of that?
CarlitoBrigante
05-05-2010, 08:11 PM
No, once you imported into vBulletin, that makes no difference.
I would be interested in knowing how many people are having this problems vs those who are running Sphinx on vB4 without problems.
vauge
05-28-2010, 12:17 PM
I am having this issue as well.
CarlitoBrigante
05-28-2010, 01:57 PM
There is obviously something horribly wrong, but I would need to know if ALL websites with a significant amount of posts has this issue. Please guys/gals: if you have this problem, write here and post all details about your setup, including:
- PHP version
- MySQL version
- Web server
And, if possible, the host. I am seeing this happening in a host service that is very common among vB users.
vauge
05-28-2010, 02:51 PM
PHP Version 5.2.9
Mysql 5.0.90
Apache 2.0
Using CPanel.
=======
root@server [/usr/local/sphinx/cron]# ./delta_norotate.sh
Sphinx 0.9.8-id64-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
using config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'...
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
FATAL: failed to parse config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'.
Sphinx 0.9.8-id64-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
==
Please help, really do not want to spend 8 hours reindexing for the default search.
CarlitoBrigante
05-28-2010, 07:43 PM
Vauge, your error is caused by the php path on top of vbulletin-sphinx.php file. If you are unsure about your php path, you can ask your host or check with the "which" command via linux.
The most serious error is the one being caused during cronjobs, so far we were unable to pinpoint an obvious cause. It seems that some of those having the problem are using RAID; I would like to know if others have a similar configuration as well.
By the way, terrific forum.
pete_brady
05-28-2010, 09:46 PM
PHP Version 5.2.9
Mysql 5.0.90
Apache 2.0
Using CPanel.
=======
root@server [/usr/local/sphinx/cron]# ./delta_norotate.sh
Sphinx 0.9.8-id64-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
using config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'...
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
FATAL: failed to parse config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'.
Sphinx 0.9.8-id64-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
==
Please help, really do not want to spend 8 hours reindexing for the default search.
https://vborg.vbsupport.ru/showpost.php?p=2032196&postcount=6
vauge
05-28-2010, 10:52 PM
This is very strange, which was the first thing I ran.
root@server [/usr/local/sphinx/cron]# which php
/usr/local/bin/php
root@server [/usr/local/sphinx/cron]# head ../etc/vbulletin-sphinx.php
#!/usr/local/bin/php
<?php
/*
Set $myforumroot to the absolute path to your forum directory.
Example:
$myforumroot = '/home/username/public_html';
*/
$myforumroot = '/home/USERNAME/public_html'; //<-- changed this one
--------------- Added 1275091134 at 1275091134 ---------------
More craziness, if I change it to "/usr/bin/php" - I get the following...
root@server [/usr/local/sphinx/cron]# ./delta_norotate.sh
using config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'...
ERROR: invalid section type 'X-Powered-By' in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 13.
ERROR: invalid section type 'X-Powered-By' in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
FATAL: failed to parse config file '/usr/local/sphinx/etc/vbulletin-sphinx.php'.
Sphinx 0.9.8-id64-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
sybakaos
06-11-2010, 10:18 PM
I'm trying to install sphinx but I'm experiencing the following error as some other people did previously as well.
ERROR: invalid token in /usr/local/sphinx/etc/vbulletin-sphinx.php line 1 col 1.
I've tried all available PHP paths and I did refer to the correct $myforumpath... I have even reconfigured PHP using suexec, dso etc. Any ideas on how to solve this or perhaps there's an alternative?
lazyllama
07-20-2010, 04:15 PM
I just had this error, and in my case it seems to be nothing to do with the config file, despite the error.
I closed the boards using the AdminCP and ran delta.sh and got the above error about Invalid Token. I opened the boards and ran delta.sh and it ran just fine.
I hope that might help someone.
nrrdot
12-12-2010, 06:36 AM
Anyone ever get this to work? I just did everything as instructed and it does the same thing. :(
ThorstenA
12-12-2010, 08:08 AM
Anyone ever get this to work? I just did everything as instructed and it does the same thing. :(
I couldn't and deinstalled vbulletin sphinx search.
intensecool
03-12-2011, 05:02 AM
Ok, can anyone tell me one thing :
here are my board stats :
I am willing to install SPHINX on my board, but my board is split on 2 servers, one is with files other is having database.
Can you guys confirm to me on which server should i install this thing webserver or database server.
I am confused and secondly which page steps are correct to follow, i will follow this one.
http://www.vbulletin.com/forum/showthread.php/350427-Sphinx-search-BETA-for-vBulletin-4.0
Please confirm quickly.
And one more thing, i dont want to close the board, just turn off the search during installs is it possible
Lynne
03-12-2011, 04:59 PM
I installed it on my webserver.
intensecool
03-15-2011, 05:29 AM
Not working at all.
I tried everything fine, but when it stats indexing , it stops at 73000 thread.
Waited for 2 hours , nothing happened. tried a reinstall still same step stuck up.
Any ideas why this is happening and i am on VBULLETIN 4.1.1
I think this is the issue.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.