manticoresoftware / docker

Official docker for Manticore Search
67 stars 19 forks source link

Having troubles with docker run using my custom sphinx.conf file #10

Closed SiroDiaz closed 4 years ago

SiroDiaz commented 4 years ago

In a local project, using Windows 10 Home which only supports Docker Toolbox (uses VirtualBox) using version 18.09.3, i tried the command

docker run --name manticore -v ~/repositories/sphinxql/__tests__/:/etc/sphinxsearch/ -v ~/repositories/sphinxql/__tests__/data/:/var/lib/manticore/data -v ~/repositories/sphinxql/__tests__/:/var/log/manticore -p 9306:9307 manticoresearch/manticore

In ~/repositories/sphinxql/__tests__/ there is a sphinx.conf file and i get the following error

[Sun Oct 27 16:14:59.688 2019] [1] using config file '/etc/sphinxsearch/sphinx.conf' (7930 chars)...
[Sun Oct 27 16:14:59.692 2019] [1] WARNING: TCP fast open unavailable (can't read /proc/sys/net/ipv4/tcp_fastopen, unsupported kernel?)
[Sun Oct 27 16:14:59.694 2019] [1] WARNING: ICU: failed to load icu library (tried libicuuc.so.57)
[Sun Oct 27 16:14:59.694 2019] [1] FATAL: failed to create pid file 'searchd.pid': Permission denied
[Sun Oct 27 16:15:02.695 2019] [1] shutdown complete
Manticore 3.2.0 e526a014@191017 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2019, Manticore Software LTD (http://manticoresearch.com)
manticoresearch commented 4 years ago

@SiroDiaz Hi. Is this still actual with the newer image?

SiroDiaz commented 4 years ago

Hi Manticore team, i'm trying again with some changes in the port and config file directory. The command that i run is this:

docker run --name manticore -v ~/repositories/sphinxql/__tests__/manticore.conf:/etc/manticoresearch/manticore.conf -v ~/repositories/sphinxql/__tests__/data/:/var/lib/manticore/data -v ~/repositories/sphinxql/__tests__/:/var/log/manticore -p 9306:9306 manticoresearch/manticore

now i get a new situation:

[Sun Apr 12 21:25:13.602 2020] [1] using config file '/etc/manticoresearch/manticore.conf' (7930 chars)...
Manticore 3.4.2 69033058@200410 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2020, Manticore Software LTD (http://manticoresearch.com)

precaching index 'rt'

It keeps in precaching the 'rt' index and never continues.

My manticore.conf file contains the following content:

index rt
{
    type            = rt

    path            = data/rt
    rt_field        = title
    rt_field        = content
    rt_attr_uint        = gid
    rt_attr_timestamp   = date_created
}

indexer
{
    mem_limit       = 32M
}

searchd
{
    listen          = 9312
    listen          = 9306:mysql41
    log = syslog
    read_timeout        = 5
    client_timeout      = 300
    max_children        = 30
    pid_file        = searchd.pid
    seamless_rotate     = 1
    preopen_indexes     = 1
    unlink_old      = 1
    max_packet_size     = 8M
    max_filters     = 256
    max_filter_values   = 4096
    max_batch_queries   = 32
    workers         = threads # for RT to work
    binlog_path     = # disable logging
}

common
{
    plugin_dir  = data
}

Hope it might be useful.

manticoresearch commented 4 years ago

Try NOT log = syslog as there's no syslog daemon in the container (unless you use a custom image where it is). But even with log = syslog Manticore itself works for me, i.e. I can connect to it from outside:

siro@dev:~/repositories$ mysql -P9306 -h0
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 3.4.2 69033058@200410 release

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit
Bye

If logging is not important for you perhaps you're just missing -d in the docker run call to run it in background. But best is to fix the logging.

SiroDiaz commented 4 years ago

Nice! it's working now removing log = syslog. Maybe in Windows with syslog it fails with Docker. In my Ubuntu production server it worked with log = syslog.

sanikolaev commented 4 years ago

OK, I'm closing the issue. Feel free to re-open if needed.