The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

eximstats and clustered mysql server

Discussion in 'Bind / DNS / Nameserver Issues' started by cpane1, Sep 16, 2007.

  1. cpane1

    cpane1 Well-Known Member

    Joined:
    Jun 10, 2007
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    okay, this is a bit strange issue....

    scenario:

    2 servers, one is the remote mysql server for another...

    server1 has been set up with a remote mysql server with server2

    now, when we try and update stats for a particular client on server1 we get the below error.

    =============================================================

    root@server1 [/tmp]# /scripts/runweblogs joelgj
    Log checker loaded ok..
    cpbandwd is already running.
    (internal warning while parsing ) Sun Sep 16 15:23:03 2007 [5171] warn: DBI connect('eximstats:"server2 IP"','eximstats',...) failed: Unknown MySQL server host '"server2 IP"' (1) at /usr/local/cpanel/cpanellogd line 1145
    at /usr/lib/perl5/site_perl/5.8.8/i686-linux/DBI.pm line 652
    DBI::__ANON__('undef', 'undef') called at /usr/lib/perl5/site_perl/5.8.8/i686-linux/DBI.pm line 706
    DBI::connect('DBI', 'DBI:mysql:eximstats:"server2 IP"', 'eximstats', 'undef') called at /usr/local/cpanel/cpanellogd line 1145
    main::dbconnect() called at /usr/local/cpanel/cpanellogd line 177


    (internal warning while parsing ) Sun Sep 16 15:23:03 2007 [5171] warn: Can not connect at /usr/local/cpanel/cpanellogd line 1147.
    at /usr/local/cpanel/cpanellogd line 1147
    main::dbconnect() called at /usr/local/cpanel/cpanellogd line 177


    [an error occurred while processing this directive][an error occurred while processing this directive]Processing joelgj...
    Run Logs domain: domainname.com BW Limit: 26214400000 Domains: [domainname.com]
    Update status for /var/cpanel/bandwidth/joelgj-http.rrd: (42)
    Update status for /var/cpanel/bandwidth/joelgj-all.rrd: (42)
    WEBLANG english
    Archive Status: 0
    About to fork for joelgj [ALL DOMAINS: domainname.com]
    Complete


    ==============================================================

    one of many questions:
    the eximstats uses the /root/.my.cnf file for the mysql server details which on our server happens to be the remote server entries... is this correct ? does the eximstats user connect to the remote server ?

    in short who to resolve this issue..

    Please help.....
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    It does use /root/.my.cnf to connect to the remote host. Is there a corresponding eximstats database on the remote MySQL server? Does the eximstats user on the local cPanel server have sufficient rights on the remote MySQL server? Try the following code as a test script:

    Code:
    #!/usr/bin/perl
    
    use strict;
    use warnings;
    use DBI;
    
    my $db = DBI->connect("DBI:mysql:mysql:__IP_ADDRESS__", 'eximstats', __EXIMSTATS_PWORD__ );
    
    Replace the placeholders (e.g. __IP_ADDRESS__) with your particular configuration. YOu can find the password for eximstats in /var/cpanel/eximstatspass
     
  3. cpane1

    cpane1 Well-Known Member

    Joined:
    Jun 10, 2007
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    Sorry been so late to this....but yes, there is a remote eximstats database (database is located on both the servers) with the same password....

    I will try connecting using the test script supplied, but can you confirm that where should I use this script on ? Server1 or server2 ?

    Also will upcp --force resolve the issue ? is there any script that I can use to resolve this issue...

    Many thanks for your reply...
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If server1 is the remote MySQL server, and server2 is the local cPanel user, then run the test script on server2.
     
  5. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    i have the same issue.

    i modified the /var/cpanel/eximstatspass on the front end servers to the password from the /var/cpanel/eximstatspass on the db server, but it still says failed. i will see with remote hosts . maybe that's the culprit
     
  6. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    yes so it seems. besides the hostname which is added in the privileges, add the ips of the front end servers with the same privileges to the eximstats . careful not to change the password.


    now it works.


    UPDATE: it doesn't work. still failed. is it possible to see some eximstats log? or to see where is it trying to connect to?

    UPDATE2 : it started working by some miracle lol.
     
    #6 katmai, Sep 20, 2007
    Last edited: Sep 20, 2007
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    eximstats is in /usr/local/cpanel/bin

    You can run it manualy with --debug, but I usually add my own debugging code for better reporting.
     
  8. cpane1

    cpane1 Well-Known Member

    Joined:
    Jun 10, 2007
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Hi every one,

    In response to my initial query I got the issue resolved. I got the entry for the remote mysql server host IP commented in the /root/.my.cnf file. After doing this, I was able to run the /script/runweblog script successfully without any error messages for the user.



    Thank you so much "cpanelkenneth" for looking into this for me. Much appreciated.

    cpane1
     
Loading...
Similar Threads - eximstats clustered mysql
  1. gwc_wd
    Replies:
    2
    Views:
    36

Share This Page