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

    syschuck

    @syschuck

    7
    Reputation
    784
    Profile views
    26
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Location University of Louisville

    syschuck Unfollow Follow

    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

    Latest posts made by syschuck

    • redhat/config.sh missing a pre-requisite

      Hi All. It’s been a while. Good to see fog still going strong. I just finished installing fog 1.5.4 on a new fresh Mageia 6 (64) and nearly had a flawless install. Except for one hick-up. For the prerequisites, there is one addition and one removal needed on the line containing the list of packages. First, we need to add “php-curl” to the list of other php extensions listed. Somehow that one was missed.

      The next change is something I’m not sure what to think about. In the same list of packages, liblzma-devel is included. For 64-bit Mageia systems that should be lib64lzma-devel. However, after looking at it, I really wonder if it’s needed at all. It’s just the C header files for lzma compression. It also provides the xz-development C-header files of the xz-devel packages for CentOS/Redhat line.

      I can’t think of what fog would need with the lzma-devel or xz-devel headers for. Does anyone else see a reason to have them as a prerequisite for installing fog? If there are no objections, I would recommend removing those entries.

      posted in FOG Problems
      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: 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
    • 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

      @Tom-Elliott That makes sense. I think there is also a /etc/my.cnf.d under ubuntu and mageia that skip-networking could be hidden under. So seems reasonable. Be aware, my.cnf has two comment characters, ‘#’ and ‘;’. That’s why my sed thing was so contorted.

      posted in Bug Reports
      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
    • 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: 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: Database fails to initialize 2

      @syschuck. I’m still baffled with this bug. Just to make sure it wasn’t the OS or a library causing some issue, I when back to fog_1.2.0, downloaded the tar, built and installed it on Mageia 5. It worked perfect! So I thought, maybe the new fog 1.3.0 RC8 would be different if there was already a database installed. It didn’t. I’m trying now to go-back to a SVN revision where the SQL initialization worked.

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

      @Quazz. That is part of the problem. There are no errors that are reported. The install script runs perfectly up to the point where it say;

      • You still need to install/update your database schema.

      • This can be done by opening a web browser and going to:

        http://192.168.1.4/fog/management

      • Press [Enter] key when database is updated/installed.

      When you do go to http://192.168.1.4/fog/management your get the message:

      Your database connection appears to be invalid. FOG is unable to communicate with the database. There are many reasons why this could be the case. Please check your credentials in /var/www/fog/lib/fog/config.class.php. Also confirm that the database is indeed running. If credentials are correct, and the Database service is running, check to ensure your filesystem has enough space.

      When I examine, the fog database hasn’t even been created in mysql.
      That’s SVN 5950 on two freshly installed systems of Mageia 5, and Ubuntu 16.04.

      posted in Bug Reports
      S
      syschuck