Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Bienvenido a la comunidad de Pandora FMS Forums Community support Advanced troubleshooting Sql error after an update of pandoraFMS

  • Sql error after an update of pandoraFMS

    Posted by gohone35 on septiembre 16, 2020 at 23:14

    Hi,

    I’m running pandoraFMS on ubuntu and I recently updated pandoraFMS from 7.0.740NG to 7.0.749NG by using the deb packages.
    I also applied all «MR» sql scripts in the database.

    All seems to be working but I have a sql error on the dashboard when I’m connected.
    SQL error: Unknown column ‘td.id_group’ in ‘field list’ (‘SELECT td.id, td.name, td.id_user, td.id_group, td.active, count(twd.id) as cells, td.cells_slideshow FROM tdashboard td LEFT JOIN twidget_dashboard twd ON td.id = twd.id_dashboard WHERE 1=1 AND td.active = 1 GROUP BY td.id ORDER BY name’) in/var/www/pandora_console/include/db/mysql.php on line 114

    I probably have an issue in the database.
    Could you help me to fix it ?

    Thanks for your help

    Olivia232425 replied 5 years, 5 months ago 3 Members · 7 Replies
  • 7 Replies
  • Jimmy

    Moderator
    septiembre 17, 2020 at 15:26
    39 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi guys, hello girls!

    With all due respect, please check out this:

    http://pandorafms.org/forum/thread-15210.html

    It maybe is useful for you! Read there my proposal, have a nice day! 😎

  • gohone35

    Member
    septiembre 17, 2020 at 17:45
    1 Karma
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi guys, hello girls!

    With all due respect, please check out this:

    http://pandorafms.org/forum/thread-15210.html

    It maybe is useful for you! Read there my proposal, have a nice day! 😎

    Thanks for your help.
    I took a look on your link but I don’t know what to do except applying the MR sql scripts. The thing is I already did that.
    The upgrade should be basically minor because pandoraFMS stays on the same branch (from 7.0NG.740 to 7.0NG.749)

    I checked in the tables referenced in the sql error and I have that

    mysql> show columns from tdashboard;
    +—————–+——————+——+—–+———+—————-+
    | Field          | Type            | Null | Key | Default | Extra          |
    +—————–+——————+——+—–+———+—————-+
    | id              | int(20) unsigned | NO  | PRI | NULL    | auto_increment |
    | name            | varchar(60)      | NO  |    |        |                |
    | id_user        | varchar(60)      | NO  |    |        |                |
    | active          | tinyint(1)      | NO  |    | 0      |                |
    | cells_slideshow | tinyint(1)      | NO  |    | 0      |                |
    +—————–+——————+——+—–+———+—————-+

    mysql> show columns from twidget_dashboard;
    +————–+——————+——+—–+———+—————-+
    | Field        | Type            | Null | Key | Default | Extra          |
    +————–+——————+——+—–+———+—————-+
    | id          | int(20) unsigned | NO  | PRI | NULL    | auto_increment |
    | options      | longtext        | NO  |    | NULL    |                |
    | container    | varchar(30)      | NO  |    |        |                |
    | order        | int(3)          | NO  |    | 0      |                |
    | id_dashboard | int(20) unsigned | NO  | MUL | 0      |                |
    | id_widget    | int(20) unsigned | NO  | MUL | 0      |                |
    | position    | text            | NO  |    | NULL    |                |
    +————–+——————+——+—–+———+—————-+

    I guess I need to put a sql command to add the missing «id_group» column but I don’t have the details.
    Maybe something like ALTER TABLE tdashboard ADD COLUMN ‘id_group’ ….

    Unfortunately for me, I’m a beginner with sql.

    If someone has an idea…
    Thanks in advance

  • gohone35

    Member
    septiembre 17, 2020 at 19:01
    1 Karma
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Finally, I fixed this particular issue by myself. I found the sql script used to initialize the database when you install pandorafms V7 at the first time.(for me: /var/www/pandora_console/pandoradb.sql)
    I saw the details about the creation of «tdashboard» table and I used this information to add two missing columns in the table.
    ALTER TABLE tdashboard ADD COLUMN id_group int(10) NOT NULL default 0 AFTER id_user;
    ALTER TABLE tdashboard ADD COLUMN cells int(10) unsigned default 0 AFTER active;

    The sql error message doesn’t appear anymore in the dashboard.

  • Olivia232425

    Member
    febrero 17, 2021 at 20:24
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hey, maybe someone can also help me with this

    I have been using Pandora FMS on Windows 10 for a few months, with employee monitoring software
    if this is matters, and everything was great, however just the other day I added a new agent with the same configuration that I used many times and all modules are uninitialized. I tried to install the agent on different computers with the same results. It seems like every new agent I add to Pandora fails to initialize its modules. All my control agents are showing fine.

    My version is v7.0NG.737 – Build PC190731 – MR 30

  • Olivia232425

    Member
    febrero 17, 2021 at 20:28
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hey, maybe someone can also help me with this

    I have been using Pandora FMS on Windows 10 for a few months, with employee monitoring software if this is matters, and everything was great, however just the other day I added a new agent with the same configuration that I used many times and all modules are uninitialized. I tried to install the agent on different computers with the same results. It seems like every new agent I add to Pandora fails to initialize its modules. All my control agents are showing fine.

    My version is v7.0NG.737 – Build PC190731 – MR 30

  • Olivia232425

    Member
    febrero 18, 2021 at 20:49
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hey, maybe someone can help me with this. I’ve been using Pandora FMS on Windows 10 for a couple of months, with employee monitoring software(if it’s worth mentioning) and it’s been great, but just the other day I added a new agent with the same configuration that I used many times and all the modules are uninitialized. I was trying to install an agent on different computers with the same results. It seems that every new agent I add to Pandora is unable to initialize its modules. All my control agents are doing fine.

    My version of this is v7.0NG.737-Build PC190731-MR 30

  • Olivia232425

    Member
    febrero 18, 2021 at 20:49
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hey, maybe someone can help me with this. I’ve been using Pandora FMS on Windows 10 for a couple of months, with employee monitoring software(if it’s worth mentioning) and it’s been great, but just the other day I added a new agent with the same configuration that I used many times and all the modules are uninitialized. I was trying to install an agent on different computers with the same results. It seems that every new agent I add to Pandora is unable to initialize its modules. All my control agents are doing fine.

    My version of this is v7.0NG.737-Build PC190731-MR 30

Log in to reply.