Solution if cactid isn't runnig on Win32 machines

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

Moderators: Developers, Moderators

guest

Solution if cactid isn't runnig on Win32 machines

Post by guest »

Hi *.*,

Here is my quick solution, because cactid won't work for 3 weeks und now I solved the problem with the following things:

1) For windows users make sure that you edit the cactid.conf file the right way. DB_HOST must be an ip address for windows users not the default 'localhost' entry!!

2) If you use MySQL server 4.1 then you have to use old passwords for authentication, because the cactid exe is compiled with an old mysql client library. (When will be a newer binary available?)



But read my solution in detail: When I switched form cmd.php to cactid I only got the following message in the cacti.log file:

Code: Select all

01/04/2005 09:50:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: C:/MyServer/http/cacti/bin/cactid.exe, ARGS:  0 0] 
So I started the cactid.exe from a dos prompt and got the following message:

Code: Select all

CACTID: Using cactid config file [cactid.conf]
CACTID: MYSQL: Connection failed after 10 attempts : Can't connect to local MySQL server through '/tmp/mysql.sock' (2)
So I took a look at the cactid.conf file and never read the important note:

Code: Select all

# +-------------------------------------------------------------------------+
# | Settings                                                                |
# +-------------------------------------------------------------------------+
# | DB_Host      'localhost' for unix, IP Address for Windows               |
I changed the 'localhost' entry in '192.168.1.11' and after that in the real hostname 'beta' but both entries won't solved the problem. The cactid messages changed in

Code: Select all

CACTID: Using cactid config file [cactid.conf]
CACTID: MYSQL: Connection failed after 10 attempts : Access denied for user 'cactiduser'@'beta' (using password: YES)
Then I tried it with 127.0.0.1 and got the following:

Code: Select all

... Client does not support authentication protocol ...
So I read the MySQL solution under http://dev.mysql.com/doc/mysql/en/Old_client.html, then started the mysql service with the "--old-passwords" option and cactid runs in 0.8 sec. The cmd.php always need abat 3-4 seconds. Wow! :lol:

Hope that will help some of you
Bye Hogi[/b]
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You are being denied access from the specific host in question. You need to verify your database users permissions from that host. I experienced the same problem, fixed it, but don't know what part of what I did to fix it. Sorry.

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?
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Post by cjennings_cr »

I had the same problem - what I did is gave full rights to the cacti database in mysql to the cactiuser@FQDN (cactiuser@server.domain.com) along with cactiuser@localhost. This fixed my problem.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

In this case, you would perform the following:

"mysql --user=root --password mysql"
"GRANT ALL ON cacti.* TO 'cactiduser'@'beta' IDENTIFIED BY 'somepassword';"
"flush privileges;"
"quit"

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?
User avatar
chkaotic
Posts: 11
Joined: Wed Oct 06, 2004 3:17 pm
Location: Wichita, KS

Post by chkaotic »

TheWitness wrote:In this case, you would perform the following:

"mysql --user=root --password mysql"
"GRANT ALL ON cacti.* TO 'cactiduser'@'beta' IDENTIFIED BY 'somepassword';"
"flush privileges;"
"quit"

TheWitness
I am experiencing the same problem.

I was running MySql 4.1 and could not get mysqld or mysqld-nt to work with --old-passwords so I downgraded to Mysql 4.0

Cacti is back up and running, but I still get the following error message after resetting permissions per above (using 'localhost' instead of 'beta') when trying to run cactid:
CACTID: Using cactid config file [cactid.conf]
CACTID: MYSQL: Connection failed after 10 attempts : Access denied for user: 'cactiuser@localhost' (Using password: YES)

D:\Cactid>
I have tried with and without the ' characters in cactid.conf to no avail. any ideas?
^
chkaotic
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Post by cjennings_cr »

Check the used ID that you are using here. You are putting cactiduser@localhost instead of cactiuser@localhost (has to be same as defined in .conf file)
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok, you changed your cactid.conf file. It was once "bata" and you changed it to "localhost". Localhost does not work with the Win32 version of MySQL. You need either a hostname or IP address and then the permissions specified in my earlier post will be applicable.

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?
User avatar
chkaotic
Posts: 11
Joined: Wed Oct 06, 2004 3:17 pm
Location: Wichita, KS

Post by chkaotic »

TheWitness wrote:Ok, you changed your cactid.conf file. It was once "bata" and you changed it to "localhost". Localhost does not work with the Win32 version of MySQL. You need either a hostname or IP address and then the permissions specified in my earlier post will be applicable.

TheWitness
here is cacti's output:
CACTID: Using cactid config file [cactid.conf]
CACTID: MYSQL: Connection failed after 10 attempts : Access denied for user: 'ca
ctiuser@localhost' (Using password: YES)
here is my .conf file:
DB_Host 127.0.0.1
DB_Database cacti
DB_User cactiuser
DB_Pass joe8it
I tried with 127.0.0.1, localhost (which i know isnt supposed to work but i tried it anyway, the hostname, the fqdn, and the adaptor ip address.. same results (cept localhost, different error msg)
^
chkaotic
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

FYI.

Using localhost with the mysql client does not work on Windows.

We can thank the roots of mysql for this. Basically, when you use localhost with a mysql client, it attempts to use a domain socket (Special Local File) that exists in Unix, but not windows, to communicate with the mysql server. This is why you use the FQDN, the Network Interface IP address or the Loopback interface IP address. Then the client will use the network services to communicate with mysql.

Just wanted to clarify that for everyone.

:D
[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]
vishalsngh
Posts: 8
Joined: Thu Jan 27, 2005 2:12 pm

Post by vishalsngh »

Hey i got the same prob. I have tried "127.0.0.1","localhost","localhost FQDN", nothing seems to work.
Is it something to do with the mysql ver? wht ver is best to use with cactid?
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If you are running mysql v 4.1.x, you will either need to make your own binary or be very nice to me :P :P

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?
vishalsngh
Posts: 8
Joined: Thu Jan 27, 2005 2:12 pm

Post by vishalsngh »

I cant make my own binary, so guess willdo the latter thing!
which ver shld i install if 4.1 doesnt work? i have tried 4.0, 3.23, with no effect! Please help me out, i made a commitment to my management that we wld be etting up cacti on windows only to find cactid wont work!
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

MySQL 4.0.x should work without problem. Just follow the instructions carefully.

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?
vishalsngh
Posts: 8
Joined: Thu Jan 27, 2005 2:12 pm

Post by vishalsngh »

Hola! problem solved!
i downloaded cactid 0.8.6c and it worked fine from the word go! And I am using MySQL 4.1, the latest version! To be dead sure, i reinsatlled cactid 0.8.6d and the problem resurfaced. USE cactid 0.8.6c only with cacti 0.8.6c.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What error message are you getting when you run cactid_086d?

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 1 guest