Pulling Hair Out - No RRA's created - SQL Assoc Failed error

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

Moderators: Developers, Moderators

Post Reply
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Pulling Hair Out - No RRA's created - SQL Assoc Failed error

Post by cjennings_cr »

New Install:

Windows 2003 SP1
Cacti 0.8.6j
PHP 5.1.4 (cli) (built: May 4 2006 10:35:22)
RRDtool 1.2.15 (Cygwin Version)
mysql Ver 14.12 Distrib 5.0.37, for Win32 (ia32)
NET-SNMP version: 5.4
CMD.PHP polling

I have read and followed the STICKY from BSOD2600 (http://forums.cacti.net/viewtopic.php?t ... hp?t=11747) about 40 million times

I have read and followed the Install Instructions from BSOD2600 (http://bsod2600.home.comcast.net/install_windows.html) 3 times (tried to install / scratch / re-install)

I have tried different versions of PHP (5.2.2, 5.1.4, 4.7.7) - each work with the test.php example provided at http://bsod2600.home.comcast.net/install_windows.html

My install will just not create the RRD files and I cannot get rid of the SQL Assoc Failed errors:

Here are what I have for logs:
Cacti Log:

Code: Select all

05/10/2007 12:11:54 PM - CMDPHP: Poller[0] Time: 0.0762 s, Theads: N/A, Hosts: 1  
05/10/2007 12:11:54 PM - CMDPHP: Poller[0] Host[5] DS[15] SNMP: v1: 10.215.129.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.3, output: 2513032934  
05/10/2007 12:11:54 PM - CMDPHP: Poller[0] Host[5] DS[15] SNMP: v1: 10.215.129.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.3, output: 2838099764  
05/10/2007 12:11:54 PM - CMDPHP: Poller[0] Host[5] DS[14] SNMP: v1: 10.215.129.1, dsname: 5min_cpu, oid: .1.3.6.1.4.1.9.2.1.58.0, output: 50  
05/10/2007 12:11:54 PM - CMDPHP: Poller[0] Host[5] SNMP: Host responded to SNMP  
05/10/2007 12:11:25 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query.id, snmp_query.name, snmp_query.xml_path from (snmp_query,host_snmp_query) where host_snmp_query.snmp_query_id=snmp_query.id and host_snmp_query.host_id= order by snmp_query.name"  
05/10/2007 12:11:25 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select graph_local.graph_template_id from (graph_local,host_graph) where graph_local.graph_template_id=host_graph.graph_template_id and graph_local.host_id=host_graph.host_id and graph_local.host_id= group by graph_local.graph_template_id"  
Data Source Debug:

Code: Select all

c:/rrdtool/rrdtool.exe create \
c:/Inetpub/wwwroot/cacti/rra/x_traffic_in_15.rrd \
--step 300  \
DS:traffic_out:COUNTER:600:0:2000000 \
DS:traffic_in:COUNTER:600:0:2000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
(If I run this command manually - by the way - using "runas" the user ID I setup the scheduled task, The file gets created :-? )

I am at a loss :x - PLEASE HELP. I will be happy to provide any additional information needed. :wink:
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Pulling Hair Out - No RRA's created - SQL Assoc Failed e

Post by BSOD2600 »

cjennings_cr wrote:(If I run this command manually - by the way - using "runas" the user ID I setup the scheduled task, The file gets created :-? )
That's a strong indication you have NTFS permission problems. Did you grant the IUSR_ and IIS_WPG users read/execute/modify rights on the specified folders in the installation guide? What about cmd.exe, rrdtool.exe and php.exe ?

Fired up Sysinternals FileMon to see if anything is getting denied while the poller runs as the scheduled task?

I have a hunch the sql errors will go away once cacti is functioning properly.
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Post by cjennings_cr »

Yes - I have checked permissions multiple times - printed off the documents and placed a check mark by each item as I performed them.

I just found and installed the beta installer version and still get the same thing.

I am including my cacti.log and filemon.log files for review.

What is odd is that this is a brand-new install on a freshly installed Windows 2003 server. (My old cacti server crashed so I had to completely rebuild and decided to put all the latest software)
Attachments
Cacti-log-and-Filemon-log.zip
(166.74 KiB) Downloaded 197 times
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Post by cjennings_cr »

I Found it!!! - the installer didn't update the path settings in CACTI - I fixed all the path statements and now it is creating the RRDs.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Great...

Looking through your filemon log, I do see several instances of where users are denied accessing files related to cacti, so it might've been the underlaying cause of your problems before.
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Post by cjennings_cr »

Due to runaway sh.exe processes in CACTID - I am trying now to go back to CMD.PHP.

I have been banging away at trying to get this to work for several days now:

My lastest install environment is as such:
  • Operating System: Windows 2003
    Webserver: IIS 6
    Cacti: 0.8.6j
    Cactid: n/a
    MySQL: Server version: 5.0.41-community-nt MySQL Community Edition (GPL)
    PHP: PHP 5.2.0 (cli) (built: Nov 2 2006 11:57:36)
    RRDTool (Cygwin or Win32 version): RRDtool 1.2.15 (Cygwin version)
    Net-SNMP: net-snmp-5.4.0-1.win32.exe
    Cygwin (cygwin1.dll version): 1.5.20 (only one on whole system is in rrdtool directory)
I have checked all the permissions everywhere and everything is functioning OK - except that I cannot find anywhere that the rrdtool process is kicking off to create new rra files.

I have applied all patches as of today.

I have the rrdtool version set to 1.2.x in cacti and a proper path to all executables and fonts.

I setup an error logging process in PHP and no errors are being generated.

I am attaching my cacti.log (sanatized - removed all userid / passwords only)

I am attaching my File Monitor Log (different timestamps - ran at different time but under same environment)

I have searched and searched this forum and google - I have seen that some linux users are having similar issues and they were told that it was because the host is "down" and therefore not running the rrdtool process - however - my host is up and responding to all snmp queries and perl scripts. (each item has a response as you can see in the cacti log) I cannot see anywhere in the filemon log an attempt to even access the rrdtool application. It seems to me that this version of cacti has some major issues - I have been beating my brains over this for almost a week now. I am a long-time cacti user (6+ years) - but have never had so many problems trying to get a out-of-the-box installation running. (The reason I left CACTID is because I have seen many users complaining about CACTID and SH.exe running away when perl is involved - I was having the same issue and didn't see any resolution for this from all the posts I was reading)

PLEASE HELP SOMEONE....
Attachments
cacti-log-sanatized.log.txt
(26.09 KiB) Downloaded 278 times
Filemon.LOG.txt
(256.76 KiB) Downloaded 217 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) php 5.2.0 has known issues with iis and crashing isapi, either downgrade to 5.1.6 or upgrade to 5.2.2 (which seems to have fixed the problems).

2) cmd.exe is used to spawn the rrdtool.exe process. If the IUSR_ account doesn't have read/execute rights on php.exe, rrdtool.exe, cmd.exe, then problems will arise.

3) Manually run: php <cactipath>\poller.php under your admin account with the cmd.php poller. Are your rrd files updated?
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Post by cjennings_cr »

Ah HA! - Paradigm Shift: I don't know when this changed (the last version I used before this one was 0.8.6g) - but I had my Scheduled task set to run cmd.php - not poller.php. (Maybe my 6+ years of experience was actually a hinderance in this situation - old dogs die hard) :oops:

It didn't work under php 5.2.0 - like you said - had all kinds of problems getting into the web site. So upgraded to php 5.2.2 (like you said) - had new problem - most likely a bug in the cacti code - regarding php having to be run with full path and in lowercase - this killed all my processes. So, I edited the cmd.php code and just removed the whole if statement section for checking that stuff and - whua lah - working now. No errors what so ever - no run away processes - everything is hunky dorey. (finally) :D
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

cjennings_cr wrote:had new problem - most likely a bug in the cacti code - regarding php having to be run with full path and in lowercase...
Yup, its simply a logic error; it's been fixed in the SVN. Either edit line 49 and change the inequality sign to >= or simply remove it like you did.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Since Cacti 0.8.6x, you have always had to run poller.php. The last version that did strait cmd.php was 0.8.5. That was in 2004. Being that you have been using Cacti since 2001, you must have been using 0.6.x, which was a LOOOONNNG time ago, when Ian was still in High School.

You would also have a very early userid in phpBB.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests