Pages: [1]   Go Down
Author Topic: Error during Pandora DB Schema upgrade 2.1 to 3.0  (Read 571 times)
0 Members and 1 Guest are viewing this topic.
benni
Jr. Member
**

Karma: 0
Offline Offline

Posts: 19


View Profile
« on: January 07, 2010, 03:02:56 PM »

I've tried with update.php and also with mysql command. The same error.
ERROR 1005 (HY000) at line 101: Can't create table './pandora/talert_template_modules.frm' (errno: 150)

Install Steps:
- uninstall Pandora 2.1
- install Pandora Server/Console with deb Packages
- killed all existing pandora processes
- try to upgrade db how is described in Pandora 3.0 Doc
- error 1005

System is Ubuntu Server 9.04


* sqlerror1.jpg (125.87 KB, 499x480 - viewed 4 times.)

* sqlerror2.jpg (96.84 KB, 511x401 - viewed 5 times.)
Logged

Sancho Lerena
Administrator
Expert member
*****

Karma: 24
Offline Offline

Posts: 1141


I can see everything... with my glasses :-)


View Profile WWW
« Reply #1 on: January 11, 2010, 12:47:23 PM »

Do you have innodb support enabled in your MySQL Server ?. Pandora 3.0 Database needed it.

Execute SHOW INNODB STATUS in the mysql client after getting this error. This will show you more information about this error.

I've tried with update.php and also with mysql command. The same error.
ERROR 1005 (HY000) at line 101: Can't create table './pandora/talert_template_modules.frm' (errno: 150)

Install Steps:
- uninstall Pandora 2.1
- install Pandora Server/Console with deb Packages
- killed all existing pandora processes
- try to upgrade db how is described in Pandora 3.0 Doc
- error 1005

System is Ubuntu Server 9.04
Logged

-- See you in the other screen.

benni
Jr. Member
**

Karma: 0
Offline Offline

Posts: 19


View Profile
« Reply #2 on: January 11, 2010, 01:31:10 PM »

=====================================
100111 13:29:15 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 40 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 31, signal count 31
Mutex spin waits 0, rounds 200, OS waits 10
RW-shared spins 36, OS waits 18; RW-excl spins 3, OS waits 3
------------------------
LATEST FOREIGN KEY ERROR
------------------------
100111 13:28:15 Error in foreign key constraint of table pandora/talert_template_modules:
FOREIGN KEY (`id_agent_module`) REFERENCES tagente_modulo(`id_agente_modulo`)
    ON DELETE CASCADE ON UPDATE CASCADE,
  FOREIGN KEY (`id_alert_template`) REFERENCES talert_templates(`id`)
    ON DELETE RESTRICT ON UPDATE CASCADE,
  UNIQUE (`id_agent_module`, `id_alert_template`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8:
Cannot resolve table name close to:
(`id_agente_modulo`)
    ON DELETE CASCADE ON UPDATE CASCADE,
  FOREIGN KEY (`id_alert_template`) REFERENCES talert_templates(`id`)
    ON DELETE RESTRICT ON UPDATE CASCADE,
  UNIQUE (`id_agent_module`, `id_alert_template`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Logged

benni
Jr. Member
**

Karma: 0
Offline Offline

Posts: 19


View Profile
« Reply #3 on: January 20, 2010, 04:11:18 PM »

Did you found a solution?
Logged

daniels
Smart member
*****

Karma: 19
Offline Offline

Posts: 205



View Profile
« Reply #4 on: February 26, 2010, 07:44:23 PM »

Take a look at: http://openideas.info/wiki/index.php?title=Pandora_3.0:Documentation_en:Anexo_Upgrade#Problems_upgrading_from_2.x_.28Database.29

This error is expected if you come from 1.x version before 2.x...

You have to do manually this, before running the upgrade script:
ALTER TABLE tagente_modulo MODIFY id_agente_modulo bigint(10) unsigned NOT NULL auto_increment;

Regards.
Logged

Sancho Lerena
Administrator
Expert member
*****

Karma: 24
Offline Offline

Posts: 1141


I can see everything... with my glasses :-)


View Profile WWW
« Reply #5 on: February 27, 2010, 08:32:56 PM »

Another "Quick" way to avoid problems is to "delete" all integral reference information for the migration SQL. This will help to avoid this problems.

Another quick way is disable innodb, but performance would be degraded as well in big enviroments ( > 2000 modules.)
Logged

-- See you in the other screen.

benni
Jr. Member
**

Karma: 0
Offline Offline

Posts: 19


View Profile
« Reply #6 on: March 08, 2010, 08:35:34 AM »

ALTER TABLE tagente_modulo MODIFY id_agente_modulo bigint(10) unsigned NOT NULL auto_increment;

This has fixed it.

Thanks.
Logged

Pages: [1]   Go Up
Print
 
Jump to:  


SourceForge.net Logo  This site is monitored by Pandora FMS   ArticaST