macbre / docker-sphinxsearch

Docker image for Sphinx search engine
https://hub.docker.com/r/macbre/sphinxsearch/
MIT License
55 stars 24 forks source link

FATAL: failed to open any config file #26

Closed liushuai05 closed 5 months ago

liushuai05 commented 8 months ago

I don't know what's going on, but I can't find the file, but there seems to be nothing wrong with my configuration.

[xxx@xxxx dk_sphinx]# docker-compose run sphinx indexer --all
Sphinx 3.6.1 (commit c9dbedabf)
Copyright (c) 2001-2023, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

FATAL: failed to open any config file
[xxx@xxxx dk_sphinx]# docker-compose up 
[+] Running 1/0
 ✔ Container dk_sphinx-sphinx-1  Created                                                        0.0s 
Attaching to dk_sphinx-sphinx-1
dk_sphinx-sphinx-1  | Sphinx 3.6.1 (commit c9dbedabf)
dk_sphinx-sphinx-1  | Copyright (c) 2001-2023, Andrew Aksyonoff
dk_sphinx-sphinx-1  | Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
dk_sphinx-sphinx-1  | 
dk_sphinx-sphinx-1  | [Wed Jan  3 06:25:04.558 2024] [1:1] using config file '/opt/sphinx/conf/my_custom_file.conf'...
dk_sphinx-sphinx-1  | [Wed Jan  3 06:25:04.558 2024] [1:1] listening on all interfaces, port=36307
dk_sphinx-sphinx-1  | listening on all interfaces, port=36307
dk_sphinx-sphinx-1  | loading 1 indexes...
dk_sphinx-sphinx-1  | [Wed Jan  3 06:25:04.559 2024] [1:7] WARNING: index 'test_index': prealloc: failed to open /opt/sphinx/indexes/test_index/test_index.sph: No such file or directory; NOT SERVING
dk_sphinx-sphinx-1  | WARNING: index 'test_index': prealloc: failed to open /opt/sphinx/indexes/test_index/test_index.sph: No such file or directory; NOT SERVING
dk_sphinx-sphinx-1  | [Wed Jan  3 06:25:04.560 2024] [1:1] accepting connections
dk_sphinx-sphinx-1  | accepting connections
dk_sphinx-sphinx-1  | [Wed Jan  3 06:25:04.561 2024] [1:20] warming up 0 indexes...
dk_sphinx-sphinx-1  | [Wed Jan  3 06:25:04.561 2024] [1:20] warmed up 0 indexes in 0.0 sec

The following is a screenshot of the relevant:

2024-01-03_14-32 2024-01-03_14-31

VayKekaz commented 5 months ago

same problem. have you found any solution?

UPD: docker compose run sphinx indexer --all --config /opt/sphinx/conf/my_custom_file.conf

liushuai05 commented 5 months ago

same problem. have you found any solution?

UPD: docker compose run sphinx indexer --all --config /opt/sphinx/conf/my_custom_file.conf

这个我解决了 兄弟 是配置文件没写对 但是好像不管怎么折腾都无法socket链接到sphinx

macbre commented 5 months ago

@liushuai05: as described in the README, you first need to index your data (before starting serving the index) - just as @VayKekaz suggested above:

https://github.com/macbre/docker-sphinxsearch?tab=readme-ov-file#usage-example