cmd.php errors
Moderators: Developers, Moderators
cmd.php errors
I have installed cacti on a win2k /apache server. I have succesfully created rrd files but there is no data being collected. when I run cmd.php manually I get these error messages:
C:\Apache\htdocs\cacti>php cmd.php
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)
X-Powered-By: PHP/4.1.2
Content-type: text/html
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 9 in <b>C:\Apache
\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 9 in <b>C:\Apache
\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 21 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 21 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 33 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 33 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 45 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 45 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 57 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 57 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 69 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 69 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 81 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 81 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 93 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 93 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
Any ideas?
C:\Apache\htdocs\cacti>php cmd.php
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)
X-Powered-By: PHP/4.1.2
Content-type: text/html
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 9 in <b>C:\Apache
\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 9 in <b>C:\Apache
\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 21 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 21 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 33 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 33 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 45 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 45 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 57 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 57 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 69 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 69 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 81 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 81 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 93 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>147</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>150</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 93 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>157</b><br>
ERROR: Not enough arguments
Any ideas?
There is some definate breaking of SQL going on there Download the following patch so we can narrow it down further:
http://www.raxnet.net/downloads/patches ... md.php.txt
Replace your current 'cmd.php' with the downloaded copy and run 'php cmd.php' from the command line. You should get some additonal useful output. You can either paste that here or e-mail it to me. Hopefully we can track down the cause...
-Ian
http://www.raxnet.net/downloads/patches ... md.php.txt
Replace your current 'cmd.php' with the downloaded copy and run 'php cmd.php' from the command line. You should get some additonal useful output. You can either paste that here or e-mail it to me. Hopefully we can track down the cause...
-Ian
sorry to take so long to get back to you on this my "real" job got in the way.
When i run php cmd.php now i get these errors:
C:\Apache\htdocs\cacti>php cmd.php
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)
X-Powered-By: PHP/4.1.2
Content-type: text\html
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 9 in <b>C:\Apache
\htdocs\cacti\cmd.php</b> on line <b>153</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>156</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 9 in <b>C:\Apache
\htdocs\cacti\cmd.php</b> on line <b>163</b><br>
ERROR: Not enough arguments
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 21 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>153</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>156</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 21 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>163</b><br>
ERROR: Not enough arguments
eddy
When i run php cmd.php now i get these errors:
C:\Apache\htdocs\cacti>php cmd.php
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)
X-Powered-By: PHP/4.1.2
Content-type: text\html
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 9 in <b>C:\Apache
\htdocs\cacti\cmd.php</b> on line <b>153</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>156</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 9 in <b>C:\Apache
\htdocs\cacti\cmd.php</b> on line <b>163</b><br>
ERROR: Not enough arguments
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 21 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>153</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>C:
\Apache\htdocs\cacti\cmd.php</b> on line <b>156</b><br>
<br>
<b>Warning</b>: Unable to jump to row 0 on MySQL result index 21 in <b>C:\Apach
e\htdocs\cacti\cmd.php</b> on line <b>163</b><br>
ERROR: Not enough arguments
eddy
I have applied the patch and created the mib directory. Thanks.
However i have used get snmp network to create serveral data sources and to create the graphs. and that "seem" to work just as expected but the rrd files are never updated and cron output shows all blanks. I ran cmd.php from a command prompt and this was the output along with the results of running rrdtool manually as well.
C:\Apache\htdocs\cacti>php cmd.php
X-Powered-By: PHP/4.2.0
Content-type: text/html
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
C:\Apache\htdocs\cacti>cd\
C:\>c:/rrdtool/rrdtool.exe update c:/apache/htdocs/cacti/rra/traf_10_249_2_11_2_
in.rrd --template traf_10_249_2_11_2_ N:270622681
Thanks for all the help.
However i have used get snmp network to create serveral data sources and to create the graphs. and that "seem" to work just as expected but the rrd files are never updated and cron output shows all blanks. I ran cmd.php from a command prompt and this was the output along with the results of running rrdtool manually as well.
C:\Apache\htdocs\cacti>php cmd.php
X-Powered-By: PHP/4.2.0
Content-type: text/html
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
select
id
from src_fields
where dataname="octets"
and srcid=11
and inputoutput="out"
C:\Apache\htdocs\cacti>cd\
C:\>c:/rrdtool/rrdtool.exe update c:/apache/htdocs/cacti/rra/traf_10_249_2_11_2_
in.rrd --template traf_10_249_2_11_2_ N:270622681
Thanks for all the help.
The output of the patch really does not say much...except that you are using the "Get SNMP Network Data" script. By the looks of your 'update' command, I can see that SNMP does appear to be working ok. I also noticed that you did not receive any output when executing the 'update' command. This is also good.
At this point, you want to make sure that 'php cmd.php' is scheduled to run every 5 minutes properly and that the user it runs as has write access to 'rra/' directory. Does your log file get updated as well?
-Ian
At this point, you want to make sure that 'php cmd.php' is scheduled to run every 5 minutes properly and that the user it runs as has write access to 'rra/' directory. Does your log file get updated as well?
-Ian
Who is online
Users browsing this forum: No registered users and 5 guests