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

    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
    • RE: Database fails to initialize 2

      @syschuck; Uhh-oh. This looks like a serious bug in the installer. I just installed the latest fog from github on a freshly installed Ubuntu 16.04 LTS and it too has the exact same issue with the database not getting build during the install.

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

      @Tom-Elliott Wow 0.33. It has been a while hasn’t it? I just tied the installer with your patches and it works perfectly. That needed updating for a while now. Thank you.

      The database schema issue that is still present though. Would you know off the top of you head where the schema is initially built? Were does mysql initially get called to build the database? I’m going to poke around today and see what I can find.

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

      @Tom-Elliott

      Awesome. I’ll give it a try on a fresh install of Mageia5 and see how it goes. I’m not sure why it wouldn’t build the database. I turned on debugging in mysql and could see that fog was restarting mysqld in the first part of the install, but when it came time to populate the database and create all of the tables and things, there was nothing. I had a previous version of fog on this system and it makes me think that there was something left-over after upgrading.

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

      Hi Tom. You may also need to check for MariaDB as well, it used a different versioning. The ALTER USER is very new feature added to MariaDB in 10.2.0. In Mysql ALTER USER was added in 5.6.6 (not 5.7 as I said).

      posted in Bug Reports
      S
      syschuck
    • Database fails to initialize

      I’m having a problem with SVN Revision 5949 (version 1.3.0-RC-8) with the SQL database. For some odd reason, it’s not creating the fog database or ‘fog’ user is sql during installation. I’ve looked and look and as best I can tell the installer just never gets to mysql. The root password on mysql is blank. Eveything has been cleaned. I deleted the fog user and fog database to get a clean install. When I run the installer, everything looks fine but starting fog the firsttime jumps to http://127.0.0.1/fog/management/?node=schema with 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/html/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.

      I’ve checked everything, and on the mysql side, everything looks good. Phpmyadmin shows a good system with a blank root password.

      Based on what I can see, it doesn’t look like mysql is even getting run. The most frustrating part is that all of the logs look fine. mysql does get restarted by the installer, but it doesn’t show any activity like creating user fog, or tables and the like. Any help or advise would be appreciated.

      In the process of debugging this, I found a bug with sql password query in the installer. If you run mysql version 5.6 or ealier; the sql command sql=“ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘’;”

      ALTER USER’ was added in 5.7. You find this used in ./fog/lib/common/functions.sh

      I’m running Mageia 4, mysql 5.5.45 if you need to know. Thanks for the help.

      posted in Bug Reports
      S
      syschuck
    • RE: Upgraded ubuntu from 13.04 to 14.04 now Web console will not come up

      @Wayne-Workman; Hi Wayne. Just installed Kabuntu 14.04 LTS and it worked perfectly. So for my immediate needs, I think I’ll be good to go. On the Mageia side, apparently this issue started in the previous release 4. I looked at the mysql 127.0.0.1 vs localhost issue and sure enough there was a host resolve problem. So #mysql -u root -h 127.0.0.1 -P 3306 would refuse, but #mysql -u root -h localhost -P 3306 worked. So I added the line: ‘bind-address = 0.0.0.0’ to /etc/my.cnf below the ‘skip-networking’ line.
      That seemed to let everything in sql work without passwords. That got rid if all of the mysqli error message in the apache error_log. However, It’s still not creating the ‘fog’ database and I have the same blank webpage.
      It doesn’t appear to be throwing any exceptions even though the database is never created. So I’m still at a loss. What user is being used for mysql? Is it the ‘fog’ user?

      posted in FOG Problems
      S
      syschuck
    • RE: Upgraded ubuntu from 13.04 to 14.04 now Web console will not come up

      @Wayne-Workman; Hi Wayne. Well I’ve looked all over and I’m at a complete loss for ideas on what may be causing the issue. It’s almost as if it’s skipping over the SQL when it creates the database and when it opens the database. I turned on php debugging, but nothing really shows up. Unfortunately work is piling up on me, so I may need to look at this another day.

      I’m starting to get a lot of windows 8.1 machines that need the newer fog so I’m going to try some older OSs and see if that helps.

      posted in FOG Problems
      S
      syschuck
    • RE: Upgraded ubuntu from 13.04 to 14.04 now Web console will not come up

      @syschuck said:

      printf(‘My info | %s | %s | %s <br>’, DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD);

      It could be: I did a little more slewthing, and the error is
      ‘Failed to connect: Issue working with the current DB, maybe it has not been created yet’

      So, it looks like the issue is early when creating the fog db. Phpmyadmin shows that the fog db isn’t being created. It wouldn’t surprise me that ubuntu 14.04 and Mageia 5 are using the newer versions of mysql.
      The Mageia 5 was released just a few weeks ago.

      [fog@fog mysqld]$ id; mysql
      uid=1000(fog) gid=1000(fog) groups=1000(fog)
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 1112
      Server version: 10.0.19-MariaDB Mageia MariaDB Server
      
      Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      MariaDB [(none)]> use fog
      ERROR 1049 (42000): Unknown database 'fog'
      MariaDB [(none)]> 
      
      
      posted in FOG Problems
      S
      syschuck
    • RE: Upgraded ubuntu from 13.04 to 14.04 now Web console will not come up

      @Tom-Elliott Hi Tom. How ya doing? Well, the guys at Mageia released a new distribution and so I thought I would test fog on it. It looks like this release has a few changes that need to be brought in to the fog installer. They are all minor name changes, and version conditionals. Would you like be to just post the patches on the forum?

      The other problem that has me stumped, is that mysql is somehow not being updated or linked into. Everything looks good in the install;

      • Setting up and starting MySQL…OK
      • Backing up user reports…OK
        • Did you leave the mysql password blank during install? (Y/n)
      • Setting up and starting Apache Web Server…OK

      etc…

      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.1/fog/management
      

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

      And that redirects to http://192.168.1.1/fog/management/index.php?node=schemaupdater

      In the apache logs, it show;

      PHP Warning: mysqli::mysqli(): (HY000/2002): Connection refused in /var/www/html/fog/lib/db/MySQL.class.php on line 37

      Which is;

      if (!$this->link) $this->link = new mysqli(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD);
      

      So I added a debug line;
      printf(‘My info | %s | %s | %s <br>’, DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD);

      and it shows;

      My info | p:127.0.0.1 | root |

      So is the database host supposed to be ‘p:127.0.0.1’ ?

      posted in FOG Problems
      S
      syschuck
    • 1 / 1