MySQL / Database errors

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

Moderators: Developers, Moderators

Post Reply
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

MySQL / Database errors

Post by Spockz »

I've just completed installing Cacti (+needed tools) and I thought bravely. "Well that wasn't so hard. My friends had surely exaggerated."

Next I added my speedtouch 510 and it showed no graphs. Wich was ok considering I hadn't created them, so I went on with adding my computers. But again. No graphs.

Now I looked at the log file and I saw the errors!

Code: Select all

03/25/2006 12:50:45 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "update data_template_data set rrd_maximum='|query_ifSpeed|' where local_data_id=37"
03/25/2006 12:50:45 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "replace into data_input_data (data_input_field_id,data_template_data_id,t_value,value) values (12,,'','ifDescr')"
03/25/2006 12:50:45 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "replace into data_input_data (data_input_field_id,data_template_data_id,t_value,value) values (13,,'','ADSL: INTERLEAVED-CHANNEL THOMSON SpeedTouch 510 4.2.7.16.0')"
03/25/2006 12:50:45 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "replace into data_input_data (data_input_field_id,data_template_data_id,t_value,value) values (14,,'','22')"
03/25/2006 12:50:45 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select  data_input_fields.type_code,  data_input_data.value  from (data_input_fields,data_input_data)  where data_input_fields.id=data_input_data.data_input_field_id  and data_input_data.data_template_data_id=  and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
03/25/2006 12:50:45 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select  data_input_fields.type_code,  data_input_data.value  from (data_input_fields,data_input_data)  where data_input_fields.id=data_input_data.data_input_field_id  and data_input_data.data_template_data_id=  and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
This repeated over and over (for every creation attempt made).
So, my first question is: 'How to solve this?'
The second is: 'Why isn't there a mysql error included in the log?' That would make life way easier. :)

Furthermore, the status is 'unknown', so are the ping times and the availability is 100%. Sounds familiar?


http://home.spockz.nl/phpinfo.php
http://home.spockz.nl/cacti/
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

I've also patched the graph.php file but still there are errors while generating the graphs, and they don't show up either.

I checked the ./rra folder but there was only a placeholder there.
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

anyone?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

What version of mySQL are you running?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

5.0.15-nt.

But the strange thing is. I have updated all the files now. And the system is really a bit unstable. At first the links for the graphs were made, but there were no actual graphs created. Now neither work. :(

All of this while there are no errors logged in the logfile. :(
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

Now when I turn on the graph debugger I get this:

Code: Select all

RRDTool Command:

i:/www/base/cacti/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="SpeedTouch 510 Modem - Traffic - adsl601" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
DEF:a="I\:/www/base/cacti/rra/speedtouch_510_modem_traffic_in_48.rrd":traffic_in:AVERAGE \
DEF:b="I\:/www/base/cacti/rra/speedtouch_510_modem_traffic_in_48.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" 

RRDTool Says:

ERROR: opening 'I:/www/base/cacti/rra/speedtouch_510_modem_traffic_in_48.rrd': No such file or directory
Wich part of cacti is supposed to create those .rrds?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Spockz wrote:Wich part of cacti is supposed to create those .rrds?
Hi

the poller, run from crontab, is supposed to (when a .rrd does not exist, it creates it, and begins to update it next polling cycle).
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

the poller is cmd.php in this case. :)
So you say I have to run it from a crontab? (Is the windowstaskmanager also ok? :P)

Wich settings should I give the poller then?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

It's described in this guide : http://www.cacti.net/downloads/docs/htm ... ndows.html
7. You are going to need to schedule a task while logged on as an Administrator. This task is required to you can run poller.php every 5 minutes. Make sure the Task Scheduler service is started and follow the steps below to begin.
[...]
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

Now after executing the command in the commandline (for testing) I get the following errors:

Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
X-Powered-By: PHP/4.4.1
Content-type: text/html

Why is this? :|
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

screenshots:

The paths themselves are ok. But maybe the names are faulty?
Attachments
settings.png
settings.png (10.27 KiB) Viewed 2365 times
settings2.png
settings2.png (10.12 KiB) Viewed 2365 times
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

OK, the erros are gone, but now the script just outputs:

Code: Select all

X-Powered-By: PHP/4.4.1
Content-type: text/html

<br><strong>This script is only meant to run at the command line.</strong>
And I AM running it from the commandline... :X
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I suggest you read the windows install guide FAQ section in my signature.

Q: When attempting to run poller.php you get, "This script is only meant to run at the command line"
A: Most likely caused by a misconfiguration in your php.ini file. Make sure the following is set in it:

register_argc_argv = On
safe_mode = Off
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

Ok, that solved that one. :P

Nuw the graphs aren't filled. :P

I'll keep looking further.
Spockz
Posts: 11
Joined: Fri Mar 24, 2006 6:58 pm
Location: Dordrecht
Contact:

Post by Spockz »

*fixed
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest