Can´t add any maps to weathermap
Moderators: Developers, Moderators
Can´t add any maps to weathermap
Hi @ all,
I have installed weathermap 0.95 on cacti 0.87b on Windows Server 2003 running Apache 2.2.
Seems that the poller cannot create the needed sql tables in mysql.
Here is the cacti logfile output:
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;'
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;"
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set filehash=LEFT(MD5(concat(id,configfile,rand())),20) where filehash = '';'
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update weathermap_maps set filehash=LEFT(MD5(concat(id,configfile,rand())),20) where filehash = '';"
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1101', SQL:"CREATE TABLE weathermap_maps ( id int(11) NOT NULL auto_increment, sortorder int(11) NOT NULL default 0, active set('on','off') NOT NULL default 'on', configfile text NOT NULL, imagefile text NOT NULL, htmlfile text NOT NULL, titlecache text NOT NULL, filehash varchar (40) NOT NULL default '', warncount int(11) NOT NULL default 0, config text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM;'
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "CREATE TABLE weathermap_maps ( id int(11) NOT NULL auto_increment, sortorder int(11) NOT NULL default 0, active set('on','off') NOT NULL default 'on', configfile text NOT NULL, imagefile text NOT NULL, htmlfile text NOT NULL, titlecache text NOT NULL, filehash varchar (40) NOT NULL default '', warncount int(11) NOT NULL default 0, config text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM;"
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null;'
Can anyone halp me to fix the problem?
ArchitecturePlugin is installed and I successfully run the check.php from weathermap via browser and command line.
Many thanks in advance.
Tim
I have installed weathermap 0.95 on cacti 0.87b on Windows Server 2003 running Apache 2.2.
Seems that the poller cannot create the needed sql tables in mysql.
Here is the cacti logfile output:
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;'
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;"
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set filehash=LEFT(MD5(concat(id,configfile,rand())),20) where filehash = '';'
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update weathermap_maps set filehash=LEFT(MD5(concat(id,configfile,rand())),20) where filehash = '';"
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1101', SQL:"CREATE TABLE weathermap_maps ( id int(11) NOT NULL auto_increment, sortorder int(11) NOT NULL default 0, active set('on','off') NOT NULL default 'on', configfile text NOT NULL, imagefile text NOT NULL, htmlfile text NOT NULL, titlecache text NOT NULL, filehash varchar (40) NOT NULL default '', warncount int(11) NOT NULL default 0, config text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM;'
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "CREATE TABLE weathermap_maps ( id int(11) NOT NULL auto_increment, sortorder int(11) NOT NULL default 0, active set('on','off') NOT NULL default 'on', configfile text NOT NULL, imagefile text NOT NULL, htmlfile text NOT NULL, titlecache text NOT NULL, filehash varchar (40) NOT NULL default '', warncount int(11) NOT NULL default 0, config text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM;"
04/05/2008 04:24:53 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null;'
Can anyone halp me to fix the problem?
ArchitecturePlugin is installed and I successfully run the check.php from weathermap via browser and command line.
Many thanks in advance.
Tim
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Well, *does* your cacti database user have permission to create tables?
check.php doesn't check anything to do with the database, only that various php functions exist.
check.php doesn't check anything to do with the database, only that various php functions exist.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Hi Howie,
I have followed the cacti installation guide step by step and one step was
"GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'mapasswd'".
I think, the cactiuser has the right to create tables then.
I tried to create the table by myself and got the error that the config is not allowed to have an default value. I edited the command and removed the value for config and then I was able to create the table.
After that I still wasn´t able to add a network weathermap.
Any other tipps so far??
Thanks.
Tim
I have followed the cacti installation guide step by step and one step was
"GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'mapasswd'".
I think, the cactiuser has the right to create tables then.
I tried to create the table by myself and got the error that the config is not allowed to have an default value. I edited the command and removed the value for config and then I was able to create the table.
After that I still wasn´t able to add a network weathermap.
Any other tipps so far??
Thanks.
Tim
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Aaah. I think this is a different view of a bug that was fixed between 0.95 and 0.95b... I just noticed that you said 0.95 up there too. Please update to 0.95b and retry.big-timmy wrote:I tried to create the table by myself and got the error that the config is not allowed to have an default value.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Which version of mysql do you use? I will try and recreate the problem here - it's obviously not fixed after all...
(and do you use any special settings for mysql? strict mode for example?)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
I have the same problem, can't add Weathermaps. No error message, it just returns to the Management -> Weathermaps view.
The Cacti log has the following message:
04/28/2008 11:22:30 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;'
04/28/2008 11:22:30 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set filehash=LEFT(MD5(concat(id,configfile,rand())),20) where filehash = '';'
04/28/2008 11:22:30 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1101', SQL:"CREATE TABLE weathermap_maps ( id int(11) NOT NULL auto_increment, sortorder int(11) NOT NULL default 0, active set('on','off') NOT NULL default 'on', configfile text NOT NULL, imagefile text NOT NULL, htmlfile text NOT NULL, titlecache text NOT NULL, filehash varchar (40) NOT NULL default '', warncount int(11) NOT NULL default 0, config text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM;'
04/28/2008 11:22:30 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null;'
Weathermap 0.95b
Cacti 0.8.7b
Cacti Plugin Architecture 2.1
MySQL 5.0.51b
php 5.2.5
IIS 6.0
Windows 2003 SP2
The Cacti log has the following message:
04/28/2008 11:22:30 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;'
04/28/2008 11:22:30 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set filehash=LEFT(MD5(concat(id,configfile,rand())),20) where filehash = '';'
04/28/2008 11:22:30 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1101', SQL:"CREATE TABLE weathermap_maps ( id int(11) NOT NULL auto_increment, sortorder int(11) NOT NULL default 0, active set('on','off') NOT NULL default 'on', configfile text NOT NULL, imagefile text NOT NULL, htmlfile text NOT NULL, titlecache text NOT NULL, filehash varchar (40) NOT NULL default '', warncount int(11) NOT NULL default 0, config text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM;'
04/28/2008 11:22:30 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null;'
Weathermap 0.95b
Cacti 0.8.7b
Cacti Plugin Architecture 2.1
MySQL 5.0.51b
php 5.2.5
IIS 6.0
Windows 2003 SP2
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Why do you think it will be fixed in 0.96?aflower wrote:I just installed Weathermaps version 0.941 instead, works like a charm. Guess I'll have to wait for 0.96 for this to be fixed then
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
I can't recreate this problem, so currently, it isn't going to be fixed in 0.96. I have made a few changes which might help, but I don't get this issue on my windows mysql box.aflower wrote:I just thought so because it was supposed to have been fixed in 0.95b
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Do you run the same version as me? (5.0.51b).
I have set up MySQL like this with the Configuration Wizard:
- Server Machine
- Non-Transactional Database Only
- Decision Support (DSS)/OLAP
- Enable TCP/IP Networking
- Enable Strict Mode
- Standard Character Set (latin1)
- Install as a Windows Service
- Include Bin Directory in Windows PATH
I have set up MySQL like this with the Configuration Wizard:
- Server Machine
- Non-Transactional Database Only
- Decision Support (DSS)/OLAP
- Enable TCP/IP Networking
- Enable Strict Mode
- Standard Character Set (latin1)
- Install as a Windows Service
- Include Bin Directory in Windows PATH
Hello,
I have the same problem on my new Cacti installation.
Here are the versions:
cacti: 0.8.7b
weathermaps: 0.95b
mysql: 5.0.51a
When I try to add a map, I have the following PHP error:
When I lookuped up the cacti log fil I saw that the weathermap_maps table could not be created:
Then I edited setup.php, saw the "create table" statement and tried to create the table directly in mysql command line by doing a copy/paste of that block:
So I guess -> config text NOT NULL default '',
Should be -> config text NOT NULL,
I have tried it like that and the table was created.
But when I try to add a map, I have now the following error:
It seems the attribute "default" for the text datatype does not exist anymore in that version of mysql???
What should I do now to have it work?
Thanks, Pierre.
I have the same problem on my new Cacti installation.
Here are the versions:
cacti: 0.8.7b
weathermaps: 0.95b
mysql: 5.0.51a
When I try to add a map, I have the following PHP error:
Code: Select all
Warning: Invalid argument supplied for foreach() in C:\Inetpub\wwwroot\cacti\plugins\weathermap\weathermap-cacti-plugin-mgmt.php on line 165
Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\wwwroot\cacti\plugins\weathermap\weathermap-cacti-plugin-mgmt.php:165) in C:\Inetpub\wwwroot\cacti\plugins\weathermap\weathermap-cacti-plugin-mgmt.php on line 105
Code: Select all
05/05/2008 02:25:52 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1101', SQL:"CREATE TABLE weathermap_maps ( id int(11) NOT NULL auto_increment, sortorder int(11) NOT NULL default 0, active set('on','off') NOT NULL default 'on', configfile text NOT NULL, imagefile text NOT NULL, htmlfile text NOT NULL, titlecache text NOT NULL, filehash varchar (40) NOT NULL default '', warncount int(11) NOT NULL default 0, config text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM;'
Code: Select all
mysql> CREATE TABLE weathermap_maps (
-> id int(11) NOT NULL auto_increment,
-> sortorder int(11) NOT NULL default 0,
-> active set('on','off') NOT NULL default 'on',
-> configfile text NOT NULL,
-> imagefile text NOT NULL,
-> htmlfile text NOT NULL,
-> titlecache text NOT NULL,
-> filehash varchar (40) NOT NULL default '',
-> warncount int(11) NOT NULL default 0,
-> config text NOT NULL default '',
-> PRIMARY KEY (id)
-> ) TYPE=MyISAM;
ERROR 1101 (42000): BLOB/TEXT column 'config' can't have a default value
Should be -> config text NOT NULL,
I have tried it like that and the table was created.
Code: Select all
mysql> show columns from weathermap_maps
-> ;
+------------+-----------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-----------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| sortorder | int(11) | NO | | 0 | |
| active | set('on','off') | NO | | on | |
| configfile | text | NO | | NULL | |
| imagefile | text | NO | | NULL | |
| htmlfile | text | NO | | NULL | |
| titlecache | text | NO | | NULL | |
| filehash | varchar(40) | NO | | | |
| warncount | int(11) | NO | | 0 | |
| config | text | NO | | NULL | |
+------------+-----------------+------+-----+---------+----------------+
10 rows in set (0.00 sec)
Code: Select all
mysql> insert into weathermap_maps (configfile,titlecache,active,imagefile,htmlf
ile) VALUES ('test','Network Overview\r','on','','');
ERROR 1364 (HY000): Field 'config' doesn't have a default value
mysql>
What should I do now to have it work?
Thanks, Pierre.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
I think this must be something to do with strict mode, because I don't get this issue with 5.0.(something). I'll look into it some more at some stage. It only seems to be windows users, too, for some reason.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Who is online
Users browsing this forum: No registered users and 2 guests