On 06/11/2014 12:53, Alexander Pyhalov wrote:
Hello.
On our roundcube installation I see the following error.
When I send message, roundcube hangs with status "Sending message" for
several minutes. Then I receive "Request time out". However, the message
is sent. It's related to spell checker. I see that after sending message
our roundcube host opens connection to spell.roundcube.net (443 port)
and they are talking for a second:
I've inserted several debug messages in rcube_spellcheck_googie.php
and now it looks like
function check($text)
{
$this->content = $text;
openlog("webmail",LOG_PID|LOG_ERR,LOG_DAEMON);
$data=date("Y/m/d H:i:s");
syslog(LOG_ERR," $data googie is starting check");
// spell check uri is configured
$url = rcube::get_instance()->config->get('spellcheck_uri');
if ($url) {
$a_uri = parse_url($url);
$ssl = ($a_uri['scheme'] == 'https' || $a_uri['scheme']
== 'ssl');
$port = $a_uri['port'] ? $a_uri['port'] : ($ssl ? 443 : 80);
$host = ($ssl ? 'ssl://' : '') . $a_uri['host'];
$path = $a_uri['path'] . ($a_uri['query'] ?
'?'.$a_uri['query'] : '') . $this->lang;
}
else {
$host = self::GOOGIE_HOST;
$port = self::GOOGIE_PORT;
$path = '/tbproxy/spell?lang=' . $this->lang;
}
$path .= sprintf('&key=%06d', $_SESSION['user_id']);
$gtext = '<?xml version="1.0" encoding="utf-8" ?>'
.'<spellrequest textalreadyclipped="0" ignoredups="0"
ignoredigits="1" ignoreallcaps="1">'
.'<text>' . htmlspecialchars($text, ENT_QUOTES,
RCUBE_CHARSET) . '</text>'
.'</spellrequest>';
$store = '';
if ($fp = fsockopen($host, $port, $errno, $errstr, 30)) {
$data=date("Y/m/d H:i:s");
syslog(LOG_ERR," $data googie connected");
$out = "POST $path HTTP/1.0\r\n";
$out .= "Host: " . str_replace('ssl://', '', $host) . "\r\n";
$out .= "User-Agent: Roundcube Webmail/" . RCMAIL_VERSION .
" (Googiespell Wrapper)\r\n";
$out .= "Content-Length: " . strlen($gtext) . "\r\n";
$out .= "Content-Type: text/xml\r\n";
$out .= "Connection: Close\r\n\r\n";
$out .= $gtext;
fwrite($fp, $out);
$data=date("Y/m/d H:i:s");
syslog(LOG_ERR," $data googie sent message");
while (!feof($fp)) {
$store .= fgets($fp, 128);
$data=date("Y/m/d H:i:s");
syslog(LOG_ERR," $data googie is reading");
}
fclose($fp);
$data=date("Y/m/d H:i:s");
syslog(LOG_ERR," $data googie has closed connection. We
have read $store");
}
After this I've received the following:
Jun 11 13:10:45 webmail-test webmail[6509]: 2014/06/11 13:10:45 googie
is starting check
Jun 11 13:10:45 webmail-test webmail[6509]: 2014/06/11 13:10:45 googie
connected
Jun 11 13:10:45 webmail-test webmail[6509]: 2014/06/11 13:10:45 googie
sent message
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
is reading
Jun 11 13:12:34 webmail-test webmail[6509]: 2014/06/11 13:12:34 googie
has closed connection. We have read HTTP/1.1 502 Bad
Gateway#015#012Server: nginx/1.1.19#015#012Date: Wed, 11 Jun 2014
09:12:33 GMT#015#012Content-Type: text/html#015#012Content-Length:
173#015#012Connection:
close#015#012#015#012<html>#015#012<head><title>502 Bad
Gateway</title></head>#015#012<body
bgcolor="white">#015#012<center><h1>502 Bad
Gateway</h1></center>#015#012<hr><center>nginx/1.1.19</center>#015#012</body>#015#012</html>#015
--
Best regards,
Alexander Pyhalov,
system administrator of Computer Center of Southern Federal University
_______________________________________________
Roundcube Users mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/users