1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Enhanced Security: mailmng failed: Unable to connect to Plesk Database

Discussion in 'Plesk 11.x for Linux' started by MikeyH, Aug 12, 2012.

  1. MikeyH

    MikeyH New Pleskian

    12
    85%
    Joined:
    Apr 29, 2011
    Messages:
    8
    Likes Received:
    0
    Hi, is anyone else having issues with mailmng or dnsmng failing to connect to the psa database after enabling enhanced security mode?

    The typical errors look like: mailmng failed: Unable to connect to Plesk Database: Access denied for user 'admin'@'localhost' (using password: YES)

    Any idea how to update mailmng and dnsmng to submit the AES-128-CBC encrypted passwords?

    Database connection failures while deleting a webspace can lead to a corrupted psa database and panel errors like...

    Error: Unable to find service node for web service on domain with id=
     
  2. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
  3. MikeyH

    MikeyH New Pleskian

    12
    85%
    Joined:
    Apr 29, 2011
    Messages:
    8
    Likes Received:
    0
    Login works OK and changing the admin password does not resolve.

    The issue seems to be mailmng and dnsmng are unable to connect to mysql after enabling enhanced security.

    Both were disabled when upgrading...
     
  4. MikeyH

    MikeyH New Pleskian

    12
    85%
    Joined:
    Apr 29, 2011
    Messages:
    8
    Likes Received:
    0
    This issue is caused by passwords longer than 32 characters!
     
  5. MikeyH

    MikeyH New Pleskian

    12
    85%
    Joined:
    Apr 29, 2011
    Messages:
    8
    Likes Received:
    0
    Long Passwords > 32 chars can cause Unable to connect to Plesk Database

    Passwords > 32 characters can cause exceptions with mailmng and dnsmng like:

    mailmng failed: Unable to connect to Plesk Database: Access denied for user 'admin'@'localhost' (using password: YES)

    eg setting password to 35 characters then activating mail services on a domain will cause:

    mail_Facade->setReject() failed: exception 'mail_Exception_ManagerExecution' with message 'mailmng failed: Unable to connect to Plesk Database: Access denied for user 'admin'@'localhost' (using password: YES)' in /opt/psa/admin/plib/mail/Manager.php:186
    Stack trace:
    #0 /opt/psa/admin/plib/mail/Manager.php(379): mail_Manager->callMailMngWithException('set-reject', Array)
    #1 /opt/psa/admin/plib/mail/Facade.php(44): mail_Manager->setReject('domain...')
    #2 /opt/psa/admin/plib/DSMail.php(103): mail_Facade->setReject('domain...', false)
    #3 [internal function]: DSMail->update(false)
    #4 /opt/psa/admin/plib/Transaction/WebspaceObjectCallWrapper.php(35): call_user_func_array(Array, Array)
    #5 /opt/psa/admin/plib/ui/client.domain.mail.properties.php(112): Transaction_WebspaceObjectCallWrapper->__call('update', Array)
    #6 /opt/psa/admin/plib/ui/client.domain.mail.properties.php(112): Transaction_WebspaceMailService->update(false)
    #7 /opt/psa/admin/plib/UIPointer.php(595): plesk__client__domain__mail__properties->accessItem('POST', NULL)
    #8 /opt/psa/admin/htdocs/plesk.php(45): UIPointer->access('POST')
    #9 {main}
    0: DSMail.php:107
    DSMail->update(boolean false)
    1: :
    call_user_func_array(array, array)
    2: WebspaceObjectCallWrapper.php:35
    Transaction_WebspaceObjectCallWrapper->__call(string 'update', array)
    3: client.domain.mail.properties.php:112
    Transaction_WebspaceMailService->update(boolean false)
    4: client.domain.mail.properties.php:112
    plesk__client__domain__mail__properties->accessItem(string 'POST', NULL null)
    5: UIPointer.php:595
    UIPointer->access(string 'POST')
    6: plesk.php:45
     
    Last edited: Aug 29, 2012
  6. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,568
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Looks like that allowed length of password is defined in MySQL. For example:

    # mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -e "desc mysql.user"
    +-----------------------+-----------------------------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +-----------------------+-----------------------------------+------+-----+---------+-------+

    | Password | char(41) | NO | | | |
     
  7. MikeyH

    MikeyH New Pleskian

    12
    85%
    Joined:
    Apr 29, 2011
    Messages:
    8
    Likes Received:
    0
  8. MikeyH

    MikeyH New Pleskian

    12
    85%
    Joined:
    Apr 29, 2011
    Messages:
    8
    Likes Received:
    0
    Steps to reproduce:

    Fresh install of Plesk 11.0.9 #10 with admin password of 33 characters in length.

    Activate/deactivate mail services on a domain will work.

    Enable Enhanced Security.

    Activate/deactivate mail services on a domain will fail.
     
  9. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,568
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
  10. MikeyH

    MikeyH New Pleskian

    12
    85%
    Joined:
    Apr 29, 2011
    Messages:
    8
    Likes Received:
    0
    You can use a password with 50 characters without enhanced security mode.

    Once you enable enhanced security mode this breaks a working system and the limit is 32 characters to avoid mailmng and dnsmng failures.

    If there is a limit... the password field should enforce this limit to prevent database corruption due to these errors.

    Please file as a defect with the development team...
     
  11. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,568
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
  12. MikeyH

    MikeyH New Pleskian

    12
    85%
    Joined:
    Apr 29, 2011
    Messages:
    8
    Likes Received:
    0
    PRODUCT, VERSION, MICROUPDATE, OPERATING SYSTEM, ARCHITECTURE

    Plesk, 11.0.9, #10, Debian 6.0.5, x86_64


    PROBLEM DESCRIPTION

    Enabling enhanced security mode with admin password > 32 characters causes mailmng and dnsmng exceptions that can result in webspace, domain and psa database corruption.


    STEPS TO REPRODUCE

    Fresh install of Plesk 11.0.9 #10 with admin password of 33 characters in length.

    Success Test: Activate/deactivate mail services on a domain will work.

    Enable Enhanced Security mode.

    Fail Test: Activate/deactivate mail services on a domain will fail.


    ACTUAL RESULT

    Activate/deactivate mail services on a domain will fail with the exception in additional information.

    Multiple features (eg delete webspace) will fail with errors related to: mailmng/dnsmng failed: Unable to connect to Plesk Database: Access denied for user 'admin'@'localhost' (using password: YES)


    EXPECTED RESULT

    All features should work as they did prior to enabling enhanced security mode.

    Any limits on maximum password length should be documented and enforced in the password fields with appropriate warnings to prevent errors.

    Exceptions related to mailmng and dnsmng operations should be better handled to leave the system in a consistent or recoverable state.


    ANY ADDITIONAL INFORMATION

    All exceptions are related to: mailmng/dnsmng failed: Unable to connect to Plesk Database: Access denied for user 'admin'@'localhost' (using password: YES)

    mail_Facade->setReject() failed: exception 'mail_Exception_ManagerExecution' with message 'mailmng failed: Unable to connect to Plesk Database: Access denied for user 'admin'@'localhost' (using password: YES)' in /opt/psa/admin/plib/mail/Manager.php:186
    Stack trace:
    #0 /opt/psa/admin/plib/mail/Manager.php(379): mail_Manager->callMailMngWithException('set-reject', Array)
    #1 /opt/psa/admin/plib/mail/Facade.php(44): mail_Manager->setReject('domain...')
    #2 /opt/psa/admin/plib/DSMail.php(103): mail_Facade->setReject('domain...', false)
    #3 [internal function]: DSMail->update(false)
    #4 /opt/psa/admin/plib/Transaction/WebspaceObjectCallWrapper.php(35): call_user_func_array(Array, Array)
    #5 /opt/psa/admin/plib/ui/client.domain.mail.properties.php(112): Transaction_WebspaceObjectCallWrapper->__call('update', Array)
    #6 /opt/psa/admin/plib/ui/client.domain.mail.properties.php(112): Transaction_WebspaceMailService->update(false)
    #7 /opt/psa/admin/plib/UIPointer.php(595): plesk__client__domain__mail__properties->accessItem('POST', NULL)
    #8 /opt/psa/admin/htdocs/plesk.php(45): UIPointer->access('POST')
    #9 {main}
    0: DSMail.php:107
    DSMail->update(boolean false)
    1: :
    call_user_func_array(array, array)
    2: WebspaceObjectCallWrapper.php:35
    Transaction_WebspaceObjectCallWrapper->__call(string 'update', array)
    3: client.domain.mail.properties.php:112
    Transaction_WebspaceMailService->update(boolean false)
    4: client.domain.mail.properties.php:112
    plesk__client__domain__mail__properties->accessItem(string 'POST', NULL null)
    5: UIPointer.php:595
    UIPointer->access(string 'POST')
    6: plesk.php:45
     
  13. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,568
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Thank you for detailed report. I have forwarded it to developers and I will update thread with results of investigation as soon as I receive them.
     
  14. PietjeP

    PietjeP New Pleskian

    10
     
    Joined:
    Sep 11, 2012
    Messages:
    1
    Likes Received:
    0
    We experience the same problems as Mikey.

    Since the "Enhanced" security mode cannot be switched back off, we continue to have a defect mailserver running that cannot be managed through Plesk.

    Fix through microupdate would be much appreciated.
     
Loading...