why cannot connect to the manticore docker server

It works fine for me in macos. Here’s the recording proving it - https://youtu.be/_reZRg2eowg

i success,i pulled manticore:3.6.0,it is ok,i can connect it.but the latest version image can not work

Hi everybody, I think it is related to this line

TCP fast open unavailable (can’t read /proc/sys/net/ipv4/tcp_fastopen, look Server_settings/Searchd#Technical-details-about-Sphinx-API-protocol-and-TFO in manual)

as I have the very same issue. My setup is plain docker compose file from Manticore documentation and docker-compose up, nothing else, nothing fancy. Docker is running fine and I have several high load dockers running on the very same machine, so its not problem of docker / network I’d say.

The manticore server does not fully start, or at least the mysql part (it is not obvious from docker logs that it did not start, because it says its listening on the ports …)

manticore    | [Fri Jul 19 17:08:44.838 2024] [1] using config file '/etc/manticoresearch/manticore.conf.sh' (292 chars)...
manticore    | [Fri Jul 19 17:08:44.841 2024] [1] TCP fast open unavailable (can't read /proc/sys/net/ipv4/tcp_fastopen, look Server_settings/Searchd#Technical-details-about-Sphinx-API-protocol-and-TFO in manual)
manticore    | starting daemon version '6.3.2 c296dc7c8@24062606 (columnar 2.3.0 88a01c3@24052206) (secondary 2.3.0 88a01c3@24052206) (knn 2.3.0 88a01c3@24052206)' ...
manticore    | listening on 127.0.0.1:9312 for sphinx and http(s)
manticore    | listening on 127.0.0.1:9306 for mysql
manticore    | listening on 127.0.0.1:9308 for sphinx and http(s)

but thats it … if you try to connect via mysql you get an error that there is no connection

➜ mysql -h0 -P9306
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

even if you connect directly to the running docker image and run mysql command there, you get an error that it cannot connect.

➜ docker exec -it 41f9df7b5a93 /bin/bash
user@41f9df7b5a93:/var/lib/manticore# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

The problem is I was not able to find the root cause of this problem. The linux kernel of the docker host system is not the newest one, but solid and the setting of

/proc/sys/net/ipv4/tcp_fastopen

exists there, is set to 3 now (was 1, but doesnt make any difference). The docker image itself has NO tcp_fastopen option and cannot be set to any value, not directly from the image, not using the docker startup param, no way.

So next thing I tried was to disable the setting using manticore.conf and listen_tfo = 0

searchd {
    listen = 127.0.0.1:9312
    listen = 127.0.0.1:9306:mysql
    listen = 127.0.0.1:9308:http
    log = /var/log/manticore/searchd.log
    query_log = /var/log/manticore/query.log
    pid_file = /var/run/manticore/searchd.pid
    data_dir = /var/lib/manticore
    listen_tfo = 0
}

but it seems to have no impact there, I still get the error during startup. As said, lowering version from current 6.3.2 to 6.2.12 did not help, but using the mentioned 3.6.0 seems to work, ss the docker shows it is trying to do something with the indexes, it never get so far in higher versions and got stuck after messages that it is listening on ports …

manticore    | [Fri Jul 19 17:13:34.587 2024] [1] using config file '/etc/manticoresearch/manticore.conf' (292 chars)...
manticore    | [Fri Jul 19 17:13:34.589 2024] [1] TCP fast open unavailable (can't read /proc/sys/net/ipv4/tcp_fastopen, look Server_settings/Searchd#Technical-details-about-Sphinx-API-protocol-and-TFO in manual)
manticore    | starting daemon version '3.6.0 96d61d8bf@210504 release' ...
manticore    | listening on 127.0.0.1:9312 for sphinx and http(s)
manticore    | listening on 127.0.0.1:9306 for mysql
manticore    | listening on 127.0.0.1:9308 for sphinx and http(s)
manticore    | accepting connections
manticore    | prereading 0 indexes
manticore    | prereaded 0 indexes in 0.000 sec

So, what am I doing wrong? Very same setup works OK on Windows 10 computer but not on Linux.

Also, what is the minimum mysql library version to connect to the manticore mysql port?

So after several hours I made it work

  1. upgrade Docker to latest version. This made the manticore in the latest version 6.3.2 start fully, even if it complains about the tcp setting as mentioned above

  2. removed the IP 127.0.0.1 from manticore.conf. I wasnt able to connect from outside host to manticore ports, but from inside of the docker it was working fine. After I removed the binding to 127. address inside the manticore.conf, it start to work.

searchd {
    listen = 9312
    listen = 9306:mysql
    listen = 9308:http
    log = /var/log/manticore/searchd.log
    query_log = /var/log/manticore/query.log
    pid_file = /var/run/manticore/searchd.pid
    data_dir = /var/lib/manticore
    listen_tfo = 0
}

I sure the issue is the 127.0.0.1 address as you can not connect to that address outside the docker container