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:
12:01:24.804884 IP webmail-test.58972 > plugins.roundcube.net.https: Flags [S], seq 3244734379, win 14600, options [mss 1460,sackOK,TS val 3808005355 ecr 0,nop,wscale 7], length 0 12:01:24.868230 IP plugins.roundcube.net.https > webmail-test.58972: Flags [S.], seq 3698264996, ack 3244734380, win 14480, options [mss 1460,sackOK,TS val 1331948192 ecr 3808005355,nop,wscale 6], length 0 12:01:24.868264 IP webmail-test.58972 > plugins.roundcube.net.https: Flags [.], ack 1, win 115, options [nop,nop,TS val 3808005418 ecr 1331948192], length 0 12:01:24.869062 IP webmail-test.58972 > plugins.roundcube.net.https: Flags [P.], seq 1:349, ack 1, win 115, options [nop,nop,TS val 3808005419 ecr 1331948192], length 348 12:01:24.932086 IP plugins.roundcube.net.https > webmail-test.58972: Flags [.], ack 349, win 243, options [nop,nop,TS val 1331948208 ecr 3808005419], length 0 12:01:24.935464 IP plugins.roundcube.net.https > webmail-test.58972: Flags [.], seq 1:1449, ack 349, win 243, options [nop,nop,TS val 1331948209 ecr 3808005419], length 1448 12:01:24.935492 IP webmail-test.58972 > plugins.roundcube.net.https: Flags [.], ack 1449, win 137, options [nop,nop,TS val 3808005485 ecr 1331948209], length 0 12:01:24.935464 IP plugins.roundcube.net.https > webmail-test.58972: Flags [.], seq 1449:2897, ack 349, win 243, options [nop,nop,TS val 1331948209 ecr 3808005419], length 1448 12:01:24.935508 IP webmail-test.58972 > plugins.roundcube.net.https: Flags [.], ack 2897, win 160, options [nop,nop,TS val 3808005485 ecr 1331948209], length 0 12:01:24.935473 IP plugins.roundcube.net.https > webmail-test.58972: Flags [.], ack 349, win 243, options [nop,nop,TS val 1331948209 ecr 3808005419], length 0 12:01:24.935478 IP plugins.roundcube.net.https > webmail-test.58972: Flags [P.], seq 2897:2975, ack 349, win 243, options [nop,nop,TS val 1331948209 ecr 3808005419], length 78 12:01:24.935519 IP webmail-test.58972 > plugins.roundcube.net.https: Flags [.], ack 2975, win 160, options [nop,nop,TS val 3808005485 ecr 1331948209], length 0 12:01:24.937478 IP webmail-test.58972 > plugins.roundcube.net.https: Flags [P.], seq 349:483, ack 2975, win 160, options [nop,nop,TS val 3808005487 ecr 1331948209], length 134 12:01:25.001537 IP plugins.roundcube.net.https > webmail-test.58972: Flags [P.], seq 2975:3225, ack 483, win 260, options [nop,nop,TS val 1331948226 ecr 3808005487], length 250 12:01:25.002056 IP webmail-test.58972 > plugins.roundcube.net.https: Flags [P.], seq 483:909, ack 3225, win 182, options [nop,nop,TS val 3808005552 ecr 1331948226], length 426 12:01:25.101188 IP plugins.roundcube.net.https > webmail-test.58972: Flags [.], ack 909, win 277, options [nop,nop,TS val 1331948251 ecr 3808005552], length 0
then connection hangs in ESTABLISHED state for several minutes.
How can I debug the issue? I see this behavior on both production and test server. Production server was running Roundcube Webmail 1.0-rc for a year now. It seems that errors started to occur this Monday...
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
On 06/11/2014 11:17 AM, Alexander Pyhalov wrote:
has closed connection. We have read HTTP/1.1 502 Bad Gateway
Looks like some problem with our server, but Thomas is on vacation this week. Better configure Roundcube to use local spell engine (php-pspell/enchant).
On 11 Jun 2014, at 11:34, A.L.E.C alec@alec.pl wrote:
On 06/11/2014 11:17 AM, Alexander Pyhalov wrote:
has closed connection. We have read HTTP/1.1 502 Bad Gateway
Looks like some problem with our server, but Thomas is on vacation this week. Better configure Roundcube to use local spell engine (php-pspell/enchant).
I took a look at the server, and it's having some unexplained segfaults in libaspell. I upgraded some packages (including libaspell), but that didnt fix it. I think i'll leave it up to Thomas to check out further. This does mean the spell service provided by rc is currently not working correctly, possibly only for some languages.
Cor
On Wed, Jun 11, 2014 at 12:09 PM, Cor Bosman cor@xs4all.nl wrote:
On 11 Jun 2014, at 11:34, A.L.E.C alec@alec.pl wrote:
On 06/11/2014 11:17 AM, Alexander Pyhalov wrote:
has closed connection. We have read HTTP/1.1 502 Bad Gateway
Looks like some problem with our server, but Thomas is on vacation this week. Better configure Roundcube to use local spell engine (php-pspell/enchant).
I took a look at the server, and it's having some unexplained segfaults in libaspell. I upgraded some packages (including libaspell), but that didnt fix it. I think i'll leave it up to Thomas to check out further. This does mean the spell service provided by rc is currently not working correctly, possibly only for some languages.
These were my findings as well but I'm also unable to resolve the segfaults in libaspell.
But I'd be interested in the full request payload of such failing requests. Maybe that could help us narrowing down the issue.
Kind regards, Thomas