manticoresearch icon indicating copy to clipboard operation
manticoresearch copied to clipboard

buddy can not work at Windows if listen is 127.0.0.1

Open tomatolog opened this issue 1 year ago • 4 comments

Bug Description:

When listen = 127.0.0.1:9312 used on Windows buddy that starts in the docker can not communicate with daemon and daemon replies with error

mysql -h 127.0.0.1 -P 9315 -vvv -e "show queries"
ERROR 1064 (42000) at line 1: P01: syntax error, unexpected identifier, expecting VARIABLES near 'queries'

the searchd.log also has error entries

WARNING: conn 192.168.1.97:59512(40), sock=988: failed to receive MySQL request body, expected length 5459792, invalid size read 5459426(-1)
WARNING: [BUDDY] [39] error: Received HTTP/0.9 when not allowed 

Manticore Search Version:

'6.2.13 50c41a730@24042214 dev (columnar 2.2.5 478fff2@240417) (secondary 2.2.5 478fff2@240417) (knn 2.2.5 478fff2@240417)'

Operating System Version:

Windows

Have you tried the latest development version?

  • [X] Yes

Internal Checklist:

To be completed by the assignee. Check off tasks that have been completed or are not applicable.

  • [ ] Task estimated
  • [ ] Specification created, reviewed, and approved
  • [ ] Implementation completed
  • [ ] Tests developed
  • [ ] Documentation updated
  • [ ] Documentation proofread
  • [ ] Changelog updated

tomatolog avatar Apr 30 '24 20:04 tomatolog

here is a config that does not work on Windows

searchd
{
    listen			= 127.0.0.1:9312
    listen			= 9316
    listen			= 9315:mysql41

and the buddy start cli

accepting connections
[BUDDY] started v2.3.7 'docker run --rm -p 9412:9999 -v "C:\dev\sphinx\manticore-plugins/manticore-buddy:/buddy" -v manticore-usr_local_lib_manticore:/usr/local/lib/manticore -e PLUGIN_DIR=/usr/local/lib/manticore -v C:/dev/sphinx/build/m_dbg22/src/RelWithDebInfo/data:/var/lib/manticore -e DATA_DIR=/var/lib/manticore -w /buddy --name buddy_2039823321 manticoresearch/manticore-executor:1.1.3 /buddy/src/main.php --listen=http://host.docker.internal:9312 --bind=0.0.0.0:9999 --disable-telemetry --threads=1' at http://host.docker.internal:9412

here is a config there buddy works ok

searchd
{
    listen			= 9316
    listen			= 9315:mysql41

and then buddy start cli

accepting connections
[BUDDY] started v2.3.7 'docker run --rm -p 9416:9999 -v "C:\dev\sphinx\manticore-plugins/manticore-buddy:/buddy" -v manticore-usr_local_lib_manticore:/usr/local/lib/manticore -e PLUGIN_DIR=/usr/local/lib/manticore -v C:/dev/sphinx/build/m_dbg22/src/RelWithDebInfo/data:/var/lib/manticore -e DATA_DIR=/var/lib/manticore -w /buddy --name buddy_2039823321 manticoresearch/manticore-executor:1.1.3 /buddy/src/main.php --listen=http://host.docker.internal:9316 --bind=0.0.0.0:9999 --disable-telemetry --threads=1' at http://host.docker.internal:9416

tomatolog avatar Apr 30 '24 20:04 tomatolog

seems buddy from the docker can not properly connect into daemon port that bind to 127.0.0.1 - daemon should select and pass into buddy --listen= the first port that is not bound to 127.0.0.1 or do not start buddy if all ports are bound to 127.0.0.1

tomatolog avatar Apr 30 '24 20:04 tomatolog

@tomatolog can you try to upgrade your Docker and try again?

This seems to be related https://github.com/docker/for-win/issues/13398 and there https://github.com/docker/for-win/issues/13398#issuecomment-1525952874 they say it was fixed in 4.19.0

sanikolaev avatar May 03 '24 06:05 sanikolaev

my docker is already 4.28.0 (139021)

tomatolog avatar May 03 '24 06:05 tomatolog

seems issue disappeared while I switched into master version of buddy

tomatolog avatar May 07 '24 13:05 tomatolog