Форум русскоязычного сообщества Ubuntu


Хотите сделать посильный вклад в развитие Ubuntu и русскоязычного сообщества?
Помогите нам с документацией!

Автор Тема: sphinxsearch выдает ошибку client version is higher than daemon version  (Прочитано 4065 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн mstdmstd

  • Автор темы
  • Активист
  • *
  • Сообщений: 322
    • Просмотр профиля
Всем привет,
Пытаюсь на своей Kubuntu 14 в пхп приложении запустить sphinxsearch и по инсталляции при запуске получил ошибку :
Цитировать
searchd error: client version is higher than daemon version (client is v.1.29, daemon is v.1.25) in.../application/models/mcms_item.php
Установленный в системе демон  более старый чем мой клиент?

При этом
$ searchd --help
Sphinx 2.0.4-id64-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
В проекте подключен sphinxclient.php с заголовком:
<?php
//
// $Id: sphinxapi.php 3802 2013-04-10 12:49:42Z tomat $
//
других указаний на то какая это версия я не нашел.

Я порылся гуглом и нашело советы типа:
Цитировать
Try uninstalling the default version of Sphinx, and using the latest Ubuntu/Debian package fromhttp://sphinxsearch.com/downloads/release/ in order to
take advantage of the latest version of the server.
Make filesystem and mysql backup before uninstalling. When you don't specify --purge during apt-get remove, good packages ask if they
should keep the data, but I wouldn't rely on this. 
Мне нужно удалить свой пакетный searchd но какой версии тогда ставить чтобы он соответсвовал v.1.29?
Или файл с клиентом поискать? Но в этих файлах непонятно как указано версия( например тут https://github.com/gigablah/sphinxphp/blob/master/src/Sphinx/SphinxClient.php ).

Оффлайн mstdmstd

  • Автор темы
  • Активист
  • *
  • Сообщений: 322
    • Просмотр профиля
Re: sphinxsearch выдает ошибку client version is higher than daemon version
« Ответ #1 : 27 Сентября 2014, 08:08:22 »
Мне дали ссылку https://launchpad.net/~builds/+archive/ubuntu/sphinxsearch-rel22
Порывшись в гугле я нашел что мне нужно открыть файл /etc/apt/sources.list
И в нем добавить 2 строки
deb http://ppa.launchpad.net/builds/sphinxsearch-rel22/ubuntu trusty main
deb-src http://ppa.launchpad.net/builds/sphinxsearch-rel22/ubuntu trusty main
И затем выполнить апдейт системы? Саму программу устанавливать не надо - а апдейт установит нужную мне вурсию .
Так? Этои манипуляции безопасны?

Оффлайн Бонька

  • Активист
  • *
  • Сообщений: 346
  • life is purple
    • Просмотр профиля
Re: sphinxsearch выдает ошибку client version is higher than daemon version
« Ответ #2 : 27 Сентября 2014, 09:50:11 »
не стоит sources.list редактировать, не зная ничего про это и как исправить последствия, в случае чего. Лучше, безопаснее, и правильнее - PPA добавлять.
Для последней версии sphinxsearch (2.24) это выглядит так:

sudo add-apt-repository ppa:builds/sphinxsearch-daily

sudo apt-get update

sudo apt-get install sphinxsearch


в дальнейшем все обновления автоматически будут приходить оттуда.
« Последнее редактирование: 27 Сентября 2014, 09:53:05 от Бонька »
Asus N56VJ, SSD, btrfs, Manjaro 16 (Ellada). x64, XFCE :)

Оффлайн mstdmstd

  • Автор темы
  • Активист
  • *
  • Сообщений: 322
    • Просмотр профиля
Re: sphinxsearch выдает ошибку client version is higher than daemon version
« Ответ #3 : 27 Сентября 2014, 12:18:35 »
Первая команда выполнилась :
# sudo add-apt-repository ppa:builds/sphinxsearch-daily
 Fast standalone full-text SQL search engine Sphinx is a standalone full text search engine, meant to provide fast, size-efficient and relevant fulltext search functions to other applications. Sphinx was specially designed to integrate well with SQL databases and scripting languages. Currently built-in data sources support fetching data either via direct connection to MySQL or PostgreSQL, or using XML pipe mechanism (a pipe to indexer in special XML-based format which Sphinx recognizes).
This 'daily' repository includes  the builds from 'trunk' branch which usually includes the top-most changes with new functionality, etc. Usually all common functionality with another branches (beta, stable) are the same stable, so you can use it in production. The very new features, however, might be not so well tested, but are present only here, in the trunk.
The PPA is updated periodically (usually NOT daily, but rare) keeping in mind common time necessary for PPA servers to build a package from the sources.
 More info: https://launchpad.net/~builds/+archive/ubuntu/sphinxsearch-daily
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp7uvfbo_e/secring.gpg' created
gpg: keyring `/tmp/tmp7uvfbo_e/pubring.gpg' created
gpg: requesting key 16932B16 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp7uvfbo_e/trustdb.gpg: trustdb created
gpg: key 16932B16: public key "Launchpad PPA for Sphinxsearch builds team" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

А вторая обновления системы выдала динный аутпут и в самом конце строки:
Fetched 304 kB in 5s (50,8 kB/s)               
W: Failed to fetch http://ppa.launchpad.net/builds/sphinxsearch-daily/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
Что не так ?

Оффлайн Бонька

  • Активист
  • *
  • Сообщений: 346
  • life is purple
    • Просмотр профиля
Re: sphinxsearch выдает ошибку client version is higher than daemon version
« Ответ #4 : 27 Сентября 2014, 15:03:09 »
я извиняюсь, не углядел, что в предложенном первоначально ППА нет поддержки трасти.
Теперь нужно так тогда, удалить ппа и поставить другой, с поддержкой Вашего дистрибутива:

sudo add-apt-repository -r ppa:builds/sphinxsearch-daily

sudo add-apt-repository ppa:builds/sphinxsearch-rel22

sudo apt-get update

sudo apt-get install sphinxsearch
Asus N56VJ, SSD, btrfs, Manjaro 16 (Ellada). x64, XFCE :)

Оффлайн mstdmstd

  • Автор темы
  • Активист
  • *
  • Сообщений: 322
    • Просмотр профиля
Re: sphinxsearch выдает ошибку client version is higher than daemon version
« Ответ #5 : 27 Сентября 2014, 17:38:24 »
И та же ошибка
Fatal error: Uncaught exception 'Exception' with message 'searchd error: client version is higher than daemon version (client is v.1.29,
daemon is v.1.25)' in ...
Возможно результат итот же из-за того что при выполнении команд был вопрос:
Configuration file '/etc/sphinxsearch/sphinx.conf'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** sphinx.conf (Y/I/N/O/D/Z) [default=N] ?
Я жал Enter по умолчанию ... А что мне нужно было выбрать?

Пользователь решил продолжить мысль 28 Сентября 2014, 11:45:45:
Бонька,
Спасибо, я еще раз выполнил команды и эта ошибка ушла. Но после того как я убрал ряд ошибок из файла конфигурации
то выполняю без ошибок, но с варнингами:

# su sphinxsearch -c 'indexer --all'
Sphinx 2.2.4-id64-release (r4806)
Copyright (c) 2001-2014, Andrew Aksyonoff
Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'tour_description'...
WARNING: index 'tour_description': dict=keywords and prefixes and morphology enabled, forcing index_exact_words=1
WARNING: attribute 'id' not found - IGNORING
WARNING: Attribute count is 0: switching to none docinfo
collected 39 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 39 docs, 46 bytes
total 0.009 sec, 5052 bytes/sec, 4283.83 docs/sec
total 3 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 9 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
Не очень понятные варнинги особенно этот
WARNING: attribute 'id' not found - IGNORING
Но вроде это не критично?


Но дальше выскакивает ошибка :

Fatal error: Uncaught exception 'Exception' with message 'connection to localhost:3312 failed (errno=111, msg=Connection refused)' in /mnt/diskD_Work/wwwroot/ci22/application/models/mcms_item.php on line 68
Не очень понятно откуда в ошибке
localhost:3312
параметрв подключения описаны в /etc/sphinxsearch/sphinx.conf как :
# Источник-родитель для всех остальных источников. Здесь указываются параметры доступа
# к базе данных сайта
source lsParentSource
{
    type = mysql
    sql_host = localhost
    sql_user = root
    sql_pass = 1
    sql_port = 3306
    sql_db = ci22

« Последнее редактирование: 28 Сентября 2014, 11:45:45 от mstdmstd »

Оффлайн mstdmstd

  • Автор темы
  • Активист
  • *
  • Сообщений: 322
    • Просмотр профиля
Re: sphinxsearch выдает ошибку client version is higher than daemon version
« Ответ #6 : 30 Сентября 2014, 08:31:44 »
В моем /etc/sphinxsearch/sphinx.conf есть строка
searchd
{
# Адрес, на котором будет прослушиваться порт
listen =  3312
Так заработало!

 

Страница сгенерирована за 0.044 секунд. Запросов: 25.