pykolab.imap WARNING Could not connect to Cyrus IMAP server 'imaps://localhost:993'



  • I am using Kolab 16 and suddenly client report cannot connect to server by webmail (roundcube) or ActiveSync through (Outlook 2013).

    I find the error message as shown in the subject from /var/log/kolab/pykolab.log.

    I also find this error message from roundcube error.log:
    <fpg8q0lo> IMAP Error: Login failed for user@domain.com from 192.168.1.1. Could not connect to ssl://localhost:993: Unknown reason in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 193 (POST /?_task=login&_action=login)

    From nginx log:
    2016/06/01 13:14:46 [error] 2439#0: *164315 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.1, server: mail.domain.com, request: "POST /?_task=login HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/mail.domain.com_roundcubemail.sock", host: "mail.domain.com", referrer: "https://mail.domain.com/?_task=login"

    I tried to restart cyrus-imapd server many time but still not working.

    ps -ef|grep cyrus show there is process running. Finally I reboot the server and it resume working.

    Does anyone know what is wrong with cyrus?


  • Kolabian

    Most likely this is some problem with our imap proxy called Guam.



  • How to spot and fix the problem?



  • Hi alec
    which service control Guam?



  • @alex_lau said:

    which service control Guam?

    service name - "guam" , in ps aux - "beam"

    guam is proxy between Cyrus (imap server) and mail client (roundcube, thunderbird etc).
    guam needed in kolab because of new calendar etc implementation. w/o guam email client can break folders in kolab.

    # netstat -nlpt | grep beam
    tcp        0      0 0.0.0.0:38696           0.0.0.0:*               LISTEN      609/beam            
    tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      609/beam            
    tcp        6      0 0.0.0.0:993             0.0.0.0:*               LISTEN      609/beam       
    

    Guam logs - /var/log/guam/

    Which kind of server do you use? This problem with localhost:993 offently appears in lxc
    installation.
    https://docs.kolab.org/installation-guide/preparing-the-system.html#lxc-containers
    https://docs.kolab.org/installation-guide/preparing-the-system.html



  • Hi Constin
    Thx for your reply.

    I can find the Guam log.

    I am not sure what do you mean:
    Which kind of server do you use? This problem with localhost:993 offently appears in lxc
    installation.

    I am running Kolab as a virtual machin on a vmware server.

    Do you means I have to set the permission as below to avoid the problem?

    To make sure the permissions are correct even after a reboot, make sure /etc/fstab contains a line similar to the following:

    none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0



  • @alex_lau said:

    I am running Kolab as a virtual machin on a vmware server.

    this is the answer on my question about server.

    Ok, please provide commands:

    netstat -nlpt
    cat /etc/hosts
    cat /etc/selinux/config 
    


  • [root@mail ~]# netstat -nlpt
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 3065/amavisd (maste
    tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 2608/mongod
    tcp 0 0 127.0.0.1:9993 0.0.0.0:* LISTEN 2683/cyrus-master
    tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 2502/master
    tcp 0 0 127.0.0.1:10026 0.0.0.0:* LISTEN 2565/python
    tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2362/mysqld
    tcp 0 0 127.0.0.1:10027 0.0.0.0:* LISTEN 2502/master
    tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 2502/master
    tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 684/beam.smp
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2371/nginx: master
    tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 722/epmd
    tcp 0 0 0.0.0.0:42610 0.0.0.0:* LISTEN 684/beam.smp
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1024/sshd
    tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2502/master
    tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 2371/nginx: master
    tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN 2683/cyrus-master
    tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 684/beam.smp
    tcp6 0 0 ::1:10024 :::* LISTEN 3065/amavisd (maste
    tcp6 0 0 :::587 :::* LISTEN 2502/master
    tcp6 0 0 :::80 :::* LISTEN 2371/nginx: master
    tcp6 0 0 :::22 :::* LISTEN 1024/sshd
    tcp6 0 0 :::25 :::* LISTEN 2502/master
    tcp6 0 0 :::4190 :::* LISTEN 2683/cyrus-master
    tcp6 0 0 :::389 :::* LISTEN 809/ns-slapd

    [root@mail ~]# cat /etc/hosts
    192.168.1.11 mail.montygroup.com
    127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

    [root@mail ~]# cat /etc/selinux/config

    This file controls the state of SELinux on the system.

    SELINUX= can take one of these three values:

    enforcing - SELinux security policy is enforced.

    permissive - SELinux prints warnings instead of enforcing.

    disabled - No SELinux policy is loaded.

    SELINUX=permissive

    SELINUXTYPE= can take one of three two values:

    targeted - Targeted processes are protected,

    minimum - Modification of targeted policy. Only selected processes are protected.

    mls - Multi Level Security protection.

    SELINUXTYPE=targeted



  • o.... the # make the characters bigger....



  • constin
    any idea yet?



  • It happen again. Please help.

    For this time, I killed the following process. I can connect back again.

    root 684 0.2 0.3 781836 56780 ? Ssl Jun01 34:23 /opt/kolab_guam/erts-6.3/bin/beam.smp -Bd -- -root /opt/kolab_guam -progname kolab_guam -- -home /opt/kolab_guam/ -- -
    noshell -noinput -boot /opt/kolab_guam/releases/0.7.2/kolab_guam -config /opt/kolab_guam/releases/0.7.2/sys.config -name kolab_guam@127.0.0.1 -setcookie kolab_guam -- foreground



  • Do you use certificates?
    I have this problem to. But in my case it happens when I do "nmap mail.mailserver.com -p 143" and its fallen because of certificate files is incorrect I think. (I have 2 diferent pairs of certificate in /etc/guam/sys.config and /etc/imapd.conf. And /etc/guam/sys.config wont work with pair of /etc/imapd.conf).



  • Yes I have a cert from namecheap.

    nmap status is "Host is up".



  • @Constin said:

    @alex_lau said:

    I am running Kolab as a virtual machin on a vmware server.

    this is the answer on my question about server.

    Ok, please provide commands:

    netstat -nlpt
    cat /etc/hosts
    cat /etc/selinux/config 
    

    it happened again today, please advise what can i do to fix the problem?



  • cat /var/log/guam/error.log



  • 2016-06-21 03:04:17.029 [error] <0.12009.11> gen_server <0.12009.11> terminated with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504
    2016-06-21 03:04:17.029 [error] <0.12009.11> CRASH REPORT Process <0.12009.11> with 0 neighbours exited with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in gen_server:terminate/7 line 792
    2016-06-21 03:04:17.029 [error] <0.91.0> Supervisor {<0.91.0>,kolab_guam_listener} had child session started with {kolab_guam_session,start_link,undefined} at <0.12009.11> exit with reason no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in context child_terminated
    2016-06-21 14:00:26.675 [error] <0.31450.11> gen_server <0.31450.11> terminated with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504
    2016-06-21 14:00:26.676 [error] <0.31450.11> CRASH REPORT Process <0.31450.11> with 0 neighbours exited with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in gen_server:terminate/7 line 792
    2016-06-21 14:00:26.676 [error] <0.91.0> Supervisor {<0.91.0>,kolab_guam_listener} had child session started with {kolab_guam_session,start_link,undefined} at <0.31450.11> exit with reason no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in context child_terminated
    2016-06-21 14:00:26.887 [error] <0.31471.11> SSL: hello: tls_handshake.erl:123:Fatal error: protocol version
    2016-06-21 14:00:26.887 [error] <0.31484.11> gen_server <0.31484.11> terminated with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504
    2016-06-21 14:00:26.887 [error] <0.31484.11> CRASH REPORT Process <0.31484.11> with 0 neighbours exited with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in gen_server:terminate/7 line 792
    2016-06-21 14:00:26.888 [error] <0.91.0> Supervisor {<0.91.0>,kolab_guam_listener} had child session started with {kolab_guam_session,start_link,undefined} at <0.31484.11> exit with reason no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in context child_terminated
    2016-06-21 14:00:27.087 [error] <0.31456.11> gen_server <0.31456.11> terminated with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504
    2016-06-21 14:00:27.087 [error] <0.31456.11> CRASH REPORT Process <0.31456.11> with 0 neighbours exited with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in gen_server:terminate/7 line 792
    2016-06-21 14:00:27.087 [error] <0.91.0> Supervisor {<0.91.0>,kolab_guam_listener} had child session started with {kolab_guam_session,start_link,undefined} at <0.31456.11> exit with reason no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in context child_terminated
    2016-06-21 14:00:27.090 [error] <0.31411.11> SSL: hello: tls_handshake.erl:123:Fatal error: protocol version
    2016-06-21 14:00:27.091 [error] <0.31493.11> gen_server <0.31493.11> terminated with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504
    2016-06-21 14:00:27.091 [error] <0.31493.11> CRASH REPORT Process <0.31493.11> with 0 neighbours exited with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in gen_server:terminate/7 line 792
    2016-06-21 14:00:27.091 [error] <0.91.0> Supervisor {<0.91.0>,kolab_guam_listener} had child session started with {kolab_guam_session,start_link,undefined} at <0.31493.11> exit with reason no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in context child_terminated
    2016-06-21 14:00:27.175 [error] <0.31488.11> gen_server <0.31488.11> terminated with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504
    2016-06-21 14:00:27.176 [error] <0.31488.11> CRASH REPORT Process <0.31488.11> with 0 neighbours exited with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in gen_server:terminate/7 line 792
    2016-06-21 14:00:27.176 [error] <0.91.0> Supervisor {<0.91.0>,kolab_guam_listener} had child session started with {kolab_guam_session,start_link,undefined} at <0.31488.11> exit with reason no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in context child_terminated
    2016-06-21 14:00:27.497 [error] <0.31465.11> gen_server <0.31465.11> terminated with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504
    2016-06-21 14:00:27.497 [error] <0.31465.11> CRASH REPORT Process <0.31465.11> with 0 neighbours exited with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in gen_server:terminate/7 line 792
    2016-06-21 14:00:27.498 [error] <0.91.0> Supervisor {<0.91.0>,kolab_guam_listener} had child session started with {kolab_guam_session,start_link,undefined} at <0.31465.11> exit with reason no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in context child_terminated
    2016-06-21 14:00:27.587 [error] <0.31480.11> SSL: certify: ssl_alert.erl:92:Fatal error: bad certificate
    2016-06-21 14:00:27.588 [error] <0.31469.11> gen_server <0.31469.11> terminated with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504
    2016-06-21 14:00:27.588 [error] <0.31469.11> CRASH REPORT Process <0.31469.11> with 0 neighbours exited with reason: no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in gen_server:terminate/7 line 792
    2016-06-21 14:00:27.588 [error] <0.91.0> Supervisor {<0.91.0>,kolab_guam_listener} had child session started with {kolab_guam_session,start_link,undefined} at <0.31469.11> exit with reason no function clause matching inet:tcp_close({sslsocket,nil,{#Port<0.1369>,{config,{ssl_options,tls,[{3,3},{3,2},{3,1}],verify_none,{#Fun<ssl.7...>,...},...},...}}}) line 1504 in context child_terminated



  • same shit as i have here: https://kolab.org/hub/topic/85/guam-crashed-1-2-times-in-month ))

    Waiting for maintainers answer.
    I could not resolve this, because guam is kolab maintainers software. No documentation or error database or some similar



  • Please update this post once you got reply from maintainers.



  • My question is: do we need Guam? Which clients are you using that benefit from Guam? Thunderbird, Outlook?

    Can we implement Guam in another language, so that more people can maintain it? Python?

    At the moment Aaron and Jeroen seem to be the only people that know Erlang, and from the community noone knows it? https://git.kolab.org/diffusion/G/

    Erlang is supposed to be faster for that purpose (https://exote.ch/blogs/aseigo/2015/12/10/guam-an-imap-session-filterproxy/), but for the community version, speed might not be such a big issue.

    I wonder if we should separate the needs of the community from the needs of enterprise level.



  • @timotheus said:

    My question is: do we need Guam? Which clients are you using that benefit from Guam? Thunderbird, Outlook?

    Can we implement Guam in another language, so that more people can maintain it? Python?

    At the moment Aaron and Jeroen seem to be the only people that know Erlang, and from the community noone knows it? https://git.kolab.org/diffusion/G/

    Erlang is supposed to be faster for that purpose (https://exote.ch/blogs/aseigo/2015/12/10/guam-an-imap-session-filterproxy/), but for the community version, speed might not be such a big issue.

    I wonder if we should separate the needs of the community from the needs of enterprise level.

    Hello! I use guam for Thunderbird and android/ios default mail clients.



  • Can some one explain more on the function of Guam?


Log in to reply