Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

SOLVED ModSecurity™ Tools The following exception has occurred: API failure

Discussion in 'Security' started by JerryB, Dec 7, 2016.

Tags:
  1. JerryB

    JerryB Member

    Joined:
    Dec 7, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NL
    cPanel Access Level:
    DataCenter Provider
    Hi,

    when we click on ModSecurity™ Tools
    we see the following error:
    Error: The following exception has occurred: API failure: (XID Xxxx) Access denied for user 'modsec'@'XXXXXXX' (using password: YES)

    XXXXXXX should be our external database server.
    Where can I change the DB host?

    Already tried:
    root@web [~]# /usr/local/cpanel/scripts/setup_modsec_db
    info [setup_modsec_db] Initialized ModSecurity™ database.
    root@web [~]#
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Please let us know if the following command helps:

    Code:
    /usr/local/cpanel/bin/modsecpass
    Thank you.
     
  3. JerryB

    JerryB Member

    Joined:
    Dec 7, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NL
    cPanel Access Level:
    DataCenter Provider
    Yes, tried it, but did not fix the problem.

    Running WHM 56.0 (build 17)
     
  4. JerryB

    JerryB Member

    Joined:
    Dec 7, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NL
    cPanel Access Level:
    DataCenter Provider
    Upgraded our test system to:
    CLOUDLINUX 6.8 x86_64 VMware
    WHM 60.0 (build 26)

    Same error.

    Error: The following exception has occurred: API failure: (XID XXXX) Database Connect Error: Access denied for user 'modsec'@'web02.XXXXXXXXXX.XXX(using password: YES)
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  6. JerryB

    JerryB Member

    Joined:
    Dec 7, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NL
    cPanel Access Level:
    DataCenter Provider
    Support Request ID is: 8053645
     
  7. JerryB

    JerryB Member

    Joined:
    Dec 7, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NL
    cPanel Access Level:
    DataCenter Provider
    fixed by cpanel support.

    Code:
    ====
    
    update mysql.user set Host='xx.XXXXX.xx' WHERE User='modsec';
    
    FLUSH PRIVILEGES;
    
    use modsec;
    
    grant all on modsec.* to modsec@xx.XXXXX.xx;
    
    ==== 
    
     
    #7 JerryB, Dec 15, 2016
    Last edited by a moderator: Dec 15, 2016
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
Loading...

Share This Page