Applicable to:
- Plesk for Linux
Symptoms
-
When logging in to Plesk or browsing pages in Plesk, one of the following error messages appears:
PLESK_INFO: Internal error:
error: Cannot open file: /etc/sw/keys/info
Message error: Cannot open file: /etc/sw/keys/info
File functions.php
Line 3374
Type SWKeyExFatalError
PLESK_INFO: ERROR: SWKeyExFatalError
error: Cannot open file
0: common_func.php3:4480
of_get_key_by_product(string 'plesk-unix')
1: common_func.php3:4480
getPleskKey()
2: common_func.php3:4559
getKeyProp(string 'demo')
3: auth.php3:48
PLESK_INFO: ERROR: SWKeyExFatalError
error: /etc/sw/keys/lock/repository: cannot create: Permission denied
PLESK_INFO: ERR [1] Exception: Token validation failed: The license key 'PLSK.XXXXXXX' was not verified. Plesk will try to verify license key. Please wait for few minutes and try again. To manually run verification of license key click "Retrieve Keys" button in "License Management".; ; The license key 'PLSK.XXXXXXX' was not verified. Plesk will try to verify license key. Please wait for few minutes and try again. To manually run verification of license key click "Retrieve Keys" button in "License Management"
PLESK_INFO: Internal error:
Repository is not opened
Message Repository is not opened
File functions.php
Line 3374
Type SWKeyExFatalError -
Plesk operates slow and the following errors appear in
/var/log/plesk/panel.log
:CONFIG_TEXT: mkstemp failed: /etc/sw/keys/tokens/tokenXXXXXX: Permission denied
Cause
Permissions on the /etc/sw/keys
directory are invalid.
Resolution
-
Connect to a Plesk server via SSH.
-
Set the correct permissions:
# /usr/sbin/usermod -a -G swkey-data psaadm
# chown -R root:swkey-data /etc/sw/keys/
# chmod -R 660 /etc/sw/keys/*
# chmod -R 644 /etc/sw/keys/info
# find /etc/sw/keys -type d -exec chmod 2770 {} \;
# chmod 4510 /etc/sw/keys/restart/*
# chown -R psaadm:swkey-data /etc/sw/keys/registry.xml /etc/sw/keys/keys/* /etc/sw/keys/tokens* -
Restart the Plesk services:
# service sw_engine restart
# service sw_cp_server restart -
Log in to Plesk and click the Retrieve Key button to restore your Plesk license. If the operation fails, install your Plesk license by clicking Install Key.
Comments
4 comments
Hello Dear,
I got same issue but tutorial does not work for me ...
I follow this instructions:
https://support.plesk.com/hc/en-us/articles/213385049-Error-in-Plesk-SWKeyExFatalError-error-Cannot-open-file-
https://support.plesk.com/hc/en-us/articles/213923525-Unable-to-access-activate-Plesk-The-license-key-is-invalid-In-order-to-use-the-Panel-you-need-to-obtain-and-install-a-new-valid-license-key
Main issue:
Could not open Repository at "/etc/sw/keys": Empty repository file: /etc/sw/keys/registry.xml
ERR [panel] Unable to get key: Repository is not opened
It seems that there is no such file and can not write on it.
Someone can please help me ?
Thanks
@Niguleseo
If both these resolution did not help, please submit a request to support to investigate the issue in details: https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support-
Thanks for reply. But can not directly as my licence is sold by a third ...
@Niguleseo
If you have bought a license from Plesk Partner, then you can request for assistance from Partner. You can also buy a support subscription as per https://support.plesk.com/hc/en-us/articles/213953025 and receive support from Plesk directly. It's free for the first month.
Please sign in to leave a comment.