anonymous user

Forums   Register   Login   Forgot your login/password?   Search

failed to send client protocol version

Common forum | 1 | 2 | 3 | 4 | 5 | ... | 498 | 499 | 500 | 501 | next »» | Create new thread

joce

Name: Jocelyn Fournier
Posts: 4

2010-01-02 19:51:18 | reply!


Hi,

I'm using Sphinx 0.9.9 through the PHP API.
Inside my application, I've created a singleton which takes care of creating the sphinx
connection only one time :

$this->sphinx = new SphinxClient();
$this->sphinx->setServer(CF_SPHINX_SERVER, CF_SPHINX_PORT);
$this->sphinx->SetConnectTimeout(1);

Then, inside the php page, I'm using this $this->sphinx object to do my Sphinx search.
This works fine most of the time, but from time to time, usually when doing a second
sphinx search on the same page, I'm getting the sphinx error "failed to send client
protocol version".

What does this mean, and what could I do to solve this issue ?
(I've already tried to bump up the read_timeout and the connecttimeout without any
success).

Thanks a lot !

joce

Name: Jocelyn Fournier
Posts: 4

to: joce, 2010-01-06 16:40:29 | reply!


Any help about this issue ?

blockmar

Name: Anders Blockmar
Posts: 1

to: joce, 2010-01-18 23:42:10 | reply!


> Any help about this issue ?

Are you using Mac OSX 10.6? I am, and I have the same problem since upgrading to 0.9.9.
Made a TCP dump with Wireshark and saw that all packages send to the port are damaged
(header checksum).

Unfortunately I haven't found the cause or solved the problem...

joce

Name: Jocelyn Fournier
Posts: 4

to: blockmar, 2010-01-19 00:34:27 | reply!


> > Any help about this issue ?
>
> Are you using Mac OSX 10.6? I am, and I have the same problem since upgrading to 0.9.9.
> Made a TCP dump with Wireshark and saw that all packages send to the port are damaged
> (header checksum).
>
> Unfortunately I haven't found the cause or solved the problem...

No, on my side it's on Linux with a Debian Lenny distribution. It seems it also linked to
the use of 0.9.9

valerazp

Name: Valeriy Shapovalov
Posts: 1

to: joce, 2010-01-28 11:57:49 | reply!


> Any help about this issue ?

I solved this problem in such a way:
The file sphinxapi.php
replaced by line
if ( !$this->_Send ( $fp, pack ( "N", 1 ), 4 ) )
to line
if (fwrite ( $fp, pack ( "N", 1 ), 4 ) !== 4)

The result is:
                // send my version
                // this is a subtle part. we must do it before (!) reading back from searchd.
                // because otherwise under some conditions (reported on FreeBSD for instance)
                // TCP stack could throttle write-write-read pattern because of Nagle.
                if (fwrite ( $fp, pack ( "N", 1 ), 4 ) !== 4)
                //if ( !$this->_Send ( $fp, pack ( "N", 1 ), 4 ) )
                {
                        fclose ( $fp );
                        $this->_error = "failed to send client protocol version";
                        return false;
                }

jrabbit

Name: jrabbit
Posts: 16

to: valerazp, 2010-03-10 13:55:15 | reply!


I've just had the same issue on a 64-bit Centos 4.

The workaround in the previous post seems to have fixed it on my server. It also worked
if I used the sphinxapi.php file from the 0.9.8 release.

pavelradaev

Name: Pavel Radaev
Posts: 8

to: jrabbit, 2010-03-10 14:14:19 | reply!


hello eveybody, we had the same with php 5.2.11 - also we found some info (
http://recoursive.com/blog/archives/208 ) stating that fsockopen was brocken in php
5.2.11 - that's why feof may return random values. the problem surely fixed in php 5.2.13
- so u just need to update your php installation.

geass

Name: muhammet arslan
Posts: 3

to: valerazp, 2013-01-12 09:29:40 | reply!


> > Any help about this issue ?
>
> I solved this problem in such a way:
> The file sphinxapi.php
> replaced by line
> if ( !$this->_Send ( $fp, pack ( "N", 1 ), 4 ) )
> to line
> if (fwrite ( $fp, pack ( "N", 1 ), 4 ) !== 4)
>
> The result is:
> // send my version
> // this is a subtle part. we must do it before (!) reading back from searchd.
> // because otherwise under some conditions (reported on FreeBSD for instance)
> // TCP stack could throttle write-write-read pattern because of Nagle.
> if (fwrite ( $fp, pack ( "N", 1 ), 4 ) !== 4)
> //if ( !$this->_Send ( $fp, pack ( "N", 1 ), 4 ) )
> {
> fclose ( $fp );
> $this->_error = "failed to send client protocol version";
> return false;
> }
>

in here u said change sphinxapi.php , already i changed i cant see the changes on host( i
change message but it is not changed)

what sould i do ? rebuild or what?

thanks

Common forum | 1 | 2 | 3 | 4 | 5 | ... | 498 | 499 | 500 | 501 | next »» | Create new thread