upgrade cyberpanel 1.9.1 to 1.9.2 failed

Website is working but getting 500 error in admin panel.

Same for me. error 500

Troubleshooting Cyberpanel control panel port 8090 errors
tail -f /usr/local/lscp/cyberpanel/logs/{error.log,access.log,stderr.log}

Troubleshooting main OLS/LS Webserver errors
tail -f /usr/local/lsws/logs/{error.log,access.log,stderr.log}

If can’t figure it out from those logs

Enable Debugging:
Debugging Cyberpanel errors on port 8090
/usr/local/CyberCP/CyberCP/settings.py

Disable Debugging
sed -i ‘s|^DEBUG.*|DEBUG = False|g’ /usr/local/CyberCP/CyberCP/settings.py && service lscpd restart

Enable Debugging
sed -i ‘s|^DEBUG.*|DEBUG = True|g’ /usr/local/CyberCP/CyberCP/settings.py && service lscpd restart

Litespeed Enterprise CageFS enabled
==> /usr/local/lscp/cyberpanel/logs/error.log <==
2019-11-01 03:00:08.002306 [NOTICE] [127.0.0.1:50606] ExtConn timed out while processing.

Error LOG
ImportError at /

No module named client

Request Method: GET
Request URL: https://xxxxxxxxxxx
Django Version: 1.11
Exception Type: ImportError
Exception Value:

No module named client

Exception Location: /usr/local/CyberCP/emailPremium/views.py in , line 15
Python Executable: /usr/local/CyberCP/bin/python
Python Version: 2.7.5
Python Path:

[‘’,
‘/usr/local/CyberCP/bin’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP/lib64/python27.zip’,
‘/usr/local/CyberCP/lib64/python2.7’,
‘/usr/local/CyberCP/lib64/python2.7/plat-linux2’,
‘/usr/local/CyberCP/lib64/python2.7/lib-tk’,
‘/usr/local/CyberCP/lib64/python2.7/lib-old’,
‘/usr/local/CyberCP/lib64/python2.7/lib-dynload’,
‘/usr/lib64/python2.7’,
‘/usr/lib/python2.7’,
‘/usr/local/CyberCP/lib/python2.7/site-packages’,
‘/usr/lib64/python2.7/site-packages’,
‘/usr/lib64/python2.7/site-packages/gtk-2.0’,
‘/usr/lib/python2.7/site-packages’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’]

Server time: Mon, 11 Nov 2019 16:36:35 +0000

Same here. I saw that someone else had a 500 error come up a few days ago after updating but not sure if that was ever solved for them.

You guys used new guide available at 02 - Upgrading CyberPanel - 01 - Install/Upgrade - CyberPanel Community ?

i also got same error. yes used new guideline.

Django Version: 1.11
Exception Type: ImportError
Exception Value:
No module named client
Exception Location: /usr/local/CyberCP/emailPremium/views.py in , line 15
Python Executable: /usr/local/CyberCP/bin/python
Python Version: 2.7.5
Python Path:
[’’,
‘/usr/local/CyberCP/bin’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP/lib64/python27.zip’,
‘/usr/local/CyberCP/lib64/python2.7’,
‘/usr/local/CyberCP/lib64/python2.7/plat-linux2’,
‘/usr/local/CyberCP/lib64/python2.7/lib-tk’,
‘/usr/local/CyberCP/lib64/python2.7/lib-old’,
‘/usr/local/CyberCP/lib64/python2.7/lib-dynload’,
‘/usr/lib64/python2.7’,
‘/usr/lib/python2.7’,
‘/usr/local/CyberCP/lib/python2.7/site-packages’,
‘/usr/lib64/python2.7/site-packages’,
‘/usr/lib/python2.7/site-packages’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’]
Server time: Wed, 13 Nov 2019 09:45:59 +0000
Traceback Switch to copy-and-paste view
/usr/local/CyberCP/lib/python2.7/site-packages/django/core/handlers/exception.py in inner
response = get_response(request) …
:arrow_forward: Local vars
/usr/local/CyberCP/lib/python2.7/site-packages/django/utils/deprecation.py in call
response = self.process_request(request) …
:arrow_forward: Local vars
/usr/local/CyberCP/lib/python2.7/site-packages/django/middleware/locale.py in process_request
i18n_patterns_used, prefixed_default_language = is_language_prefix_patterns_used(urlconf) …
:arrow_forward: Local vars
/usr/local/CyberCP/lib/python2.7/site-packages/django/utils/lru_cache.py in wrapper
result = user_function(*args, **kwds) …
:arrow_forward: Local vars
/usr/local/CyberCP/lib/python2.7/site-packages/django/conf/urls/i18n.py in is_language_prefix_patterns_used
for url_pattern in get_resolver(urlconf).url_patterns: …
:arrow_forward: Local vars
/usr/local/CyberCP/lib/python2.7/site-packages/django/utils/functional.py in get
res = instance.dict[self.name] = self.func(instance) …
:arrow_forward: Local vars
/usr/local/CyberCP/lib/python2.7/site-packages/django/urls/resolvers.py in url_patterns
patterns = getattr(self.urlconf_module, “urlpatterns”, self.urlconf_module) …
:arrow_forward: Local vars
/usr/local/CyberCP/lib/python2.7/site-packages/django/utils/functional.py in get
res = instance.dict[self.name] = self.func(instance) …
:arrow_forward: Local vars
/usr/local/CyberCP/lib/python2.7/site-packages/django/urls/resolvers.py in urlconf_module
return import_module(self.urlconf_name) …
:arrow_forward: Local vars
/usr/lib64/python2.7/importlib/init.py in import_module
import(name) …
:arrow_forward: Local vars
/usr/local/CyberCP/CyberCP/urls.py in
url(r’^emailPremium/’,include(‘emailPremium.urls’)), …
:arrow_forward: Local vars
/usr/local/CyberCP/lib/python2.7/site-packages/django/conf/urls/init.py in include
urlconf_module = import_module(urlconf_module) …
:arrow_forward: Local vars
/usr/lib64/python2.7/importlib/init.py in import_module
import(name) …
:arrow_forward: Local vars
/usr/local/CyberCP/emailPremium/urls.py in
import views …
:arrow_forward: Local vars
/usr/local/CyberCP/emailPremium/views.py in
from postfixSenderPolicy.client import cacheClient …
:arrow_forward: Local vars
Request information
USER
[unable to retrieve the current user]

i have commented out /usr/local/CyberCP/emailPremium/views.py in , line 15 and it solved my problem. actually its email policy server file
#from postfixSenderPolicy.client import cacheClient

import cacheClient is the culprit here

i have commented out /usr/local/CyberCP/emailPremium/views.py in , line 15 and it solved my problem. actually its email policy server file #from postfixSenderPolicy.client import cacheClient

import cacheClient is the culprit here

Thanks, it works

Same for me. error 500

uncomment line 15 works for me too but not the cleanest way to make it working

if you disable postfix service (stop) you can delete the # of line 15 again

i think this error appears if upgrade script runs with stopped/disabled postfix service

I got error when upgrade

[root@ip ~]# sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 100 518 100 518 0 0 3799 0 --:–:-- --:–:-- --:–:-- 3808
–2019-11-13 14:58:15-- https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/plogical/upgrade.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.8.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.8.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 72118 (70K) [text/plain]
Saving to: ‘upgrade.py’

100%[===================================>] 72,118 --.-K/s in 0.004s

2019-11-13 14:58:15 (15.4 MB/s) - ‘upgrade.py’ saved [72118/72118]

/dev/fd/63: line 11: /usr/local/CyberPanel/bin/python2: No such file or directory
[root@ip ~]#

After upgrading to 1.9.2, I can’t access the panel anymore - Screenshot by Lightshot

I’m no expert but I’ve got onto some troubles with new version. I’ve managed to get it all working now. But correct me if I’m wrong anywhere in my instructions (or if they fixed your issue ^_^).

After upgrading to 1.9.2, I can't access the panel anymore - http://prntscr.com/pwh8k4

I’ve noticed that upgrade fails if CSF is installed on the server.
It just looks like that CSF fix doesn’t work (well it kind of work as it restores config, but leaves CyberPanel unusable).
Fails on python manage.py makemigrations and then on /usr/local/CyberCP(CyberCP or CyberPanel I cannot remember now)/bin/python2
Site after upgrade looks exactly like that on Luke007 screenshot
As su - root
Killed all processed using /usr/local/CyberCP ,
CSF config back up
run /usr/local/csf/bin/uninstall.sh - to uninstall CSF and upgrading again, site restores functionality.
Reinstall CSF, restore config, restart CSF.

Tested on Ubuntu 18.0.4 (upgraded from 14.04) and CentOS 7.6 - Issue occured on CyberPanel 1.9.0 all the way up to the current version.

I got error when upgrade


[root@ip ~]# sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 100 518 100 518 0 0 3799 0 --:--:-- --:--:-- --:--:-- 3808
--2019-11-13 14:58:15-- https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/plogical/upgrade.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.8.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.8.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 72118 (70K) [text/plain]
Saving to: ‘upgrade.py’

100%[===================================>] 72,118 --.-K/s in 0.004s

2019-11-13 14:58:15 (15.4 MB/s) - ‘upgrade.py’ saved [72118/72118]

/dev/fd/63: line 11: /usr/local/CyberPanel/bin/python2: No such file or directory
[root@ip ~]#

In regards to this issue
Try the following as su - root
wget https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/plogical/upgrade.py
/usr/local/CyberPanel/bin/python upgrade.py
If that fails, try to fix venv by following (taken from preUpgrade.sh except deactivate bit part)

virtualenv --system-site-packages /usr/local/CyberPanel
source /usr/local/CyberPanel/bin/activate
rm -rf requirments.txt
wget https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/requirments.txt
pip install --ignore-installed -r requirments.txt
deactivate
virtualenv --system-site-packages /usr/local/CyberPanel

then try to rerun upgrade
you might want to manually set CyberPanels venv

Sadly upgrade failed. First error500 on panel but websites working. Second time after uninstalling csf and upgrading again. panels works but can’t login and websites are working. Hoping email still works.

Any ideas? Didn’t install csf again

i have commented out /usr/local/CyberCP/emailPremium/views.py in , line 15 and it solved my problem. actually its email policy server file #from postfixSenderPolicy.client import cacheClient

import cacheClient is the culprit here

This is what I did as well, but I’d like a proper fix.
I also had CSF installed prior to this update if that matters.

@netbos

You are right, CSF installation added some apps in the settings file which we were not aware off. So for now during upgrade I will remove those apps as they are not in CyberPanel package and upgrade will fail if they are in settings file.

@netbos

You are right, CSF installation added some apps in the settings file which we were not aware off. So for now during upgrade I will remove those apps as they are not in CyberPanel package and upgrade will fail if they are in settings file.

When do you update this? Because I uninstalled CSF and re-run upgrade. But now I cannot login into cyberpanel but error500 code is gone.