• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. syschuck
    3. Best
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 26
    • Best 7
    • Controversial 0
    • Groups 0

    Best posts made by syschuck

    • Database fails to initialize 2

      This is a continuation of the Database fails to initialize. The problem is still present even with a clean install of Mageia5. This is using the latest SVN 5950 on a fresh clean install of Mageia 5. Everything in the installer works, but there are some package names that need to be updated in the lib/redhat/config.sh
      mod_ssl becomes apache-mod_ssl, php-process becomes php-pcntl, lastly php-pdo and php-pdo_mysql need to be added to the $packages list.

      Also fog wants to add and apache fog.conf to /etc/httpd/conf.d which doesn’t exist. /etc/httpd/conf/conf.d does and is the correct location for it. (I’ve just been adding a softlink to fix the glitch, ln -s /etc/httpd/conf/conf.d /etc/httpd/conf.d)

      Back to the original problem; When the installer gets to the part where mysql is populating and installing the schema, it should be calling mysql somewhere. Do you know were that might be at? Either there is an error when it’s getting launched or somehow it’s getting skipped.

      posted in Bug Reports
      S
      syschuck
    • Mageia 4/5/6 package update

      Hi. I was wondering if someone could update packages for Mageia. They are out of date.
      Tom did this earlier but I think it got lost. Unfortunately I can’t seem to submit a good diff here so it will need to be a manual edit.

      -- fogproject/lib/redhat/config.sh     2016-08-23 16:36:06.319954790 -0400
      +++ fogproject-new/lib/redhat/config.sh 2016-08-23 17:07:17.658909294 -0400
      @@ -21,7 +21,7 @@
       [[ -z $packageQuery ]] && packageQuery="rpm -q \$x"
       case $linuxReleaseName in
           *[Mm][Aa][Gg][Ee][Ii][Aa]*)
      -        [[ -z $packages ]] && packages="apache apache-mod_php php-gd php-cli php-gettext mariadb mariadb-common mariadb-core mariadb
      -common-core dhcp-server tftp-server nfs-utils vsftpd net-tools wget xinetd tar gzip make m4 gcc gcc-c++ htmldoc perl perl-Crypt-Pass
      wdMD5 lftp php-mysqlnd curl php-mcrypt php-mbstring mod_ssl php-fpm php-process mod_fastcgi"
      +        [[ -z $packages ]] && packages="tar gzip make m4 gcc gcc-c++ net-tools wget xinetd dhcp-server tftp-server nfs-utils vsftpd 
      mariadb mariadb-common mariadb-core mariadb-common-core perl perl-Crypt-PasswdMD5 lftp apache apache-mod_php apache-mod_ssl apache-mo
      d_fcgid php-gd php-cli php-gettext php-mysqlnd curl php-mcrypt php-mbstring php-fpm php-pcntl php-pdo php-pdo_mysql htmldoc"
               [[ -z $packageinstaller ]] && packageinstaller="urpmi --auto"
               [[ -z $packagelist ]] && packagelist="urpmq"
               [[ -z $packageupdater ]] && packageupdater="$packageinstaller"
      @@ -86,7 +86,8 @@
       [[ -z $apachelogdir ]] && apachelogdir="/var/log/httpd"
       [[ -z $apacheerrlog ]] && apacheerrlog="$apachelogdir/error_log"
       [[ -z $apacheacclog ]] && apacheacclog="$apachelogdir/access_log"
      -[[ -z $etcconf ]] && etcconf="/etc/httpd/conf.d/fog.conf"
      +[[ -z $etcconf ]] && etcconf="/etc/httpd/conf/conf.d/fog.conf"
      +
       [[ -z $phpini ]] && phpini="/etc/php.ini"
       [[ -z $storageLocation ]] && storageLocation="/images"
       [[ -z $storageLocationCapture ]] && storageLocationCapture="${storageLocation}/dev"
      
      

      Thanks. Attached is a unified diff of /lib/redhat/config.sh

      posted in General
      S
      syschuck
    • RE: Database fails to initialize 2

      @Wayne-Workman. Solved! I’ve found something. I had to turn on debugging by changing two lines in packages/web/lib/fog/fogbase.class.php.

      protected static $debug = false;
      protected static $info = false;

      Changing those to true opens a large amount of debug info.

      The first line I see is the following;
      FOG DEBUG: PDODB: Failed to connect: SQLSTATE[HY000] [2002] Connection refused
      Several lines later.
      FOG DEBUG: User: isValid Failed: Error: Invalid ID

      There are also a large number of
      FOG DEBUG: PDODB: Failed to query: Cannot connect to database
      FOG DEBUG: PDODB: Failed to fetch: No query result, use query() first
      FOG DEBUG: PDODB: Failed to get: No connection to the database

      That might make since this is a first time install and the database doesn’t exist. This is using user = root and password = ‘’. I tested mysql with $ mysql -u root (from a ordinary user account) and was successfully logged in as mysql root without issue.

      The web eventually does report:

      Database Schema Installer / Updater
      No connection available

      So I suspect it’s not ever connecting the mysql database. PDODB: Failed to connect: SQLSTATE[HY000] [2002] Connection refused . Well a little googling shows that this error occurs when using the wrong host in mysql. We’ve been using an IP adress 127.0.0.1 as the hostname instead of ‘localhost’. So add;

      echo “snmysqlhost=‘localhost’” >> lib/common/config.sh

      fixed it!

      So in otherwords, mysql was using user ‘root’@‘127.0.0.1’ instead of user ‘root’@‘localhost’.

      posted in Bug Reports
      S
      syschuck
    • RE: Mageia 4/5/6 package update

      Thanks. I thought so. I was wondering if you could do one more edit to the the packages line. mod-fastcgi no-longer exists and has been replaced with apache-mod_fcgid. Also I did some re-arranging of the line to clear things up.

      posted in General
      S
      syschuck
    • RE: Database fails to initialize 2

      @Tom-Elliott I think I’ve found the explanation for this behavior. It’s controlled by an option in the mysql configuration /etc/my.cnf. The option is controlled by the variable skip-network which on the MariaDB on Mageia 5 and Ubuntu 16 is enabled. Apparently this is a security enhancement. If the skip-network line is remarked out in /etc/my.cnf Fog has no problems with 127.0.0.1 (or ::1 ip6 for that matter).

      It raises the question of how FOG should handle this. As newer security conscious distros come out, I suspect this will come up more and more.

      posted in Bug Reports
      S
      syschuck
    • RE: Mageia 4/5/6 package update

      @Wayne-Workman Thanks. Fog has become a critical piece server system for our engineering school’s loaner laptop program. We require students to have tablet PCs for the engineering program, and if for some reason their PC can be used, either because it is out for repair or other situations, we will loan them a system preloaded with the most used engineering applications.
      When the system is returned, it gets immediately wiped and refreshed with a new copy using fog. Usually it takes less than 8min per system. Nothing works better. Also, Tom, all the developers and moderators have done an excellent job with the code, patches and suggestions. They deserve all of the praise.

      posted in General
      S
      syschuck
    • RE: Database fails to initialize 2

      @Tom-Elliott Hi Tom, here is a code fragment that will check /etc/my.cnf for the skip-networking flag and set ${snmysqlhost} appropriately. It may not always get it but I think my.cnf is pretty standard for mysql and MariaDB.

      #!/bin/sh
      
      mysqlcfg=/etc/my.cnf
      snmysqlhost='127.0.0.1' 
      if [ -f ${mysqlcfg} ]; then
        W=`grep skip-networking ${mysqlcfg} | sed "/^\s*\;/d;s/\s*\;[^\"']*$//" | sed "/^\s*#/d;s/\s*#[^\"']*$//"`
        if [ ! -z $W ]; then
          snmysqlhost='localhost' 
        fi
      fi
      echo ${snmysqlhost}
      #
      ./installfog.sh -y
      

      Tom, I think you can mark this one as solved.

      posted in Bug Reports
      S
      syschuck
    • 1 / 1