SQL ERROR

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
calexn
Posts: 8
Joined: Wed Aug 22, 2007 3:17 am

SQL ERROR

Post by calexn »

Hey

I've read the other posts and checked the setting but cant get this to work.

I keep getting the following error:
Error

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:


mysql -u root -p cacti < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.


I've tried running the command line but keep getting:
ERROR 1064 (42000):

What is the correct command to run? MySQL is installed under program files.

Thanks :)
jay
Cacti User
Posts: 390
Joined: Wed Aug 31, 2005 8:55 am
Location: Bristol, England

Post by jay »

Hi

I'm no mySQL expert but I would suggest reading the install guide found at http://forums.cacti.net/viewtopic.php?t=11747

I would also suggest re-installing mysql and this put it in c:/mysql rather than program files. I'm sure I have read something about mysql issues when installing in a path with spaces.

Jay
Cacti Version 0.8.7e, Spine 0.8.7e, Apache 2.2.15, Mysql 5.0.88, PHP 5.2.13, RRDTool 1.2.30, NET-SNMP 5.5
Quad Core AMD Opteron Processor 2384, 2.70Ghz, 2GB RAM , 1 CPU used
Windows Server 2003 (X64), VMWARE ESX
Plugins: Aggregate 0.75

SYSTEM STATS: Time:12.5140 Method:spine Processes:2 Threads:15 Hosts:400 HostsPerProcess:200 DataSources:2909 RRDsProcessed:1384
calexn
Posts: 8
Joined: Wed Aug 22, 2007 3:17 am

Post by calexn »

Thank you for that... fixed up my issues with the installation.

But now the graphs come up with red crosses, i've checked my RRDTool version set in cacti and its correct. I also have the fonts set.

the following shows when going into config:

c:/RRDTool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="6509E - Traffic - Gi7/2" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
DEF:a="C\:/Inetpub/wwwroot/cacti/rra/6509e_traffic_in_9.rrd":traffic_in:AVERAGE \
DEF:b="C\:/Inetpub/wwwroot/cacti/rra/6509e_traffic_in_9.rrd":traffic_out:AVERAGE \
AREA:a#00CF00:"Inbound" \
GPRINT:a:LAST:" Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:b#002A97:"Outbound" \
GPRINT:b:LAST:"Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s"


Please help... been pulling my hair out over this.
jay
Cacti User
Posts: 390
Joined: Wed Aug 31, 2005 8:55 am
Location: Bristol, England

Post by jay »

Hi

Are you using cmd.php or cactid??

If using Cactid do the following for the host in question and post

cactid --verbosity 5 -f 79 -l 79

verbosity level = 5 (Debug) -f = first host which is 79 (you can find the host by clicking on the host you want under devices and looking at the url, e.g http://test/cacti/host.php?action=edit&id=79 -l - last host - i used the same host id as i only wanted to look at the one host.

If using cmd.php do the following

php -q cmd.php <id> <id>

More information found here http://docs.cacti.net/node/283

It might also be a permissions issue so before you run this run sysinternals as shown in http://forums.cacti.net/viewtopic.php?t=11747

Hope this helps.

Jay
Cacti Version 0.8.7e, Spine 0.8.7e, Apache 2.2.15, Mysql 5.0.88, PHP 5.2.13, RRDTool 1.2.30, NET-SNMP 5.5
Quad Core AMD Opteron Processor 2384, 2.70Ghz, 2GB RAM , 1 CPU used
Windows Server 2003 (X64), VMWARE ESX
Plugins: Aggregate 0.75

SYSTEM STATS: Time:12.5140 Method:spine Processes:2 Threads:15 Hosts:400 HostsPerProcess:200 DataSources:2909 RRDsProcessed:1384
calexn
Posts: 8
Joined: Wed Aug 22, 2007 3:17 am

Post by calexn »

Hey,

I ran filemon, and there are no access denied issues,

Im using cmd.pdp and ran the following command.

C:\Inetpub\wwwroot\cacti>php -q cmd.php 2 2

C:\Inetpub\wwwroot\cacti>

There was no output.
calexn
Posts: 8
Joined: Wed Aug 22, 2007 3:17 am

Post by calexn »

I also get the following come up sometimes when browsing through the site


Error in my_thread_global_end(): 1 threads didn't exit
calexn
Posts: 8
Joined: Wed Aug 22, 2007 3:17 am

Post by calexn »

I have the following in the logs:

08/24/2007 11:19:23 AM - WEBLOG: Poller[0] CACTI2RRD: c:/RRDTool/rrdtool.exe graph - --imgformat=PNG --start=-33053184 --end=-86400 --title="6509E - Traffic - Gi8/11" --rigid --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="bytes per second" --slope-mode DEF:a="C\:/Inetpub/wwwroot/cacti/rra/6509e_traffic_in_11.rrd":traffic_in:AVERAGE DEF:b="C\:/Inetpub/wwwroot/cacti/rra/6509e_traffic_in_11.rrd":traffic_out:AVERAGE AREA:a#00CF00:"Inbound" GPRINT:a:LAST:" Current\:%8.2lf %s" GPRINT:a:AVERAGE:"Average\:%8.2lf %s" GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" LINE1:b#002A97:"Outbound" GPRINT:b:LAST:"Current\:%8.2lf %s" GPRINT:b:AVERAGE:"Average\:%8.2lf %s" GPRINT:b:MAX:"Maximum\:%8.2lf %s"




and:




08/24/2007 11:19:23 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select graph_templates_item.id as graph_templates_item_id, graph_templates_item.cdef_id, graph_templates_item.text_format, graph_templates_item.value, graph_templates_item.hard_return, graph_templates_item.consolidation_function_id, graph_templates_item.graph_type_id, graph_templates_gprint.gprint_text, colors.hex, data_template_rrd.id as data_template_rrd_id, data_template_rrd.local_data_id, data_template_rrd.rrd_minimum, data_template_rrd.rrd_maximum, data_template_rrd.data_source_name, data_template_rrd.local_data_template_rrd_id from graph_templates_item left join data_template_rrd on (graph_templates_item.task_item_id=data_template_rrd.id) left join colors on (graph_templates_item.color_id=colors.id) left join graph_templates_gprint on (graph_templates_item.gprint_id=graph_templates_gprint.id) where graph_templates_item.local_graph_id=8 order by graph_templates_item.sequence"
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) what versions of everything are you using?
2) did you patch cacti?
3) Did you properly get the cacti.sql file imported with NO errors?
4) post a rrdtool graph output, fully i.e. Go to graph mamagenemtn, click on a graph, click on enable graph debugging and post the output (for a broken graph).
calexn
Posts: 8
Joined: Wed Aug 22, 2007 3:17 am

Post by calexn »

Using:

Server 2003
MySQL: 5.0.45
Cacti: cacti-0.8.6j
PHP: 5.2.3

The SQL import had no errors

I have not patched cacti

Tried RRD and cactid

RRD would not display graphs
cactid does display graphs, but they are NAN

When creating a new graphs its brings it up with a red X

I ran php -q cmd.php 2 2 again and got this output in the log file:

08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Time: 0.4955 s, Theads: N/A, Hosts: 1
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (9, 'traffic_in', '2007-08-24 13:28:55', '1078670578')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[9] SNMP: v1: 10.91.0.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.20, output: 1078670578
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (11, 'traffic_in', '2007-08-24 13:28:55', '739966573')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[11] SNMP: v1: 10.91.0.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.45, output: 739966573
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (11, 'traffic_out', '2007-08-24 13:28:55', '1431506224')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[11] SNMP: v1: 10.91.0.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.45, output: 1431506224
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (10, 'traffic_in', '2007-08-24 13:28:55', '1444709724')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[10] SNMP: v1: 10.91.0.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.36, output: 1444709724
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (10, 'traffic_out', '2007-08-24 13:28:55', '4097175217')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[10] SNMP: v1: 10.91.0.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.36, output: 4097175217
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (9, 'traffic_out', '2007-08-24 13:28:55', '2645600103')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[9] SNMP: v1: 10.91.0.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.20, output: 2645600103
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (8, 'traffic_in', '2007-08-24 13:28:55', '1518672735')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[8] SNMP: v1: 10.91.0.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.19, output: 1518672735
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (8, 'traffic_out', '2007-08-24 13:28:55', '1465607263')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[8] SNMP: v1: 10.91.0.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.19, output: 1465607263
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (12, 'traffic_out', '2007-08-24 13:28:55', '1431506224')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[12] SNMP: v1: 10.91.0.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.45, output: 1431506224
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (12, 'traffic_in', '2007-08-24 13:28:55', '739966573')"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] DS[12] SNMP: v1: 10.91.0.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.45, output: 739966573
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update poller_reindex set assert_value='180746223' where host_id='2' and data_query_id='1' and arg1='.1.3.6.1.2.1.1.3.0'"
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] Host[2] RECACHE: Processing 1 items in the auto reindex cache for '10.91.0.254'.
08/24/2007 01:28:55 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_reindex.data_query_id, poller_reindex.action, poller_reindex.op, poller_reindex.assert_value, poller_reindex.arg1 from poller_reindex where poller_reindex.host_id=2"
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) patch cacti.

2) cactid doesnt display graphs at all -- rrdtool does. Cactid is the data collection engine

3) follow http://docs.cacti.net/node/283
calexn
Posts: 8
Joined: Wed Aug 22, 2007 3:17 am

Post by calexn »

Hey

Thanks for all your help.... I got the graphs generating, and some data in it... Issue was with windows permision to folders, and the schedule poll was not running correctly, still isn't running as well as it should... sometimes the schedule does not run, or when it runs the graphs refuse to update, but I'll look at the 2k3 server for that.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests