02 - Upgrading CyberPanel

Thanks very much. No need for you guys to fix it for me! Also, if we can post the solution here, it will help others in the future.

Looks like everything is untracked… perhaps it happened when I was trying to develop the restic incremental backup stuff.

Is it safe to remove it all and upgrade again? Or run the CyberPanel Install script? Or uninstall CyberPanel and Reinstall? Something else?

Well yes if you are doing dev on this server this could have caused the issue, you need to remove the untracked files for upgrade to work.

1 Like

As you instructed, I removed the entire /usr/local/CyberCP folder, since every file/folder in that directory was untracked. But I got this error when I upgraded

Traceback (most recent call last):
  File "upgrade.py", line 15, in <module>
    from CyberCP import settings
ModuleNotFoundError: No module named 'CyberCP'
above command failed...
root@vps:/usr/local#

What do you recommend I do now?

Not everything, honestly I don’t know why even the CyberCP folder shows untracked in your case. Because there is CyberCP/settings.py file which contained db logins for CyberPanel.

This can be fixed, but since you are using this server for dev I can not comment on what changed.

Ok, I think I’ve somewhat solved this now.

I deployed a new VPS with CP v2.3.1 and then made a tar.gz of the /usr/local/CyberCP folder and sent it to my other server with rclone sftp and extracted it.

At first, it didn’t work, but then I went into /usr/local/CyberCP/CyberCP/settings.py and updated the database password with what is found from cat /etc/cyberpanel/mysqlPassword and it loaded again.

I was missing some folders from the original install, namely these.

  • .vscode
  • configservercsf
  • CyberPanelDev.code-workspace
  • debug
  • static
  • tmp

Obviously the vscode ones and tmp are irrelevant. I restored configservercsf by uninstalling and reinstalling CSF. Looks like debug isn’t important.

What is /usr/local/CyberCP/static?

Are there any other CyberPanel config files that would be important to check? Database details, system users, etc…?

Hi! I am running two servers with Cyberpanel. One with Ubuntu which has been upgraded fine and another with Centos 7.9 and although shows as upgraded but I see this error under https://myserver:8090/base/versionManagment:

Note: Latest commit does not match, please upgrade.

Current Commit : Unknown option: -C usage: git [–version] [–help] [-c name=value] [–exec-path[=]] [–html-path] [–man-path] [–info-path] [-p|–paginate|–no-pager] [–no-replace-objects] [–bare] [–git-dir=] [–work-tree=] [–namespace=] []

Although it shows 2.3.1 version

/usr/local/CyberCP/static contains static assets of CyberPanel like css and JavaScript files.

You are good to go.

1 Like

It seems on your Centos 7.9 you have old versions of git, can you upgrade the git versions of your server.

I want to say WELL DONE to the Cyberpanel team for the latest release 2.3.1

I run the upgrade a few times (CentOS) with no issues so far, but I was holding my fingers crossed :wink:

Just a few observations that might be helpful to others:

  1. The Cyberpanel upgrade will try to update also your OS somehow… so my advice is to spilt the task into two, especially to help out identifying if the problem is with the OS or Cyberpanel:
    A >> Run first a yum update -y to isolate the OS upgrades and make sure all is working prior the actual Cyberpanel upgrade, and make any necessary adjustments (for example I had to manually recompile some custom PHP extensions because also PHP may get updated)
    B >> Run the Cyberpanel upgrade as indicated at the beginning of this post.

  2. You may want to consider stopping any cron job or the lsws service if you have much activity going on… during the upgrade not everythign works in syntony, and at my first upgrade my server collapsed. I had to roll back the VM snapshot, then I stopped lsws just before upgrading and all went well. The upgrade will start lsws automatically once finished :slight_smile:

  3. @usmannasir I noticed that the upgrade resets the Rainloop Admin password to a random one. Perhaps this should be mentioned in the release notes. The new random password can be found in vi /usr/local/CyberCP/public/rainloop.php Then you can login in Rainloop as Admin and change it back to whatever you want.

Thanks for maintaining the panel secure and updated!!!

3 Likes

The solution provided by @nick.chomey worked better for me, but I’m still having issues upgrading.

I’m not sure if this is supposed to happen or not, but I’ve had these next issues for a LONG time.

first issue: the litespeed.repo ALWAYS reverts back to this problematic failovermethod=priority

Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/litespeed.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/litespeed.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/litespeed.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/litespeed.repo; Configuration: OptionBinding with id "failovermethod" does not exist
cloudlinux-x86_64-server-8                                                                                                                                                        35 MB/s |  16 MB     00:00    
CentOS Linux 8 - PowerTools                                                                                                                                                       17 kB/s | 8.1 kB     00:00    
Errors during downloading metadata for repository 'powertools-for-cyberpanel':
  - Status code: 404 for http://mirror.centos.org/$contentdir/8/PowerTools/x86_64/os/repodata/repomd.xml (IP: 67.219.144.58)
Error: Failed to download metadata for repo 'powertools-for-cyberpanel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

second issue: CentOS-PowerTools-CyberPanel.repo is always regenerated and continuously gives me errors

Errors during downloading metadata for repository 'powertools-for-cyberpanel':
  - Status code: 404 for http://mirror.centos.org/$contentdir/8/PowerTools/x86_64/os/repodata/repomd.xml (IP: 74.120.220.234)
Error: Failed to download metadata for repo 'powertools-for-cyberpanel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
This system is receiving updates from CloudLinux Network server.
CentOS Linux 8 - PowerTools                                                                                                                                                      8.0 kB/s | 8.1 kB     00:01    
Errors during downloading metadata for repository 'powertools-for-cyberpanel':
  - Status code: 404 for http://mirror.centos.org/$contentdir/8/PowerTools/x86_64/os/repodata/repomd.xml (IP: 208.76.253.18)
Error: Failed to download metadata for repo 'powertools-for-cyberpanel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
This system is receiving updates from CloudLinux Network server.
CentOS Linux 8 - PowerTools                                                                                                                                                       19 kB/s | 8.1 kB     00:00    
Errors during downloading metadata for repository 'powertools-for-cyberpanel':
  - Status code: 404 for http://mirror.centos.org/$contentdir/8/PowerTools/x86_64/os/repodata/repomd.xml (IP: 67.219.144.58)
Error: Failed to download metadata for repo 'powertools-for-cyberpanel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
This system is receiving updates from CloudLinux Network server.
CentOS Linux 8 - PowerTools                                                                                                                                                       12 kB/s | 8.1 kB     00:00    
Errors during downloading metadata for repository 'powertools-for-cyberpanel':
  - Status code: 404 for http://mirror.centos.org/$contentdir/8/PowerTools/x86_64/os/repodata/repomd.xml (IP: 198.15.72.18)
Error: Failed to download metadata for repo 'powertools-for-cyberpanel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
This system is receiving updates from CloudLinux Network server.
CentOS Linux 8 - PowerTools                                                                                                                                                       15 kB/s | 8.1 kB     00:00    
Errors during downloading metadata for repository 'powertools-for-cyberpanel':
  - Status code: 404 for http://mirror.centos.org/$contentdir/8/PowerTools/x86_64/os/repodata/repomd.xml (IP: 74.120.220.234)
Error: Failed to download metadata for repo 'powertools-for-cyberpanel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried 

so, in the end, no matter what I’ve tried, I’m still seeing the same results in the CyberPanel GUI interface.

while most of the install lines seem to be referencing success, these git checkout lines always fail on me.

[05.18.2022_08-37-13] #########################################################################
[05.18.2022_08-37-13] git config --global user.email "[email protected]" successful.
[05.18.2022_08-37-13] #########################################################################

[05.18.2022_08-37-13] #########################################################################
[05.18.2022_08-37-13] git config --global user.name "CyberPanel" successful.
[05.18.2022_08-37-13] #########################################################################

[05.18.2022_08-37-13] #########################################################################
[05.18.2022_08-37-13] git fetch successful.
[05.18.2022_08-37-13] #########################################################################
Saved working directory and index state WIP on v2.1.1: 8c0ce5ea Merge pull request #638 from joer80/v2.1.1

[05.18.2022_08-37-13] #########################################################################
[05.18.2022_08-37-13] git stash successful.
[05.18.2022_08-37-13] #########################################################################
error: The following untracked working tree files would be overwritten by checkout:
	install/filesPermsUtilities.py
	plogical/filesPermsUtilities.py
Please move or remove them before you switch branches.
Aborting

[05.18.2022_08-37-13] #########################################################################
[05.18.2022_08-37-13] git checkout v2.3.1 failed, trying again, try number: 1
[05.18.2022_08-37-13] #########################################################################
error: The following untracked working tree files would be overwritten by checkout:
	install/filesPermsUtilities.py
	plogical/filesPermsUtilities.py
Please move or remove them before you switch branches.
Aborting

[05.18.2022_08-37-13] #########################################################################
[05.18.2022_08-37-13] git checkout v2.3.1 failed, trying again, try number: 2
[05.18.2022_08-37-13] #########################################################################
error: The following untracked working tree files would be overwritten by checkout:
	install/filesPermsUtilities.py
	plogical/filesPermsUtilities.py
Please move or remove them before you switch branches.
Aborting

[05.18.2022_08-37-13] #########################################################################
[05.18.2022_08-37-13] git checkout v2.3.1 failed, trying again, try number: 3
[05.18.2022_08-37-13] #########################################################################

[05.18.2022_08-37-13] #########################################################################
[05.18.2022_08-37-13] git checkout v2.3.1 failed.
[05.18.2022_08-37-13] #########################################################################

What am I doing wrong and how can I fix this, properly updating my CyberPanel install?

I’ve (albeit incorrectly) fixed the first two issues with these next steps… but, still unable to update.

updated file content failovermethod=priority with #failovermethod=priority
chattr +i /etc/yum.repos.d/CentOS-PowerTools-CyberPanel.repo

emptied file contents and…
chattr +i /etc/yum.repos.d/litespeed.repo

@splaquet i would create a new vps server and install everything fresh… Things seem to be very corrupted

lolz, thanks men, it really did change my rainloop password even without i noticing it, thanks a lot for that

I’m getting this message after running this . what can i do

Note: Latest commit does not match, please upgrade.

CyberPanel
Current Version : 2.3
Build : 2Current Commit : Unknown option: -C usage: git [–version] [–help] [-c name=value] [–exec-path[=]] [–html-path] [–man-path] [–info-path] [-p|–paginate|–no-pager] [–no-replace-objects] [–bare] [–git-dir=] [–work-tree=] [–namespace=] []
Latest Version : 2.3
Latest Build : 2Latest Commit : 6e28128f640a114af26731efb4bda53689b91d64

1 Like

I update to Version 2.3.2, I can’t access cyberpanel but become phpmyadmin, can you help me fix this?
https://203.86.234.31:7789/

https://ip.ip.ip.ip:8090/logout <---- type this

Current Version :2.3

Build :2

Current Commit :
Unknown option: -C usage: git [–version] [–help] [-c name=value] [–exec-path[=]] [–html-path] [–man-path] [–info-path] [-p|–paginate|–no-pager] [–no-replace-objects] [–bare] [–git-dir=] [–work-tree=] [–namespace=] []

How can I solve this issue?

import sleep
ModuleNotFoundError: No module named ‘sleep’
above command failed…

I’m encountering this user interaction required on upgrade:

Configuration file '/etc/cloud/cloud.cfg'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** cloud.cfg (Y/I/N/O/D/Z) [default=N] ? N

I chose N and the upgrade then succeeded.

I believe user interaction is not expected; during the upgrade, and during the wait on interaction response, the server was unavailable.