Webdav/Apache with SuSe help!

Discussion in 'HOWTO-Related Questions' started by nnate72, May 7, 2010.

  1. nnate72

    nnate72 New Member

    Hey,
    I'm following Falko's tutorial on how to set up WebDav/Apache, and have run into a problem. I am running a NXserver VNC and doing the work remotely on my laptop. Here is where the problem occurs:

    Code:
    chkconfig --add apache2                                                                                                                                        
    insserv: warning: script 'S99nxserver' missing LSB tags and overrides                                                                                                             
    insserv: warning: script 'S01nxsensor' missing LSB tags and overrides                                                                                                             
    insserv: warning: script 'nxsensor' missing LSB tags and overrides                                                                                                                
    insserv: warning: script 'nxserver' missing LSB tags and overrides                                                                                                                
    insserv: Starting nxserver depends on stoppreload and therefore on system facility `$all' which can not be true!                                                                  
    insserv: Starting nxserver depends on stoppreload and therefore on system facility `$all' which can not be true! 
    And then further down,
    Code:
    insserv: Max recursions depth 99 reached                                                                                                                                          
    insserv: Starting nxserver depends on stoppreload and therefore on system facility `$all' which can not be true!                                                                  
    insserv: There is a loop between service stoppreload and boot.cleanup if started                                                                                                  
    insserv:  loop involving service boot.cleanup at depth 3                                                                                                                          
    insserv:  loop involving service boot.localfs at depth 2                                                                                                                          
    insserv: There is a loop between service stoppreload and boot.clock if started                                                                                                    
    insserv:  loop involving service boot.clock at depth 1                                                                                                                            
    insserv: There is a loop between service stoppreload and boot.cleanup if started                                                                                                  
    insserv:  loop involving service boot.quota at depth 3                                                                                                                            
    insserv: There is a loop between service nxserver and boot.crypto if started                                                                                                      
    insserv:  loop involving service boot.crypto at depth 1                                                                                                                           
    insserv: There is a loop between service nxserver and boot.localfs if started                                                                                                     
    insserv:  loop involving service boot.lvm at depth 2                                                                                                                              
    insserv:  loop involving service boot.dmraid at depth 3                                                                                                                           
    insserv:  loop involving service boot.rootfsck at depth 1   
    Do you have any suggestions on how to get this working? Thanks! (I am really new to linux, so bear with me.)
     
  2. falko

    falko Super Moderator Howtoforge Staff

    How exactly did you install NXserver? Did you use RPM packages for SUSE?
    What's in /etc/init.d/nxserver and /etc/init.d/nxsensor?
     
  3. nnate72

    nnate72 New Member

    Yea, I used the RPMs. Here are nxsensor and nxserver


    nxsensor:
    Code:
    #!/bin/sh
    ############################################################################
    #                                                                          #
    #  Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com.           #
    #                                                                          #
    #  NXSERVER, NX protocol compression and NX extensions to this software    #
    #  are copyright of NoMachine. Redistribution and use of the present       #
    #  software is allowed according to terms specified in the file LICENSE    #
    #  which comes in the source distribution.                                 #
    #                                                                          #
    #  Check http://www.nomachine.com/licensing.html for applicability.        #
    #                                                                          #
    #  NX and NoMachine are trademarks of Medialogic S.p.A.                    #
    #                                                                          #
    #  All rigths reserved.                                                    #
    #                                                                          #
    ############################################################################
    
    # Basic support for RedHat style chkconfig
    #
    # chkconfig: - 99 01
    # description: Starts and stops the NoMachine NX Server.
    
    NODE_ROOT='/usr/NX'
    CONFIG_FILE="$NODE_ROOT/etc/node.cfg"
    COMMAND_NXSENSOR="$NODE_ROOT/bin/nxsensor"
    NXSENSOR_PATH_PID="$NODE_ROOT/var/run/nxsensor.pid"
    StatisticsHost="127.0.0.1"
    NodeSensorPort="19250"
    
    grep CONFIG_FILE_VERSION $CONFIG_FILE > /dev/null
    if [ $? -eq 0 ]
    then
      EnableSensorStr="ENABLE_SENSOR"
      StatisticsHostStr="NODE_SENSOR_HOST"
      NodeSensorPortStr="NODE_SENSOR_PORT"
    else
      EnableSensorStr="EnableSensor"
      StatisticsHostStr="StatisticsHost"
      NodeSensorPortStr="NodeSensorPort"
    fi
    
    [ -f $COMMAND_NXSENSOR ] || { echo "ERROR: $COMMAND_NXSENSOR doesn't exist" ; exit 1; }
    
    tmp=`/usr/bin/awk -F'"' '/^'$EnableSensorStr'/ {print $2}' $CONFIG_FILE`
    if [ "x$tmp" != "x1" ];
    then
      echo "nxsensor is disabled in '$NODE_ROOT/etc/node.cfg'" && exit 0
      #exit 0
      #echo "nxsensor is disabled in '$NODE_ROOT/etc/node.cfg'" && exit 1
    fi
    
    start()
    {
    tmp=`/usr/bin/awk -F'"' '/^'$StatisticsHostStr'/ {print $2}' $CONFIG_FILE`
    if [ "x$tmp" != "x" ];
    then
      StatisticsHost=$tmp
    fi
    
    tmp=`/usr/bin/awk -F'"' '/^'$NodeSensorPortStr'/ {print $2}' $CONFIG_FILE`
    if [ "x$tmp" != "x" ];
    then
      NodeSensorPort=$tmp
    fi
    
    $COMMAND_NXSENSOR "-a" "$StatisticsHost" "-a" "::ffff:$StatisticsHost" "-P" "$NodeSensorPort" "-d"
    
    PID=`ps -ef| grep \/usr\/NX\/bin\/nxsensor |grep -v grep | awk '{print $2}'`;
    if [ "x$PID" = "x" ];
    then
      echo "failed"
      exit 1
    fi
    
    echo $PID > $NXSENSOR_PATH_PID 
    
    }
    
    stop() 
    {
    PID=`cat $NXSENSOR_PATH_PID`
    if [ "x$PID" = "x" ];
    then
      echo "failed"
      rm $NXSENSOR_PATH_PID
      exit 1
    fi
    
    kill $PID
    rm $NXSENSOR_PATH_PID
    }
    
    restart()
    {
      stop
      sleep 1
      start
    }
    
    case $1 in
    start)
       if  [ ! -f $NXSENSOR_PATH_PID ] ;
       then
          start
          touch /var/lock/subsys/nxsensor
       else
         echo "Service already running"
       fi
       ;;
    
    stop)
      if [ ! -f $NXSENSOR_PATH_PID ];
      then
        echo "Service was already stopped"
      else
        stop
        rm -f /var/lock/subsys/nxsensor
      fi
      ;;
    
    restart)
      if  [ ! -f $NXSENSOR_PATH_PID ] ;
      then
        echo "WARNING: Service was already stopped, trying to start"
        start
      else
        restart
      fi  
      ;;
    *)
      echo "Usage: $0 {start|stop|restart}"
      exit 1
      ;;
    esac
    
    nxserver:

    Code:
    #!/bin/sh
    ############################################################################
    #                                                                          #
    #  Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com.           #
    #                                                                          #
    #  NXSERVER, NX protocol compression and NX extensions to this software    #
    #  are copyright of NoMachine. Redistribution and use of the present       #
    #  software is allowed according to terms specified in the file LICENSE    #
    #  which comes in the source distribution.                                 #
    #                                                                          #
    #  Check http://www.nomachine.com/licensing.html for applicability.        #
    #                                                                          #
    #  NX and NoMachine are trademarks of Medialogic S.p.A.                    #
    #                                                                          #
    #  All rigths reserved.                                                    #
    #                                                                          #
    ############################################################################
    
    # Basic support for RedHat style chkconfig
    #
    # chkconfig: - 99 01
    # description: Starts and stops the NoMachine NX Server.
    
    NODE_ROOT='/usr/NX'
    
    [ -f $NODE_ROOT/bin/nxserver ] || { echo "ERROR: $NODE_ROOT/bin/nxserver doesn't exist" ; exit 1; }
    
    start()
    {
      $NODE_ROOT/bin/nxserver --start
      $NODE_ROOT/bin/nxserver --statistics start
    }
    
    stop()
    {
      $NODE_ROOT/bin/nxserver --stop
      $NODE_ROOT/bin/nxserver --statistics stop
    }
    
    restart()
    {
      $NODE_ROOT/bin/nxserver --restart
      $NODE_ROOT/bin/nxserver --statistics restart
    }
    
    case "$1" in
    'start')
      if [ ! -f $NODE_ROOT/home/nx/.ssh/authorized_keys2 ] && [ ! -f $NODE_ROOT/home/nx/.ssh/authorized_keys ] ;
      then
        start
        touch /var/lock/subsys/nxserver
      else
        echo "Service already running"
      fi
      ;;
    
    'stop')
      if [ ! -f $NODE_ROOT/home/nx/.ssh/authorized_keys2 ] && [ ! -f $NODE_ROOT/home/nx/.ssh/authorized_keys ];
      then
        echo "Service was already stopped"
      else
        stop
        rm -f /var/lock/subsys/nxserver
      fi
      ;;
    
    'restart')
      if  [ ! -f $NODE_ROOT/home/nx/.ssh/authorized_keys2 ] && [ ! -f $NODE_ROOT/home/nx/.ssh/authorized_keys ] ;
      then
        echo "WARNING: Service was already stopped, trying to start"
        start
      else
        restart
      fi  
      ;;
    *)
      echo "Usage: $0 {start|stop|restart}"
      exit 1
      ;;
    esac
    

    I'm also having trouble accessing the server outside of my local network. (I can connect via 192.168.1.xxx, but if I try to connect via a no-ip dns redirect I have, I can't connect.... I am behind a router if that helps. I've tried forwarding port 80 traffic to the server but it hasn't helped.)
    Thanks
     
    Last edited: May 8, 2010
  4. falko

    falko Super Moderator Howtoforge Staff

    Can you post another init script from your /etc/init.d/ directory? I guess the beginning of the nx... scripts should look a bit different.
     

Share This Page