cactid can't connect to mysql database
Moderators: Developers, Moderators
cactid can't connect to mysql database
when I changed the poller method to cactid, there is an error
php poller.php log:
08/07/2005 11:30:43 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Proces
s [CMD: C:\apache2\Apache2\htdocs\cacti\cactid\cactid.exe, ARGS: 0 22]
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
cactid.exe log:
CACTID: Using cactid config file [cactid.conf]
CACTID: MYSQL: Connection Failed: Host 'test001.sccgd.swirebev.com' is not allow
ed to connect to this MySQL server
I am sure my cactid.conf was configured correctly.
anybody know how to solve this problem?
php poller.php log:
08/07/2005 11:30:43 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Proces
s [CMD: C:\apache2\Apache2\htdocs\cacti\cactid\cactid.exe, ARGS: 0 22]
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
cactid.exe log:
CACTID: Using cactid config file [cactid.conf]
CACTID: MYSQL: Connection Failed: Host 'test001.sccgd.swirebev.com' is not allow
ed to connect to this MySQL server
I am sure my cactid.conf was configured correctly.
anybody know how to solve this problem?
1) Are you able to connect to your mysql machine from your cacti machine using the mysql admin tool?
2) Firewall(s) blocking traffic?
3) MySQL permissions allow the cacti user to connect from your cacti machine?
2) Firewall(s) blocking traffic?
3) MySQL permissions allow the cacti user to connect from your cacti machine?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
If you're using mysql 5.x with php 4.x, then you'll need to use the old password trick to get them communicating.
From your cacti box, use the mysql admin tool (c:\mysql\bin\mysql.exe) and try to connect to your mysql machine, with the same credentials as you've specified in your cactid.conf file. Does it work?
From your cacti box, use the mysql admin tool (c:\mysql\bin\mysql.exe) and try to connect to your mysql machine, with the same credentials as you've specified in your cactid.conf file. Does it work?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
I've been trying to switch from cmd.bat to cactid, but when I do it no data is recorded (at least the graphs stop updating).
If I run cactid from the command line I get :
C:\cactid>cactid
CACTID: Using cactid config file [cactid.conf]
CACTID: MYSQL: Connection Failed: Can't connect to local MySQL server through so
cket '/tmp/mysql.sock' (2)
The config file has the same db/user/passwd details as cacti.
I've tried swapping the cygwin dlls with the ones in rrdtool, but no difference.
Using: MySQL:4.1, PHP4. Mysql is on same box (localhost), W2K Server, no firewalls, Administrator tool has no problem with either root or cacti user.
Am I right in thinking, that I still need the scheduled task with cactid ? Doesn't the "d" stand for daemon ? Will this speed up the production of graphs, or just the data-collection ?
If I run cactid from the command line I get :
C:\cactid>cactid
CACTID: Using cactid config file [cactid.conf]
CACTID: MYSQL: Connection Failed: Can't connect to local MySQL server through so
cket '/tmp/mysql.sock' (2)
The config file has the same db/user/passwd details as cacti.
I've tried swapping the cygwin dlls with the ones in rrdtool, but no difference.
Using: MySQL:4.1, PHP4. Mysql is on same box (localhost), W2K Server, no firewalls, Administrator tool has no problem with either root or cacti user.
Am I right in thinking, that I still need the scheduled task with cactid ? Doesn't the "d" stand for daemon ? Will this speed up the production of graphs, or just the data-collection ?
1) Edit your cactid.conf and put in your IP (just like it says). Localhost does not work for win32 systems
2) Do not mix and match cygwin dlls on your system. I suggest you do a base install of cygwin so you do not keep multiple versions of the cygwin dlls laying around.
3) Do NOT schedule a task for cactid.exe. Always use poller.php. It will spawn cactid to run. Cactid will dramatically speed up the data collection process. rrdtool.exe creates the graphs.
2) Do not mix and match cygwin dlls on your system. I suggest you do a base install of cygwin so you do not keep multiple versions of the cygwin dlls laying around.
3) Do NOT schedule a task for cactid.exe. Always use poller.php. It will spawn cactid to run. Cactid will dramatically speed up the data collection process. rrdtool.exe creates the graphs.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
Hmm... something still didn't go quite right.
I only have poller.php scheduled, nothing else. I updated the .cfg to 127.0.0.1
Monitoring the scheduled tasks, and the Task Manager:
- I saw the poller task start, then I saw the cactid.exe start and a few secs later end. Checked logs, and saw cactid entry saying it had run.
- No update in the graphs though. Waited 5 mins
- Then the next scheduled task ran, but no cactid.exe this time - 30s later the task was still running, but still no cactid.exe. another 20s later I decided to halt it manually.
Put system back to using cmd.bat
I'll test more on Monday.
I only have poller.php scheduled, nothing else. I updated the .cfg to 127.0.0.1
Monitoring the scheduled tasks, and the Task Manager:
- I saw the poller task start, then I saw the cactid.exe start and a few secs later end. Checked logs, and saw cactid entry saying it had run.
- No update in the graphs though. Waited 5 mins
- Then the next scheduled task ran, but no cactid.exe this time - 30s later the task was still running, but still no cactid.exe. another 20s later I decided to halt it manually.
Put system back to using cmd.bat
I'll test more on Monday.
Guys>>> note this thread....
http://forums.cacti.net/viewtopic.php?t ... ght=cactid
I had similar issues setting up cactid... it was a combination of using the old_password setting and also enabling All Privileges to mysql for a few more things. WORKs.
http://forums.cacti.net/viewtopic.php?t ... ght=cactid
I had similar issues setting up cactid... it was a combination of using the old_password setting and also enabling All Privileges to mysql for a few more things. WORKs.
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
My server runs on Debian, and I made no change to my cron job which is the same thing,,,, My poller.php runs every 5 mins just like before using cmd.php i just changed to cactid on the poller page in cacti. I had more issued getting cactid to work. So i guess answer would be yes. Dont make any changes to your scheduled job.
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
I just don't get it. I've tied putting 127.0.0.1, swocmpq03, 135.86.80.3 - all three possible entries for the servername.
The logs seem to show that everything i ok:
08/25/2005 09:56:07 PM - SYSTEM STATS: Time: 5.7523 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 14, Hosts/Process: 14, Data Sources 364, RRDs Processed 198
08/25/2005 09:54:42 PM - SYSTEM STATS: Time: 3.5974 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 14, Hosts/Process: 14, Data Sources 364, RRDs Processed 198
08/25/2005 09:52:26 PM - SYSTEM STATS: Time: 3.5547 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 14, Hosts/Process: 14, Data Sources 364, RRDs Processed 198
08/25/2005 09:51:59 PM - SYSTEM STATS: Time: 3.6818 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 14, Hosts/Process: 14, Data Sources 364, RRDs Processed 198
But theres no data in the graphs when using cactid..
The logs seem to show that everything i ok:
08/25/2005 09:56:07 PM - SYSTEM STATS: Time: 5.7523 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 14, Hosts/Process: 14, Data Sources 364, RRDs Processed 198
08/25/2005 09:54:42 PM - SYSTEM STATS: Time: 3.5974 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 14, Hosts/Process: 14, Data Sources 364, RRDs Processed 198
08/25/2005 09:52:26 PM - SYSTEM STATS: Time: 3.5547 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 14, Hosts/Process: 14, Data Sources 364, RRDs Processed 198
08/25/2005 09:51:59 PM - SYSTEM STATS: Time: 3.6818 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 14, Hosts/Process: 14, Data Sources 364, RRDs Processed 198
But theres no data in the graphs when using cactid..
For testing/debugging purposes only, you can run cactid by itself. I suggest you have Poller Logging Level at Debug, so you can see what is going on.
In MySQL, did you set your cacti user can connect from 127.0.0.1 or 135.86.80.3 ?
No, the scheduled task should not be running all the time. If thats the case, something is hanging. turn on debug and hopefully it will show something useful.
In MySQL, did you set your cacti user can connect from 127.0.0.1 or 135.86.80.3 ?
No, the scheduled task should not be running all the time. If thats the case, something is hanging. turn on debug and hopefully it will show something useful.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
Ok... I figured out that it was still the cygwin dll (maybe). Deleted the one in the cactid directory and now I get :
C:\Inetpub\wwwroot\cacti>php poller.php
No log handling enabled - turning on stderr logging
NOTIFICATION-LOG-MIB: Module not found
NET-SNMP-AGENT-MIB: Module not found
OK u:0.01 s:0.03 r:3.02
OK u:0.01 s:0.03 r:3.04
OK u:0.01 s:0.03 r:3.06
OK u:0.01 s:0.03 r:3.08
OK u:0.01 s:0.03 r:3.10
OK u:0.01 s:0.03 r:3.13
...... etc
I'm watching it for 10mins or so to see what happens..
C:\Inetpub\wwwroot\cacti>php poller.php
No log handling enabled - turning on stderr logging
NOTIFICATION-LOG-MIB: Module not found
NET-SNMP-AGENT-MIB: Module not found
OK u:0.01 s:0.03 r:3.02
OK u:0.01 s:0.03 r:3.04
OK u:0.01 s:0.03 r:3.06
OK u:0.01 s:0.03 r:3.08
OK u:0.01 s:0.03 r:3.10
OK u:0.01 s:0.03 r:3.13
...... etc
I'm watching it for 10mins or so to see what happens..
looks like good output to me so far. You can ignore those mib errors, since cacti/cactid does not use them.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 3 guests