Pandora FMS Community

Error while creating Agent Group after update to 6.0SP5

freeze · 12 abr 2017, 17:59 · 5 mensajes · 64 visitas

  1. Inicio del debate

    Hello, I've upgraded from 6.0SP4 to 6.0SP5 on my Testsystem. When I try to create an Agent-Group I get an Error ("There was a problem creating group"). For debugging purposes i changed (in include/functions_db.php)

    
     case "mysql":
            return mysql_db_process_sql($sql, $rettype, $dbconnection, $cache);
            break;
    

    to

    
     case "mysql":
            return @mysql_db_process_sql($sql, $rettype, $dbconnection, $cache);
            break;
    

    so i could can see PHP-Errors. I get

    SQL error: Unknown column 'password' in 'field list' ('INSERT INTO `tgrupo` (`nombre`, `icon`, `parent`, `disabled`, `custom_id`, `id_skin`, `description`, `contact`, `propagate`, `other`, `password`) VALUES ('ghgh','',0,0,'ghgh','','','',0,'','')')
    

    So i looked at the Database and yes, there is no such column "password".

    
    mysql> select * from tgrupo;
    +----------+--------------+-----------------+--------+-----------+----------+-----------+---------+---------------------------------------------------------+-------------------------+-------+
    | id_grupo | nombre       | icon            | parent | propagate | disabled | custom_id | id_skin | description                                             | contact                 | other |
    +----------+--------------+-----------------+--------+-----------+----------+-----------+---------+---------------------------------------------------------+-------------------------+-------+
    

    I am a little confused, because the Upgrade-Documention states that

    The upgrading / migrating process from level versions that are the same implies that versions don't come with any database changes.

    Does this imply that i may have done something wrong in earlier updates? What can I do to fix the Problem in a clean way (without just adding that column manually)? Additional Information:

    • I am in CentOS
    • I already tried upgrading with rpm -U --force ...

    I am thankful for any information. Regards.

  2. Hello freeze, I've done a little bit of research to see why you are getting that message. You are right, there is no need to make database upgrades when going from SP4 to SP5, your database seems to be correct. That database change comes with the migrate.sql for the ENTERPRISE version from v5 to v6, this means your console shouldn't use that column (since it is an enterprise one), meaning a bug of the console for the version 6. I've created an internal ticket to fix it with some of the OUMs to come, so it should be fixed on the next weeks. Anyway, just for you to be able to go forward and keep testing, I can paste here the query to create the column 'password', no problem. Kind regards, Antonio.

  3. Hello Antonio, thank you for your investigation. Yes, I think it's best to document a workaround in this thread, for others to see. Please paste the SQL query here. regards, Robert

  4. Hello, i just just modified the table and i can confirm that this workaround works. So here's the query:

    
    ALTER TABLE tgrupo ADD password VARCHAR( 255 ) after other;
    

    thanks for your help.

  5. Hi Freeze, Yes, that should work. However, the "official" query is the following:

    
    ALTER TABLE tgrupo ADD COLUMN `password` varchar(45) default '';
    

    Kind regards, Antonio.

Entra en tu cuenta para publicar.