Hi Pat,
Seeing a constant error when running fs:rebuild or fs:start
after a fs:index - the rake task reports that Sphinx failed
to start... have you indexed first?. I set the
VERBOSE_LOGGING flag to true, and got the following trace:
[2012-07-13 09:12:41 UTC] API Request: GET '/'; params: {}
[2012-07-13 09:12:41 UTC] API Response: #<Hashie::Rash database_port=10316 mem_limit=64 port=9316 server="ec2-204-236-221-238.compute-1.amazonaws.com" status="OK">
** Invoke fs:stop (first_time)
** Invoke environment
** Execute fs:stop
Stopping Sphinx...
[2012-07-13 09:12:42 UTC] API Request: GET '/'; params: {}
[2012-07-13 09:12:42 UTC] API Response: #<Hashie::Rash database_port=10316 mem_limit=64 port=9316 server="ec2-204-236-221-238.compute-1.amazonaws.com" status="OK">
[2012-07-13 09:12:42 UTC] API Request: POST 'stop'; params: {}
[2012-07-13 09:12:42 UTC] API Response: #<Hashie::Rash status="OK">
Stopped Sphinx
** Invoke fs:index (first_time)
** Invoke environment
** Execute fs:index
Starting Index Request
[2012-07-13 09:12:42 UTC] API Request: GET '/'; params: {}
[2012-07-13 09:12:43 UTC] API Response: #<Hashie::Rash database_port=10316 mem_limit=64 port=9316 server="ec2-204-236-221-238.compute-1.amazonaws.com" status="OK">
Connecting to database specified by DATABASE_URL
[2012-07-13 09:12:45 UTC] API Request: PUT '/'; params: {:configuration=>"indexer\n{\n mem_limit = 64M\n}\n\nsearchd\n{\n listen = ec2-204-236-221-238.compute-1.amazonaws.com:9316\n log = /mnt/sphinx/flying-sphinx/04e2ee6ca7c7696c8/log/searchd.log\n query_log = /mnt/sphinx/flying-sphinx/04e2ee6ca7c7696c8/log/searchd.query.log\n pid_file = /mnt/sphinx/flying-sphinx/04e2ee6ca7c7696c8/searchd.pid\n client_key = 04e2ee6ca7c7696c8:86689499e59364a33\n}\n\nsource job_core_0\n{\n type = pgsql\n sql_host = 127.0.0.1\n sql_user = susqxhweoc\n sql_pass = FsYgPArmz0lrWXDFU9e2\n sql_db = susqxhweoc\n sql_port = 10316\n sql_query_pre = SET TIME ZONE 'UTC'\n sql_query = SELECT \"jobs\".\"id\" * 1::INT8 + 0 AS \"id\" , \"jobs\".\"title\" AS \"title\", \"jobs\".\"reference\" AS \"reference\", \"jobs\".\"id\" AS \"sphinx_internal_id\", 0 AS \"sphinx_deleted\", 3281364504 AS \"class_crc\", \"jobs\".\"job_type\" AS \"job_type\", \"jobs\".\"location_id\" AS \"location_id\" FROM \"jobs\" WHERE (\"jobs\".\"id\" >= $start AND \"jobs\".\"id\" <= $end) GROUP BY \"jobs\".\"id\", \"jobs\".\"title\", \"jobs\".\"reference\", \"jobs\".\"id\", \"jobs\".\"job_type\", \"jobs\".\"location_id\"\n sql_query_range = SELECT COALESCE(MIN(\"id\"), 1::bigint), COALESCE(MAX(\"id\"), 1::bigint) FROM \"jobs\" \n sql_attr_uint = sphinx_internal_id\n sql_attr_uint = sphinx_deleted\n sql_attr_uint = class_crc\n sql_attr_uint = job_type\n sql_attr_uint = location_id\n sql_query_info = SELECT * FROM \"jobs\" WHERE \"id\" = (($id - 0) / 1)\n}\n\nindex job_core\n{\n source = job_core_0\n path = /mnt/sphinx/flying-sphinx/04e2ee6ca7c7696c8/indexes/job_core\n charset_type = utf-8\n}\n\nindex job\n{\n type = distributed\n local = job_core\n}\n", :sphinx_version=>nil}
[2012-07-13 09:12:45 UTC] API Response: #<Hashie::Rash status="OK">
[2012-07-13 09:12:46 UTC] API Request: POST 'indices'; params: {:indices=>""}
[2012-07-13 09:12:46 UTC] API Response: #<Hashie::Rash id=632319 status="OK">
[2012-07-13 09:12:49 UTC] API Request: GET 'indices/632319'; params: {}
[2012-07-13 09:12:49 UTC] API Response: #<Hashie::Rash status="FINISHED">
Index Request has completed.
** Invoke fs:start (first_time)
** Invoke environment
** Execute fs:start
Starting Sphinx...
[2012-07-13 09:12:49 UTC] API Request: GET '/'; params: {}
[2012-07-13 09:12:49 UTC] API Response: #<Hashie::Rash database_port=10316 mem_limit=64 port=9316 server="ec2-204-236-221-238.compute-1.amazonaws.com" status="OK">
[2012-07-13 09:12:49 UTC] API Request: POST 'start'; params: {}
[2012-07-13 09:12:50 UTC] API Response: #<Hashie::Rash status="OK">
Sphinx failed to start... have you indexed first?
** Execute fs:rebuild
The app name is "penta-jobs".
I'm pretty sure I've done everything correctly, and the app works locally - is there anything I'm missing in the trace (it seems fine to me as ide from the last line)?
#1 Posted by Pat Allan Support staff on 13 Jul, 2012 11:10 AM
Hi Matt
There's a bug in the flying-sphinx gem - starting up Sphinx daemons works (as you can see from the debugging output, returns OK), the gem'scode just needs some tweaking. I'll try to get a bug fix out in the next day or two.
Cheers
Pat
#2 Posted by matt on 13 Jul, 2012 11:18 AM
Thanks Pat!
Sphinx is the nuts :)
Matt
#3 Posted by Pat Allan Support staff on 14 Jul, 2012 04:27 PM
Hi Matt
Just wanted to let you know that flying-sphinx 0.6.6 fixes this issue.
Cheers
Pat
Pat Allan closed this discussion on 14 Jul, 2012 04:27 PM.