Closed jpRsah closed 4 years ago
@jpRsah: you can use docker-compose run
to index your documents first.
docker-compose run sphinx indexer -c /opt/sphinx/conf/sphinx.conf wiki_main
Please let me know if that helps.
Hi,
I have same issue (but after run indexer):
λ docker-compose run sphinx indexer -c /opt/sphinx/conf/sphinx.conf --all
Starting docker_db_1 ... done
Sphinx 3.2.1 (commit f152e0b8)
Copyright (c) 2001-2020, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/opt/sphinx/conf/sphinx.conf'...
indexing index 'catalog'...
collected 8570 docs, 13.8 MB
sorted 1.3 Mhits, 100.0% done
total 8570 docs, 13.76 Mb
total 3.2 sec, 4.350 Mb/sec, 2710 docs/sec
λ docker-compose up sphinx
docker_db_1 is up-to-date
Starting docker_sphinx_1 ... done
Attaching to docker_sphinx_1
sphinx_1 | Sphinx 3.2.1 (commit f152e0b8)
sphinx_1 | Copyright (c) 2001-2020, Andrew Aksyonoff
sphinx_1 | Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
sphinx_1 |
sphinx_1 | [Sat Apr 18 09:37:42.701 2020] [1] using config file '/opt/sphinx/conf/sphinx.conf'...
sphinx_1 | [Sat Apr 18 09:37:42.707 2020] [1] listening on all interfaces, port=9312
sphinx_1 | listening on all interfaces, port=9312
sphinx_1 | [Sat Apr 18 09:37:42.707 2020] [1] listening on all interfaces, port=9306
sphinx_1 | listening on all interfaces, port=9306
sphinx_1 | precaching index 'catalog'
sphinx_1 | [Sat Apr 18 09:37:42.721 2020] [1] WARNING: index 'catalog': prealloc: failed to mmap file '/opt/sphinx/index/catalog.spa': Invalid argument (length=278592); NOT SERVING
sphinx_1 | WARNING: index 'catalog': prealloc: failed to mmap file '/opt/sphinx/index/catalog.spa': Invalid argument (length=278592); NOT SERVING
sphinx_1 | [Sat Apr 18 09:37:42.722 2020] [1] FATAL: no valid indexes to serve
sphinx_1 | FATAL: no valid indexes to serve
sphinx_1 |
sphinx_1 | --- crashed SphinxAPI request dump ---
sphinx_1 |
sphinx_1 | --- request dump end ---
sphinx_1 | Sphinx 3.2.1 (commit f152e0b8)
sphinx_1 | Handling signal 11
sphinx_1 | Crash!!! Handling signal 11
sphinx_1 | -------------- backtrace begins here ---------------
sphinx_1 | Program compiled with gcc 6.4.0
sphinx_1 | Configured with flags: '--enable-dl' '--with-mysql' '--with-pgsql' '--with-unixodbc' 'CXXFLAGS=-DSPHINX_TAG= -DNDEBUG -O3 -g1 -D__MUSL__' 'LDFLAGS=-static-libstdc++ -static-libgcc'
sphinx_1 | Host OS is Linux alpine38 4.14.69-0-vanilla #1-Alpine SMP Mon Sep 10 19:33:23 UTC 2018 x86_64 Linux
sphinx_1 | Stack bottom = 0x7ffc93030187, thread stack size = 0x20000
sphinx_1 | Trying manual backtrace:
sphinx_1 | Something wrong with thread stack, manual backtrace may be incorrect (fp=0x5)
sphinx_1 | Wrong stack limit or frame pointer, manual backtrace failed (fp=0x5, stack=0x7ffc93030000, stacksize=0x20000)
sphinx_1 | -------------- backtrace ends here ---------------
sphinx_1 | Please, create a bug report in our bug tracker (http://sphinxsearch.com/bugs) and attach there:
sphinx_1 | a) searchd log, b) searchd binary, c) searchd symbols.
sphinx_1 | Look into the chapter 'Reporting bugs' in the documentation
sphinx_1 | (/usr/share/doc/sphinx/sphinx.txt or http://sphinxsearch.com/docs/current.html#reporting-bugs)
sphinx_1 | --- BT to source lines (depth 0): ---
sphinx_1 | conversion failed (error 'No such file or directory'):
sphinx_1 | 1. Run the command provided below over the crashed binary (for example, 'searchd'):
sphinx_1 | 2. Attach the source.txt to the bug report.
sphinx_1 | addr2line -e searchd > source.txt
sphinx_1 | --- BT to source lines finished ---
sphinx_1 | --- 0 active threads ---
sphinx_1 | ------- CRASH DUMP END -------
docker_sphinx_1 exited with code 2
@snewer - can you provide your Sphinx config file? I bet there's something wrong with the location of index files.
@macbre, I using /opt/sphinx/index
directory in index config.
{
source = catalog
path = /opt/sphinx/index/catalog
morphology = stem_ru
min_word_len = 1
min_prefix_len = 3
#expand_keywords = 1
#index_exact_words = 1
html_strip = 1
charset_table = 0..9, A..Z->a..z, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
}```
You can run the following to check if the index files are actually in the container:
docker-compose run sphinx ls -lh /opt/sphinx/index/
There's clearly something fishy with paths and or the way you set up volumes in your composer's YAML file.
Please re-open if this issue is still valid.
I attempt use your sphinx container with mediaWiki CMS.
If i run
docker-compose up
i get this crash:How can i run indexing first in your container?
my sphinx.conf