Problems upgrading to ISPConfig-2.2.33

Discussion in 'Installation/Configuration' started by zalo, Oct 29, 2009.

  1. zalo

    zalo New Member

    Tried to upgrade to version 2.2.33 today but ran in to some problems. I'm running SUSE 10.3 but have never seen this problem before.

    The installation stopped after a few seconds and the following error massage was displayed:

    Code:
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
    Do you accept the licence? [y/n]y
    
    Checking the syntax of the httpd.conf...
    ./setup2: line 710: httpd: command not found
    ERROR: The syntax of your httpd.conf is not ok! Please correct the error. The installation routine stops here!
    Could anyone help me solve this problem? or have anyone seen this before?

    Thanks
    Zalo
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you run the script as root user? Make sure that you are logged in as root and dont use sudo.
     
  3. zalo

    zalo New Member

    Was logged in as root when the problem accrued.

    Can not see any problems in my httpd.conf file either.

    Code:
    ### Global Environment ######################################################
    #
    # The directives in this section affect the overall operation of Apache,
    # such as the number of concurrent requests.
    
    # run under this user/group id
    Include /etc/apache2/uid.conf
    
    # - how many server processes to start (server pool regulation)
    # - usage of KeepAlive
    Include /etc/apache2/server-tuning.conf
    
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here.  If you *do* define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    ErrorLog /var/log/apache2/error_log
    
    # generated from APACHE_MODULES in /etc/sysconfig/apache2
    Include /etc/apache2/sysconfig.d/loadmodule.conf
    
    # IP addresses / ports to listen on
    Include /etc/apache2/listen.conf
    
    # predefined logging formats
    Include /etc/apache2/mod_log_config.conf
    
    # generated from global settings in /etc/sysconfig/apache2
    Include /etc/apache2/sysconfig.d/global.conf
    
    # optional mod_status, mod_info
    Include /etc/apache2/mod_status.conf
    Include /etc/apache2/mod_info.conf
    
    # optional cookie-based user tracking
    # read the documentation before using it!!
    Include /etc/apache2/mod_usertrack.conf
    
    # configuration of server-generated directory listings
    Include /etc/apache2/mod_autoindex-defaults.conf
    
    # associate MIME types with filename extensions
    TypesConfig /etc/apache2/mime.types
    DefaultType text/plain
    Include /etc/apache2/mod_mime-defaults.conf
    
    # set up (customizable) error responses
    Include /etc/apache2/errors.conf
    
    # global (server-wide) SSL configuration, that is not specific to 
    # any virtual host
    Include /etc/apache2/ssl-global.conf
    
    # forbid access to the entire filesystem by default
    <Directory />
        Options None
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>
    
    # use .htaccess files for overriding,
    AccessFileName .htaccess
    # and never show them
    <Files ~ "^\.ht">
        Order allow,deny
        Deny from all
    </Files>
    
    # List of resources to look for when the client requests a directory
    DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php5 index.php4 index.php3 index.pl index.html.var index.aspx default.aspx
    
    ### 'Main' server configuration #############################################
    #
    # The directives in this section set up the values used by the 'main'
    # server, which responds to any requests that aren't handled by a
    # <VirtualHost> definition.  These values also provide defaults for
    # any <VirtualHost> containers you may define later in the file.
    #
    # All of these directives may appear inside <VirtualHost> containers,
    # in which case these default settings will be overridden for the
    # virtual host being defined.
    #
    Include /etc/apache2/default-server.conf
    
    
    # Another way to include your own files
    #
    # The file below is generated from /etc/sysconfig/apache2,
    # include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
    # APACHE_CONF_INCLUDE_DIRS
    Include /etc/apache2/sysconfig.d/include.conf
    
    
    ### Virtual server configuration ############################################
    #
    # VirtualHost: If you want to maintain multiple domains/hostnames on your
    # machine you can setup VirtualHost containers for them. Most configurations
    # use only name-based virtual hosts so the server doesn't need to worry about
    # IP addresses. This is indicated by the asterisks in the directives below.
    #
    # Please see the documentation at
    # <URL:http://httpd.apache.org/docs-2.2/vhosts/>
    # for further details before you try to setup virtual hosts.
    #
    # You may use the command line option '-S' to verify your virtual host
    # configuration.
    #
    Include /etc/apache2/vhosts.d/*.conf
    
    
    # Note: instead of adding your own configuration here, consider 
    #       adding it in your own file (/etc/apache2/httpd.conf.local)
    #       putting its name into APACHE_CONF_INCLUDE_FILES in 
    #       /etc/sysconfig/apache2 -- this will make system updates 
    #       easier :) 
    
    <Directory /var/www/sharedip>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    ###############ispconfig_log###############
    LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
    CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig
    
    <Directory /srv/www/*/web>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    <Directory /srv/www/*/user/*/web>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    <Directory /srv/www/*/cgi-bin>
        Options ExecCGI -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    Include /etc/apache2/vhosts/Vhosts_ispconfig.conf
    
    This is the part of the script were the upgrade fails:

    Code:
      echo $q_httpd_syntax_check
      if [ -f /etc/apache2/envvars ]; then
        . /etc/apache2/envvars && httpd -t
      else
        httpd -t
      fi
      if [ $? != 0 ]; then
        error "$q_httpd_syntax_check_not_ok";
      fi
      echo $q_httpd_syntax_check_ok
      log "httpd syntax ok!"
    Do anyone have any ideas?

    Regards
    Zalo
     
    Last edited: Oct 30, 2009
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is not the httpd.conf, the problem is that the httpd binary or the symlink to it is missing.

    Find out how your apache binary is named e.g. by running:

    which apache2
    which apache
    which httpd

    and then create a symlink like:

    ln -s /usr/bin/apache2 /usr/bin/httpd

    where /usr/bin/apache2 has to be replaced with the path to the httpd binary on your server.
     
  5. zalo

    zalo New Member

    Can not find any "envvars" file in the /etc/apache2 directory. is this file required?

    Thanks
    Zalo
     
  6. zalo

    zalo New Member

    which apache2:
    Code:
    websrv01:~ # which apache2
    which: no apache2 in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin)
    
    which apache
    Code:
    websrv01:~ # which apache
    which: no apache in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin)
    
    which httpd:
    Code:
    websrv01:~ # which httpd
    which: no httpd in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin)
    

    Sorry, but did not quite understand that. Could you help me create the symlink?

    Thanks for the quick reply.

    Regards
    Zalo
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Hm... It seems as if Apache isn't installed on your system. Can you check with YaST?
     
  8. zalo

    zalo New Member

    Apache version 2.2.4-70.11 is installed according to YAST. :confused:


    This is the comments found under the Apache-devel in YAST. Is any of these "/usr/sbin" directories the one that I need?
    Code:
     │apache2-devel - Apache 2.0 Header and Include Files                         ┬
     │Version: 2.2.4-70.11 Installed: 2.2.4-70.11 Size: 616.2 K Media No.: 0      │
     │License: The Apache Software License                                        │
     │Package Group: Development/Libraries/C and C++                              │
     │Provides: apache2-devel == 2.2.4-70.11, /usr/sbin/apxs2-event,              ┴
     │/usr/sbin/apxs2-prefork, /usr/sbin/apxs2, /usr/sbin/apxs2-worker  
    Thanks
    Zalo
     
  9. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    updatedb
    locate apache
    locate httpd
    ?
     
  10. zalo

    zalo New Member

    Is there any way to narrow the search a litle bit? The "locate apache" command displays too many pages of files and folders so I cannot copy the all out for you.

    Zalo
     
  11. falko

    falko Super Moderator ISPConfig Developer

    Let's try it this way: what's in /etc/init.d/apache2?
     
  12. zalo

    zalo New Member

    /etc/init.d/apache2
    Code:
    #!/bin/sh
    #
    # Copyright (c) 1996, 1997, 1998 S.u.S.E. GmbH
    # Copyright (c) 1998, 1999, 2000, 2001 SuSE GmbH
    # Copyright (c) 2002, 2003, (2004?) SuSE Linux AG
    # Copyright (c) 2004(?), 2005, 2006, 2007 SUSE Linux Products GmbH
    #
    # Authors: Rolf Haberrecker <apache@suse.de>, 2001
    #          Peter Poeml <apache@suse.de>, 2002, 2003, 2004, 2005, 2006, 2007
    #
    #
    # /etc/init.d/apache2
    #
    ### BEGIN INIT INFO
    # Provides:			apache2 httpd2
    # Required-Start:		$local_fs $remote_fs $network 
    # X-UnitedLinux-Should-Start:	$named $time postgresql sendmail mysql ypclient dhcp radiusd
    # Required-Stop:		$local_fs $remote_fs $network
    # X-UnitedLinux-Should-Stop:	
    # Default-Start:		3 5
    # Default-Stop:			0 1 2 6
    # Short-Description:		Apache 2.2 httpd
    # Description:			Start the httpd daemon Apache
    ### END INIT INFO
    
    pname=apache2
    : ${sysconfdir:=/etc/$pname}
    : ${apache_link:=/usr/sbin/httpd2}
    : ${sysconfig_apache:=/etc/sysconfig/$pname}
    : ${pidfile:=/var/run/httpd2.pid}
    : ${logdir:=/var/log/$pname}
    : ${homedir:=/var/lib/$pname}
    
    #
    # load the configuration
    #
    test -s /etc/rc.status && . /etc/rc.status && rc_reset
    
    . /usr/share/$pname/load_configuration
    export ${!APACHE_*}
    
    httpd_conf=${APACHE_HTTPD_CONF:-$sysconfdir/httpd.conf}
    
    apache_bin=$(/usr/share/$pname/find_mpm 2>/dev/null)
    
    test -L $apache_link && apache_bin=$(readlink $apache_link)
    
    if [ -z "$APACHE_MPM" ]; then 
    	APACHE_MPM=${apache_bin##*-}
    fi
    
    if ! [ -x $apache_bin ]; then
    	echo >&2 ${warn}$apache_bin-$APACHE_MPM is not a valid httpd2 binary. 
    	echo >&2 Check your APACHE_MPM setting in /etc/sysconfig/$pname. $norm
    	rc_failed 5
    	rc_status -v1
    	rc_exit
    fi
    
    # a proper home should be set, otherwise the server might end up 
    # with HOME=/root and some script might try to use that
    HOME=$homedir
    
    get_server_flags()
    {
    	unset server_flags
    	case "$action" in startssl) server_flags="-DSSL";; esac
    	for i in $APACHE_SERVER_FLAGS; do
    		case $i in 
    		-D)	;;
    		-D*)	server_flags="$server_flags $i";;
    		*)	server_flags="$server_flags -D$i";;
    		esac
    	done
    }
    
    action="$1"
    case "$action" in
        stop|try-restart|*status*|probe)
    	;;
        *)
    	shift; get_server_flags
    	${get_module_list_done:=false} || /usr/share/$pname/get_module_list && export get_module_list_done=true
    	${get_includes:=false} || /usr/share/$pname/get_includes && export get_includes_done=true
    	;;
    esac
    
    #
    # main part 
    #
    case "$action" in
        start*)
    	if [ -e $pidfile ]; then
    	        $0 status &>/dev/null
    		ret=$?
    		if [ $ret = 1 ]; then
    				echo "Warning: found stale pidfile (unclean shutdown?)"
    		elif [ $ret = 0 ]; then
    				echo "Apache is already running ($pidfile)"
    				rc_failed $ret
    				rc_status -v1
    				rc_exit
    		fi
    	fi
    
    	echo -n "Starting httpd2 (${APACHE_MPM:-${apache_bin#*-}}) "
    	cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
    	if eval $cmdline -t > $logdir/rc$pname.out 2>&1 ; then
    		export -n ${!APACHE_*}
    		eval startproc -f -t ${APACHE_START_TIMEOUT:-2} $cmdline
    		ret=$?
    
    		if test -t 1 && stty -a 2>/dev/null | grep -q -- -echo\ ; then 
    			# this means that apache was still waiting for a passphrase to be entered 
    			stty echo 2>/dev/null
    			echo;echo 
    			echo >&2 An SSL passphrase has not been entered within ${APACHE_START_TIMEOUT:-<not set>} seconds.
    			echo >&2 To increase this timeout, adjust APACHE_START_TIMEOUT in $sysconfig_apache .
    			# this surely means that apache won't start, despite it looked good to startproc
    			killall $apache_bin
    			echo >&2 "Trying to start the server without SSL (-D NOSSL)."
    			$0 start "$@" -D NOSSL
    			# rc_failed 1
    			# rc_status -v1
    			# rc_exit
    		else
    			rc_failed $ret
    			rc_status -v
    		fi
    	else
    		if [ "$link" = "$base" ] ; then
    			cat $logdir/rc$pname.out
    			echo >&2
    			echo >&2 The command line was:
    			echo >&2 $cmdline
    			echo >&2
    		else
    			echo -e -n "\nsee $logdir/rc$pname.out for details\n";
    		fi
    		rc_failed 1
    		rc_status -v1
            fi
    	;;
        stop)
    	echo -n "Shutting down httpd2 "
            if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
    	if ! [ -f $pidfile ]; then
    		echo -n "(not running)"
    	else
    		pid=$(<$pidfile)
    		kill -TERM $pid 2>/dev/null
    		case $? in
    		    1)  echo -n "(not running)";;
    		    0)  # wait until the processes are gone (the parent is the last one)
    			echo -n "(waiting for all children to terminate) "
    			for ((wait=0; wait<120; wait++)); do
    				if test -f $pidfile; then 
    					usleep 500000
    					continue
    				fi
    				if ! test -f /proc/$pid/exe; then
    					break
    				fi
    				if test "$(readlink /proc/$pid/exe 2>/dev/null)" = $apache_bin; then 
    					usleep 500000
    				else
    					break
    				fi
    
    			done
    			;;
    		esac
    	fi
    
    	rc_status -v
    	;;
        try-restart)
    	## Do a restart only if the service was active before.
    	## Note: try-restart is now part of LSB (as of 1.9).
    	## RH has a similar command named condrestart.
    	$0 status
    	if test $? = 0; then
    		$0 restart
    	else
    		rc_reset        # Not running is not a failure.
    	fi
    	# Remember status and be quiet
    	rc_status
    	;;
        restart)
    	$0 configtest "$@" || { rc_failed $?; rc_exit; }
    
    	if $0 status &>/dev/null; then 
    		$0 stop
    	fi
    	$0 start "$@"
    	# Remember status and be quiet
    	rc_status
    	;;
        restart-hup)
    	$0 configtest "$@" || { rc_failed $?; rc_exit; }
    
    	if $0 status &>/dev/null; then 
    		echo -n "Restarting httpd2 (SIGHUP)"
    		kill -HUP $(<$pidfile) || return=$rc_failed
    	else 
    		$0 start "$@"
    	fi
    	# Remember status and be quiet
            rc_status -v
    	;;
        reload|force-reload|graceful)
    	echo -n "Reload httpd2 (graceful restart)"
    	cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
    	if eval $cmdline -t &> $logdir/rc$pname.out; then
    		killproc -USR1 $apache_bin || return=$rc_failed
    		rc_status -v
    	else
    		if [ "$link" = "$base" ] ; then
    			echo -e -n "\n\n"
    			cat $logdir/rc$pname.out
    			echo >&2
    			echo >&2 The command line was:
    			echo >&2 $cmdline
    			echo >&2
    		else
    			echo -e -n "\nsee $logdir/rc$pname.out for details\n";
    		fi
    		rc_failed 6
    		rc_status -v1
            fi
    	;;
        status)
            if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
            echo -n "Checking for httpd2: "
    	# we don't use checkproc here since it is confused when we exchange the binaries
    	if ! [ -f $pidfile ]; then
    		# not running
    		rc_failed 3
    	elif [ -s $pidfile -a -d /proc/$(<$pidfile) ]; then
    		# running
    		:
    	else
    		# stale pid file
    		rc_failed 1
    		#rm -f $pidfile
    	fi
    	rc_status -v
    	;;
        probe)
            ## Optional: Probe for the necessity of a reload,
            ## give out the argument which is required for a reload.
    
    	for i in $httpd_conf \
    	  $APACHE_CONF_INCLUDE_FILES \
    	  $APACHE_CONF_INCLUDE_DIRS 
    	do
    		if [ $i -nt $pidfile ]; then
    			echo reload
    			break
    		fi
    	done
            ;;
    
        conf*|test|syntax|check)
    	cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
    	eval $cmdline -t 
    	rc_failed $?
    	rc_exit
    	;;
    
        extr*)
    	cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
    	out=$(su - nobody -c "$cmdline" 2>&1)
    	case $out in 
    	    *make_sock:\ could\ not\ bind\ to\ address*) echo Syntax: OK; rc_failed=0;;
    	    *) echo Syntax: NOT OK:; echo $out; rc_failed=1;;
    	esac
    	rc_exit
    	;;
    
        server-status)
    	apache2ctl status
    	;;
    
        full-server-status|fullstatus)
    	apache2ctl fullstatus
    	;;
    
        *)
        cat >&2 <<-EOF 
    	Usage: $0 <command> <server flags>
    
    	where <command> is one of:
    	        start              - start httpd
    	        startssl           - start httpd with -DSSL
    	        stop               - stop httpd (sendign SIGTERM to parent)
    	        try-restart        - stop httpd and if this succeeds (i.e. if
    	                             it was running before), start it again.
    	        status             - check whether httpd is running
    	        restart            - stop httpd if running; start httpd
    	        reload|graceful    - do a graceful restart by sending a SIGUSR1 or 
    	                             start if not running
    	        configtest         - do a configuration syntax test
    	        extreme-configtest - try to run httpd as nobody (detects more errors 
    	                             by actually loading the configuration, but cannot 
    	                             read SSL certificates)
    	        probe              - probe for the necessity of a reload, give 
    	                             out the argument which is required for a reload.
    	                             (by comparing conf files with pidfile timestamp)
    	        full-server-status - dump a full status screen; requires lynx or w3m 
    	                             and mod_status enabled
    	        server-status      - dump a short status screen; requires lynx or w3m
    	                             and mod_status enabled
    	        help               - this screen
    	
    	optional server flags are passed through to httpd.
    	
    	EOF
        exit 1
    esac
    
    
    # Inform the caller not only verbosely and set an exit status.
    rc_exit
    Thanks
    Zalo
     
  13. falko

    falko Super Moderator ISPConfig Developer

    What are the outputs of
    Code:
    ls -l /usr/sbin/httpd*
    and
    Code:
    ls -l /usr/sbin/apache*
    ?
     
  14. zalo

    zalo New Member

    ls -l /usr/sbin/httpd*
    Code:
    web01:~ # ls -l /usr/sbin/httpd*
    lrwxrwxrwx 1 root root     16 Mar  1  2008 /usr/sbin/httpd -> /usr/sbin/httpd2
    lrwxrwxrwx 1 root root     24 Nov  2 22:34 /usr/sbin/httpd2 -> /usr/sbin/httpd2-prefork
    -rwxr-xr-x 1 root root 352672 Oct 20 19:10 /usr/sbin/httpd2-prefork
    
    ls -l /usr/sbin/apache*
    Code:
    web01:~ # ls -l /usr/sbin/apache*
    -rwxr-xr-x 1 root root 3811 Oct 20 19:07 /usr/sbin/apache2ctl
    
    Tnx :)
    Zalo
     
  15. falko

    falko Super Moderator ISPConfig Developer

    Code:
    lrwxrwxrwx 1 root root     16 Mar  1  2008 /usr/sbin/httpd -> /usr/sbin/httpd2
    Looks ok. What's the output of
    Code:
    which httpd
    ?
     
  16. zalo

    zalo New Member

    which httpd
    Code:
    websrv01:~ # which httpd
    /usr/sbin/httpd
    For some reason the "which httpd" shows a different result than earlier. :confused:


    Tnx
    Zalo
     
    Last edited: Nov 5, 2009
  17. falko

    falko Super Moderator ISPConfig Developer

    Ok, then the upgrade should work now.
     

Share This Page