Connection Refused

Discussion in 'Installation/Configuration' started by m u r, Dec 30, 2005.

  1. m u r

    m u r Member

    I installed ISPConfig with Suse 9.2. The installation seemed to work fine, but when I tried http://www2.lcpm.net and https://www2.lcpm.net (I can't remember whether or not I made it secure during setup), it says the connection was refused. We tried using the internal and external IPs as well with no luck. Please help.
     
    Last edited: Dec 30, 2005
  2. falko

    falko Super Moderator ISPConfig Developer

  3. m u r

    m u r Member

    That is when I get the error. Sorry for not writing that in the previous post. I have been directing it to port 81, and the connection is still refused.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Is ISPConfig running? Please post the output of
    Code:
    netstat -tap
    and also of
    Code:
    iptables -L
    (might also be a firewall issue).
     
  5. m u r

    m u r Member

    www2:~ # netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    PID/Program name
    tcp 0 0 *:mysql *:* LISTEN
    3152/mysqld
    tcp 0 0 *:sunrpc *:* LISTEN
    2911/portmap
    tcp 0 0 *:ipp *:* LISTEN
    3556/cupsd
    tcp 0 0 *:smtp *:* LISTEN
    3685/master
    tcp 0 0 localhost:953 *:* LISTEN
    3153/named
    tcp 0 0 www2.lcpm.net:1029 h7252.serverko:www-http ESTABLISHED
    13435/konquerorUlI2
    tcp 0 0 www2.lcpm.net:iad1 h7252.serverko:www-http ESTABLISHED
    13432/konqueror9vKm
    tcp 0 0 www2.lcpm.net:blackjack h7252.serverko:www-http ESTABLISHED
    13428/konquerorptMc
    tcp 0 0 www2.lcpm.net:cap h7252.serverko:www-http TIME_WAIT
    -
    tcp 0 0 www2.lcpm.net:exosee h7252.serverko:www-http ESTABLISHED
    13434/konquerors4CB
    tcp 0 0 www2.lcpm.net:ams p15166624.pure:www-http TIME_WAIT
    -
    tcp 0 0 www2.lcpm.net:iad2 p15166624.pure:www-http TIME_WAIT
    -
    tcp 0 0 www2.lcpm.net:iad3 p15166624.pure:www-http TIME_WAIT-
    tcp 0 0 *:imaps *:* LISTEN3325/couriertcpd
    tcp 0 0 *:pop3s *:* LISTEN3297/couriertcpd
    tcp 0 0 *:pop3 *:* LISTEN3303/couriertcpd
    tcp 0 0 *:imap *:* LISTEN3354/couriertcpd
    tcp 0 0 *:www-http *:* LISTEN3764/httpd2-prefork
    tcp 0 0 *:domain *:* LISTEN3153/named
    tcp 0 0 *:ssh *:* LISTEN3102/sshd
    tcp 0 0 *:smtp *:* LISTEN3685/master
    tcp 0 0 localhost:953 *:* LISTEN3153/named
    tcp 0 0 *:https *:* LISTEN3764/httpd2-prefork


    and

    www2:~ # iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
     
  6. falko

    falko Super Moderator ISPConfig Developer

    The firewall's not the problem, but ISPConfig isn't running! Please start it:
    Code:
    /etc/init.d/ispconfig_server start
     
  7. m u r

    m u r Member

    When I tried that, I got the following error:

    www2:~/install_ispconfig # /etc/init.d/ispconfig_server start
    bash: /etc/init.d/ispconfig_server: No such file or directory

    I tried installing ISPConfig again and tried again. I still got the same error.

    www2:~/install_ispconfig # netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:mysql *:* LISTEN 14148/mysqld
    tcp 0 0 *:sunrpc *:* LISTEN 2911/portmap
    tcp 0 0 *:ipp *:* LISTEN 3556/cupsd
    tcp 0 0 *:smtp *:* LISTEN 3685/master
    tcp 0 0 localhost:953 *:* LISTEN 3153/named
    tcp 0 0 *:imaps *:* LISTEN 3325/couriertcpd
    tcp 0 0 *:pop3s *:* LISTEN 3297/couriertcpd
    tcp 0 0 *:pop3 *:* LISTEN 3303/couriertcpd
    tcp 0 0 *:imap *:* LISTEN 3354/couriertcpd
    tcp 0 0 *:www-http *:* LISTEN 3764/httpd2-prefork
    tcp 0 0 *:domain *:* LISTEN 3153/named
    tcp 0 0 *:ssh *:* LISTEN 3102/sshd
    tcp 0 0 *:smtp *:* LISTEN 3685/master
    tcp 0 0 localhost:953 *:* LISTEN 3153/named
    tcp 0 0 *:https *:* LISTEN 3764/httpd2-prefork
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Then either ISPConfig is not installed (maybe you deleted it?), or you deleted /etc/init.d/ispconfig_server somehow.

    However, this is /etc/init.d/ispconfig_server:

    Code:
    #!/bin/bash
    ###############################################################################
    # Copyright (c) 2005, projektfarm Gmbh, Till Brehm, Falko Timme
    # All rights reserved.
    #
    # Redistribution and use in source and binary forms, with or without modification,
    # are permitted provided that the following conditions are met:
    #
    #     * Redistributions of source code must retain the above copyright notice,
    #       this list of conditions and the following disclaimer.
    #     * Redistributions in binary form must reproduce the above copyright notice,
    #       this list of conditions and the following disclaimer in the documentation
    #       and/or other materials provided with the distribution.
    #     * Neither the name of ISPConfig nor the names of its contributors
    #       may be used to endorse or promote products derived from this software without
    #       specific prior written permission.
    #
    # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    # IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
    # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    ###############################################################################
    
    ###################################
    #
    # ISPConfig Server-Startscript
    #
    ###################################
    
    TMPDIR=/tmp
    PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
    
    case "$1" in
        start)
            echo "Starting ISPConfig system..."
            {INITDIR}/mysqld start &> /dev/null
            sleep 3
            /root/ispconfig/httpd/bin/apachectl startssl
            /root/ispconfig/sv/ispconfig_wconf &> /dev/null &
            /root/ispconfig/php/php -q /root/ispconfig/scripts/shell/firewall.php
            if ps ax | grep -iw '/home/admispconfig/ispconfig/tools/clamav/bin/freshclam' | grep -iv 'grep' &> /dev/null ;then
              echo "FreshClam is already running!"
            else
              /home/admispconfig/ispconfig/tools/clamav/bin/freshclam -d -c 10 --datadir=/home/admispconfig/ispconfig/tools/clamav/share/clamav
            fi
            echo "ISPConfig system is now up and running!"
        ;;
        stop)
            echo "Shutting down ISPConfig system..."
            array=(`ps ax | grep -iw '/root/ispconfig/sv/ispconfig_wconf' | grep -iv 'grep' | awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`)
            element_count=${#array[@]}
            index=0
            while [ "$index" -lt "$element_count" ]
            do
              kill -9 ${array[$index]}
              let "index = $index + 1"
            done
            /root/ispconfig/httpd/bin/apachectl stop
            array=(`ps ax | grep -iw '/home/admispconfig/ispconfig/tools/clamav/bin/freshclam' | grep -iv 'grep' | awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`)
            element_count=${#array[@]}
            index=0
            while [ "$index" -lt "$element_count" ]
            do
              kill -9 ${array[$index]}
              let "index = $index + 1"
            done
            echo "ISPConfig system stopped!"
        ;;
        restart)
            $0 stop  && sleep 3
            $0 start
            # Remember status and be quiet
        ;;
        *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
    esac
    exit 0
    Create it, and then chmod it:
    Code:
    chmod 755 /etc/init.d/ispconfig_server
     
  9. m u r

    m u r Member

    I started ISPConfig, but something is wrong. It is as though I never installed ISPConfig, but I have . . . twice.

    www2:~ # /etc/init.d/ispconfig_server start
    Starting ISPConfig system...
    fopen: No such file or directory
    ispconfig_httpd: could not open document config file /root/ispconfig/httpd/conf/httpd.conf
    /root/ispconfig/httpd/bin/apachectl startssl: httpd could not be started
    Could not open input file: /root/ispconfig/scripts/shell/firewall.php.
    ISPConfig system is now up and running!
     
  10. falko

    falko Super Moderator ISPConfig Developer

    It looks as if ISPConfig isn't installed. Please post the output of
    Code:
    ls -l /root/ispconfig
    and
    Code:
    ls -l /home/admispconfig
     
  11. m u r

    m u r Member

    I deleted the ISPConfig directory (again) and re-installed. This time it worked fine. Thanks.
     

Share This Page