CyberPanel Community

error message: local variable 'zone' referenced before assignment

mj
mjacksonprim #1

Provider: Hetzner

Virtualization Type: KVM (cloud server model cx21)

System: CentOS Linux release 7.9.2009 (Core)

Installation option:

OLS or Enterprise?
OLS

Installing from official server or mirror server?
official
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)

Install Memcached extension for PHP?
no

Install LiteSpeed Memcached?
no

Install Memcached?
no

Install Redis extension for PHP?
no

Install Redis?
no

Problem:

Hi:

cPanel importer not working.

step to reproduce:
1._ /scripts/pkgacct example (it from cpanel server)
2._ transfer cpmove-example.tar.gz from cpanel server to cyberpanel server by rsync
3._ create a folder in root folder with name michael and move cpmove-example.tar.gz to this
4._ run /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/cPanelImporter.py --path /michael

log /home/cyberpanel/7922
Extracting main cPanel archive file: /michael/cpmove-example.tar.gz
/michael/cpmove-example.tar.gz successfully extracted.
Creating main account from archive file: /michael/cpmove-example.tar.gz
Detected main domain for this file is: example.com.
Finding PHP version for example.com.
PHP version of example.com is PHP 7.4.
Finding Server Admin email for example.com.
Server Admin email for ejemplo.com is webmaster@example.com.
Calling core to create example.com.
Websites matching query does not exist.
Successfully created example.com from core.
Detecting SSL for examplecom.
SSL found for example, setting up.
SSL set up OK for example.com.
Restoring document root files for example.com.
Main site ejemplo.com created from archive file: /michael/cpmove-example.tar.gz
Creating child domains from archive file: /michael/cpmove-example.tar.gz
Finding Addon/Subdomains from backup file /michael/cpmove-example.tar.gz. Account main domain was example.com.
Following Addon/Subdomains found for backup file /michael/cpmove-example.tar.gz. Account main domain was example.com.
Starting Addon/Subdomains creation from backup file /michael/cpmove-example.tar.gz. Account main domain was example.com.
We are going to create DNS records now, please note we will not create DKIM records. Make sure to create them from CyberPanel interface using our DKIM manager.
Creating DNS records for example.com
Failed to create DNS records from file /michael/cpmove-example.tar.gz, error message: local variable ‘zone’ referenced before assignment.

can you please give some clues to solve this? thanks in advance.

best regards

26 replies
RM
Rana Muhammad Usman Nasir #3

Can you share your details? Like cPanel version? How you generated that file etc?

na
nauthnael #4

I’ve discovered that I need to create a dns zone first so that the import doesn’t fail.

RM
Rana Muhammad Usman Nasir #5

I’ve created and restored backups from cPanel v100.0.4.

Can you private message me with your cPanel login details. I will have to check the cPanel dump file.

na
nauthnael #6

Yes sure, check my pm :slight_smile:

AD
Andre Dsousa #7

How do you solve it?

  • I delete the failed created websites ( I ran couple of backups )

Then on dns/createDNSZone I added the domain for the sites i want to migrate.

site1.com && site2.com

But still the same error:

Failed to create DNS records from file /mybackups/backup-11.29.2021_05-53-24_site1.tar.gz, error message: local variable ‘zone’ referenced before assignment.
Failed to create DNS records from file /mybackups/backup-11.30.2021_21-07-43_site2.tar.gz, error message: local variable ‘zone’ referenced before assignment.

It is a clean instalation there is 0 sites in the box.

Provider: Contabo
System: Ubuntu 20.04 (64 Bit)
Installation option:
OLS or Enterprise?
OLS

Installing from official server or mirror server?
official script

Install Memcached extension for PHP?
Y
Install LiteSpeed Memcached?
Y
Install Memcached?
Y
Install Redis extension for PHP?
Y
Install Redis?
Y

RM
Rana Muhammad Usman Nasir #8

@Dsousa can you send me the backup file via google drive? Because last time someone sent me a cPanel login and it didnt work.

So I tested on my instance and it works.

AD
Andre Dsousa #10

@usmannasir How can I share the backup link?

AD
Andre Dsousa #18

Yes, files were successfully restored.

AD
Andre Dsousa #20

I did install with DNS support, could the update change that?

How can I validate

RM
Rana Muhammad Usman Nasir #21

I think the DNS file generated by cPanel created an issue. If you host your dns for now on Cloudflare that would do the trick. Checking this may take some time. I will revert to you.

ds
dsousandre #22

Hello @usmannasir !

I create another account just to ask if I could be upgraded the max replies per day on @Dsousa user :smile:

I got this message.

We appreciate your enthusiasm, keep it up! That said, for the safety of our community, you’ve reached the maximum number of replies a new user can create on their first day. Please wait 8 hours and you’ll be able to create more replies.

Thank you.

Ni
Nick #24

Should be better now. I made it 20. FYI @usmannasir and @die2mrw007, there’s A LOT of settings that probably need review - be it to clarify things like this or even just learn what is possible.

NK
Nitesh Kunnath #25

Lets discuss and get things correct. I have vast experience in running forums.

Ni
Nick #26

Better if you just go ahead and do it. I just made you a moderator and admin. I assume it’s ok with @usmannasir

AD
Andre Dsousa #27

Hello everyone.

I ended up creating a second server on GCP the free tier VM to test with no migrations, and it is running good.

Tonight 2~3 hours from now. Im going to reset the server to install clean again, and unfortunately set up all the sites & projects manually one by one.

I was using Ubuntu 20.04, and install everything except the remote MySQL

Does the cyberPanel runs better on CentOS than Ubuntu?

I will be more active with reports and replies since I really appreciate this panel and want to help you to keep it cool!

:sunglasses:

NK
Nitesh Kunnath #28

Cyberpanel until now is been tested for ubuntu 20.4 LTS and thus ubuntu 20.4 would be the best one to go with.

If you are a fan of centos, then try almalinux which is a fork of centos8 and maintained by the popular cloudlinux team. Almalinux is been officially supported by Cyberpanel in coming days.

So, you can choose either Ubuntu 20.4 or Almalinux.

And yes, almalinux performs a bit better and faster overall but for newbies, ubuntu would be a better choice because it has great knowledge base around the internet for any issues you face, you will definitely be getting the answer by googling it.

Sign in to reply