postfix / apache reload commands keep hangig

Discussion in 'General' started by lephisto, Aug 20, 2009.

  1. lephisto

    lephisto New Member

    Hello all,

    i have a tricky problem with one ISPConfig2 installation out of 15..

    I have the following issue: All changes to the System I make (create user, alter etc), that require postfix (or other services) to be stopped and started, fail. The /root/ispconfig/scripts/writeconfig.php script keeps running because the "/bin/sh -e /etc/init.d/postfix stop" keeps hangig in the processlist, and i have no clue why.

    Code:
    root     32072  0.0  0.0   3756  1188 ?        S    15:00   0:00 sh -c /etc/init.d/postfix stop &> /dev/null
    root     32073  0.0  0.0   3928  1480 ?        S    15:00   0:00 /bin/sh -e /etc/init.d/postfix stop
    
    They stay in the processlist until i kill them manually. And the writeconf process (which is parent), keeps running until then, too:

    Code:
    root     31996  0.1  0.6  21784 14060 ?        S    15:00   0:00 /root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php
    
    If i execute that command manually, it runs like charme, and i return to the shell:

    Code:
    [email protected]:~# /bin/sh -e /etc/init.d/postfix stop
     * Stopping Postfix Mail Transport Agent postfix                                                                                                                                      [ OK ]
    I see the following in /home/adminispconfig/ispconfig/ispconfig.log:

    Code:
    20.08.2009 - 15:00:33 => INFO - Signalfile Set: insert
    20.08.2009 - 15:00:38 => INFO - USER: 
    web45_XXX:x:10491:10045:XXX:/var/www/web45/user/web45_XXX:/bin/false
    20.08.2009 - 15:00:38 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 664: cp -fr /root/ispconfig/isp/user_standard_index.html_de /var/www/web45/user/web45_XXX/web/index.html
    20.08.2009 - 15:00:38 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 720: setquota -u web45_XXX 0 0 0 0 -a &> /dev/null
    20.08.2009 - 15:00:38 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 721: setquota -T -u web45_XXX 604800 604800 -a &> /dev/null
    20.08.2009 - 15:00:38 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web45/user/web45_XXX/.forward
    20.08.2009 - 15:00:38 => INFO - maildirmake /var/www/web45/user/web45_XXX/Maildir &> /dev/null, Line 110: maildirmake /var/www/web45/user/web45_XXX/Maildir &> /dev/null
    20.08.2009 - 15:00:39 => INFO - chown web45_XXX:web45 /var/www/web45/user/web45_XXX/.spamassassin
    20.08.2009 - 15:00:39 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 137: cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~
    20.08.2009 - 15:00:40 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 284: cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~
    20.08.2009 - 15:00:40 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 289: postmap hash:/etc/postfix/virtusertable
    20.08.2009 - 15:00:40 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1268: cp -fr /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf~
    
    Now i kill that stuck process, then i get a

    Code:
    20.08.2009 - 15:16:05 => WARN - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 755: WARNING: could not /etc/init.d/postfix stop &> /dev/null
    then ispconfig tries to start postfix, and the same happens again, that init script to start the mailserver keeps hanging, i have to kill it and start manually.

    Has anyone ever had such a problem?

    The System is like 15 otgher ISPConfig Installation i have running without a problem. The machine is a 32bit Ubuntu LTS / Hardy running on a XEN 3.2.1 paravirtualized host - like my other installations.

    greetings and thanks in advance.
     
    Last edited: Aug 20, 2009
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe there is a problem with the path variable. Please compare the path variable when you are logged in as root user with the path set in the script /root/ispconfig/sv/ispconfig_wconf
     
  3. lephisto

    lephisto New Member

    It's:

    [email protected]:~# echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

    and in the File it's:

    export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin

    should be ok?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, looks fine. Then try to check your postfix configuration with:

    postfix check

    and try:

    postfix upgrade-configuration
     
  5. lephisto

    lephisto New Member

    both run without a problem.

    and, it's not a postfix specific problem... if i change sth to website configs, and apache needs to be restarted, the same effect happens on the apache2 init scripts..
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    And there are no errors in the syslog?
     
  7. lephisto

    lephisto New Member

    no,

    syslog is clean..

    i'm really wondering, i mean, i'm not a noob, and got a similar setup running on approx 15 other machines without a problem..
     
  8. lephisto

    lephisto New Member

    I just traced it a bit down to:

    Code:
    function smtp_restart(){
      global $mod, $go_info;
      $dist_init_scripts = $mod->system->server_conf["dist_init_scripts"];
      if($go_info["server"]["smtp_restart"] == 1){
        $mod->system->daemon_init($mod->system->server_conf["server_mta"], "stop");
        $mod->system->daemon_init($mod->system->server_conf["server_mta"], "start");
      } else {
        $mod->system->daemon_init($mod->system->server_conf["server_mta"], "restart");
      }
    }
    
    what makes the difference there to stop/start and restart? where is $go_info["server"]["smtp_restart"] set?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The one calls the script with parameter restart and the other ones call stop first and then start again. This was nescessary for some very old linux distributions like suse 7 which had faulty start scripts.

    In the config.inc.php file.
     
  10. lephisto

    lephisto New Member

    wrong path.. that ain't the problem..

    i'm stuck now. any other solutio except setting up an all new machine and migrate the data?
     

Share This Page