• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved [Plesk Migrator] Migration from Directadmin to Plesk Onyx issue

Iñaki López

New Pleskian
Hi all,

I've been reading about Directadmin migration problems using Plesk Migrator 2.7.9-0. I've configured all required options:

On Directadmin 1.51.3 server (source):
  • CentOS 6.9 (Linux version 2.6.32-642.15.1.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) ) #1 SMP Fri Feb 24 14:31:22 UTC 2017)
  • Python 2.6.6
  • sshd_config
    PermitRootLogin yes
    RSAAuthentication yes
    PubkeyAuthentication yes
    UsePAM yes
    AllowUsers plesk-migrator-*

On Plesk Onyx 17.5.3 Update #6 server (target):
  • CentOS 7.3.1611 (Linux version 3.10.0-514.16.1.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Apr 12 15:04:24 UTC 2017)
  • Python 2.7.5
  • panel.ini
    [api]
    enabled = on
  • No admin restrict access is configured
  • Disabled Fail2ban and Plesk Firewall

But after taking into account all threads on forum about errors on this kind of migration, I still receive this error:

Code:
Failed to collect information about objects on source server
Cause: Command execution failed on the source server 'directadmin' (x.x.x.x) with non-zero exit code.
command: /opt/plesk/python/2.7/bin/python /root/plesk_migrator/plesk_migrator-6858cw408xtludzv08al1o3zjphgnui5/agent/directadmin.py
exit code: 1
stdout: [97m[2017-05-20 18:56:05] [0mGetting DirectAdmin config[0m
...................................
....... HERE GOES USER DETAIL DATA FROM DIRECTADMIN SERVER .......
...................................
[97m[2017-05-20 18:56:06] [0mClosing connection to DirectAdmin database[0m

stderr: Traceback (most recent call last):
File "/root/plesk_migrator/plesk_migrator-39eq08n21k0zy2i3lmdtmpzunoyvst4w/agent/directadmin.py", line 1742, in <module>
panel_dump = get_dump()
File "/root/plesk_migrator/plesk_migrator-39eq08n21k0zy2i3lmdtmpzunoyvst4w/agent/directadmin.py", line 1705, in get_dump
resellers=get_resellers(warnings, connections),
File "/root/plesk_migrator/plesk_migrator-39eq08n21k0zy2i3lmdtmpzunoyvst4w/agent/directadmin.py", line 1670, in get_resellers
suspended
File "/root/plesk_migrator/plesk_migrator-39eq08n21k0zy2i3lmdtmpzunoyvst4w/agent/directadmin.py", line 1504, in get_subscriptions
da_subscription
File "/root/plesk_migrator/plesk_migrator-39eq08n21k0zy2i3lmdtmpzunoyvst4w/agent/directadmin.py", line 1225, in get_protected_directories
"AuthUserFile"
File "/root/plesk_migrator/plesk_migrator-39eq08n21k0zy2i3lmdtmpzunoyvst4w/agent/directadmin.py", line 1168, in get_protected_directory_users
skip_error=True
File "/root/plesk_migrator/plesk_migrator-39eq08n21k0zy2i3lmdtmpzunoyvst4w/agent/directadmin.py", line 192, in get_lines
error = check_file(filename)
File "/root/plesk_migrator/plesk_migrator-39eq08n21k0zy2i3lmdtmpzunoyvst4w/agent/directadmin.py", line 126, in check_file
if not os.path.exists(filename):
File "/opt/plesk/python/2.7/lib64/python2.7/genericpath.py", line 26, in exists
os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

That is a critical error, migration was stopped.

Can someone help me?. As you can see the stdout ssh session output shows me those rare codes [97m etc. that as far as I know are color related codes for ssh sessions. Could this be causing the error?.

Thank you in advance for your help!.
 
Last edited:
As you can see the stdout ssh session output shows me those rare codes [97m etc. that as far as I know are color related codes for ssh sessions. Could this be causing the error?.
Are you sure that you have no any accounts, passwords, etc on DA side with non-UTF symbols?
 
Are you sure that you have no any accounts, passwords, etc on DA side with non-UTF symbols?

Hi Igor, thanks for your answer.

I am sure I have no usernames with other symbols than ascii ones, but I cannot tell about passwords.
I've checked the default linux language on DA server, perhaps this is the problem:
Code:
$ echo $LANG
es_ES.UTF-8
As you can see the system runs on Spanish language... and using UTF-8 as codepage..

Locale command shows this:
Code:
$ locale
LANG=es_ES.UTF-8
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=

Should I change that?, could this change generate any change or issue in my actual DA server?.

Thank you!.
 
Hi, I have changed the locale for Linux DA Server and reboot it.

Code:
$ echo $LANG
en_US.UTF-8

After that I tried again the Plesk Migrator Extension on destination Plesk server and raises me the same error... :(

Could I modify the Python script to adapt some lines to prevent the issue. I've googled about it and I can see some people with same problems in different scenarios (f.e. TypeError: coercing to Unicode: need string or buffer), so perhaps I can modify some lines in Python script and try again. But for doing that I need to know where the Python script is located in my destination Plesk server, so the copy uploaded in next attempt is the modified one.

Can you help me?.
Cound the issue be related to different Python versions (2.6.6 in DA, 2.7.5 in Plesk), I don´t know too much about Python but perhaps there is an update related to UTF in those Python versions.

Thanks for your help again!.
 
Hi Igor,

thank you for the update. I updated Plesk Migrator and tried again, but again the same issue... but I reviewed the plesk migrator error log and I noticed in the subdomain part of the log (when migrator is listing subdomains for a domain on DA server) that the log stopped in one subdomain. I deleted that subdomain from DA server and then, Plesk Migrator start working and now it shows me all data from directadmin server.

So, many thanks for your help... I can start the migration now, I hope :)

Thank you!.
 
Hi!,

one last question, does Plesk Migrator migrate passwords?, in my first test the log tell me that cannot verify somethings (database connection f.e.) because passwords are encrypted. Also I was trying to access a migrated mailbox in new server using password in old server, but tells me that password is wrong. So, after migration, I have to reconfigure all passwords (mailboxes, databases custom, wordpress ones, prestashop ones)?.

Thank you for your answer!.
 
Back
Top