Broken pip - unable to login

Discussion in 'Server Operation' started by satimis, Jul 5, 2008.

  1. satimis

    satimis New Member

    Hi folks,


    Ubuntu LAMP 6.06 amd64
    Postfix
    Cyrus
    SquirrelMail.


    For unknown reason I can't login on SquirrelMail. Previsous it worked.

    What I have done recently;
    Code:
    - install SugarCRM on this box, having played around on /etc/hosts, hosts.allow and hosts.deny
    
    - ISP has changed the router which is supplied by them
    

    On local pc (IP : 192.168.0.10) browser run;
    Code:
    https://192.168.0.52/squirrelmail/src/login.php
    Login;
    ERROR: Connection dropped by IMAP server.
    

    $ tail /var/log/mail.err
    Code:
    Jul  5 18:35:34 satimis cyrus/imap[4523]: refused connection from localhost.localdomain
    Jul  5 18:37:35 satimis cyrus/imap[4523]: refused connection from localhost.localdomain
    Jul  5 18:40:45 satimis cyrus/imap[4429]: refused connection from localhost.localdomain
    Jul  5 18:47:51 satimis cyrus/imap[4429]: refused connection from localhost.localdomain
    Jul  5 18:48:26 satimis cyrus/imap[4429]: refused connection from localhost.localdomain
    Jul  5 19:09:09 satimis cyrus/imap[4408]: refused connection from localhost.localdomain
    Jul  5 19:09:13 satimis cyrus/imap[4408]: refused connection from localhost.localdomain
    Jul  5 19:21:12 satimis cyrus/imap[4398]: refused connection from localhost.localdomain
    Jul  5 19:21:33 satimis cyrus/imap[4398]: refused connection from localhost.localdomain
    Jul  5 19:28:14 satimis cyrus/imap[4429]: refused connection from localhost.localdomain
    

    $ cat /etc/hosts.allow
    Code:
    sshd: 127.0.0.1
    pop3, imap : 127.0.0.1/255.0.0.0
    
    # Domain
    sshd: satimis.com
    
    sshd sshd1 sshd2 : ALL : ALLOW
    
    ALL: satimis.com 192.168.0.10 *.satimis.com
    

    $ cat /etc/hosts.deny
    Code:
    ......
    # You may wish to enable this to ensure any programs that don't
    # validate looked up hostnames still leave understandable logs. In past
    # versions of Debian this has been the default.
    # ALL: PARANOID
    
    
    sshd:ALL EXCEPT localhost \
    : spawn /bin/echo `/bin/date` access denied for %a %h>>/var/log/sshd.log
    
    ALL: ALL
    

    $ imtest -m login localhost
    Code:
    failure: prot layer failure
    

    $ imtest -m login localhost.localdomain
    Code:
    failure: prot layer failure
    

    $ sudo netstat -an | grep tcp
    Code:
    tcp        0      0 0.0.0.0:2401            0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:865             0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:45769           0.0.0.0:*               LISTEN     
    tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:622             0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     
    tcp        0      0 127.0.0.1:2000          0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN     
    tcp        0      0 192.168.0.52:53         0.0.0.0:*               LISTEN     
    tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN     
    tcp        0      0 192.168.0.52:631        0.0.0.0:*               LISTEN     
    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN     
    tcp6       0      0 :::993                  :::*                    LISTEN     
    tcp6       0      0 :::995                  :::*                    LISTEN     
    tcp6       0      0 :::2222                 :::*                    LISTEN     
    tcp6       0      0 :::110                  :::*                    LISTEN     
    tcp6       0      0 :::143                  :::*                    LISTEN     
    tcp6       0      0 :::80                   :::*                    LISTEN     
    tcp6       0      0 :::25                   :::*                    LISTEN     
    tcp6       0      0 :::443                  :::*                    LISTEN     
    tcp6       0   0 ::ffff:192.168.0.52:2222 ::ffff:192.168.0.10:50710 ESTABLISHED
    tcp6       0   0 ::ffff:192.168.0.52:2222 ::ffff:192.168.0.10:50583 ESTABLISHED
    

    $ grep admins /etc/cyrus.conf
    Code:
    admins: cyrus
    

    Please shed me some light how to fix the problem. TIA


    B.R.
    satimis
     
  2. topdog

    topdog Active Member HowtoForge Supporter

    is there no error in syslog ?
     
  3. satimis

    satimis New Member

    Hi topdog,


    $ tail /var/log/syslog
    Code:
    Jul  5 21:20:01 satimis /USR/SBIN/CRON[4470]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:21:01 satimis /USR/SBIN/CRON[4473]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:22:01 satimis /USR/SBIN/CRON[4476]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:23:01 satimis /USR/SBIN/CRON[4479]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:24:01 satimis /USR/SBIN/CRON[4482]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:25:01 satimis /USR/SBIN/CRON[4485]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:26:01 satimis /USR/SBIN/CRON[4497]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:27:01 satimis /USR/SBIN/CRON[4500]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:28:01 satimis /USR/SBIN/CRON[4503]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:28:14 satimis cyrus/imap[4438]: refused connection from localhost.localdomain
    

    $ sudo ls -l /var/www/SugarCE-Full-5.0.0e/cron.php
    Code:
    Password:
    -rw-r--r-- 1 www-data www-data 3949 2008-07-02 22:31 /var/www/SugarCE-Full-5.0.0e/cron.php

    $ sudo ls -ld /var/www/SugarCE-Full-5.0.0e/
    Code:
    drwxr-xr-x 17 www-data www-data 4096 2008-07-02 22:29 /var/www/SugarCE-Full-5.0.0e/
    

    $ grep www-data /etc/group
    Code:
    www-data:x:33:
    

    $ ls -l /usr/sbin/cron
    Code:
    -rwxr-xr-x 1 root root 34904 2005-11-15 20:46 /usr/sbin/cron
    

    satimis is not in group "www-data". Shall I put satimis in this group? If it applies then I have to put all users on this group.


    OR SquirrelMail won't work anymore? I must create users' accounts on SugarCRM. Afterwards send/receive emails on SugarCRM?


    Edit;


    Tried to login SquirrelMail with another user. Still failed.


    The output of follows seem looking same as previous;


    $ tail /var/log/mail.err
    Code:
    Jul  5 19:09:09 satimis cyrus/imap[4408]: refused connection from localhost.localdomain
    Jul  5 19:09:13 satimis cyrus/imap[4408]: refused connection from localhost.localdomain
    Jul  5 19:21:12 satimis cyrus/imap[4398]: refused connection from localhost.localdomain
    Jul  5 19:21:33 satimis cyrus/imap[4398]: refused connection from localhost.localdomain
    Jul  5 19:28:14 satimis cyrus/imap[4429]: refused connection from localhost.localdomain
    Jul  5 19:44:29 satimis cyrus/imap[4429]: refused connection from localhost.localdomain
    Jul  5 21:17:14 satimis cyrus/imap[4438]: refused connection from localhost.localdomain
    Jul  5 21:28:14 satimis cyrus/imap[4438]: refused connection from localhost.localdomain
    Jul  5 21:57:58 satimis cyrus/imap[4438]: refused connection from localhost.localdomain
    Jul  5 22:00:31 satimis cyrus/imap[4438]: refused connection from localhost.localdomai
    

    $ tail /var/log/syslog
    Code:
    Jul  5 21:53:01 satimis /USR/SBIN/CRON[4632]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:54:01 satimis /USR/SBIN/CRON[4635]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:55:01 satimis /USR/SBIN/CRON[4638]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:56:01 satimis /USR/SBIN/CRON[4641]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:57:01 satimis /USR/SBIN/CRON[4644]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:57:58 satimis cyrus/imap[4438]: refused connection from localhost.localdomain
    Jul  5 21:58:01 satimis /USR/SBIN/CRON[4647]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 21:59:01 satimis /USR/SBIN/CRON[4651]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 22:00:01 satimis /USR/SBIN/CRON[4661]: (root) CMD (cd /var/www/SugarCE-Full-5.0.0e; php -f cron.php > /dev/null 2>&1)
    Jul  5 22:00:31 satimis cyrus/imap[4438]: refused connection from localhost.localdomain
    

    B.R.
    satimis
     
    Last edited: Jul 5, 2008
  4. topdog

    topdog Active Member HowtoForge Supporter

    Broken pipe usually would mean some program crushed but it seems your system is not logging it so Try removing the tcp wrapper restrictions on pop and imap and then test.
     
  5. satimis

    satimis New Member

    Solved

    Hi topdog,


    Thanks for your advice.


    I solved my problem by adding localhost.localdomain on hosts.allow


    $ cat /etc/hosts.allow
    Code:
    ....
    sshd sshd1 sshd2 : ALL : ALLOW
    
    ALL: satimis.com *.satimis.com localhost.localdomain
    

    /etc/hosts, /etc/hosts.allow and /etc/hosts.deny are 3 important files governing login.


    Previously I also encountered login problem on SugarCRM (on this box) immediate after finishing its installation. The password was correct. Then I played around on those 3 files to solve the problem.


    B.R.
    satimis
     

Share This Page