Control Web Panel

WebPanel => Migration from other control panels => Topic started by: webaits on August 09, 2022, 08:38:32 AM

Title: cwp-cwp migration Connection not reached The following error occurred
Post by: webaits on August 09, 2022, 08:38:32 AM
I'm trying to migrate user accounts/database/emails etc from the old CWP pro server to the new CWP free server.
However, I'm facing the error message:

Quote
cwp-cwp migration Connection not reached The following error occurred

And the complete account_transfer.log message:

Code: [Select]
export SSHPASS='PASSWORD'; /usr/bin/sshpass -e /usr/bin/ssh -p 5656 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet  root@123.123.123.123
test -d /usr/local/cwp/ && echo 'true' || echo 'false'
true

export SSHPASS=**********;/usr/bin/sshpass -e ssh-copy-id "-p 5656" root@123.123.123.123 -o StrictHostKeyChecking=no 2>&1
/usr/bin/ssh -p 2298 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet root@103.102.46.20 test -d /usr/local/cwp/ && echo 'true' || echo 'false' 2>&1

Here is no true or false after the last log line above.

I have already tried everything as shown in the video on the link:
https://docs.control-webpanel.com/docs/admin-guide/user-accounts/cwp-to-cwp-migration (https://docs.control-webpanel.com/docs/admin-guide/user-accounts/cwp-to-cwp-migration)

And the command for the source server:
Code: [Select]
ssh root@123.123.123.123 -p 5656Outputs
Quote
root

There is no firewall or additional setting like NAT at the host level.
And I have tried migration by disabling the firewall on both sides.

Below is SSH config for reference.
Code: [Select]
PasswordAuthentication yes
ChallengeResponseAuthentication no
UsePAM no
#UsePAM yes also checked

Any help to be able to utilize CWP to CWP migration?
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: LexBart on August 12, 2022, 09:09:02 PM
Hi! I see that the error appeared not so long ago, if I found the same question I wanted to ask.

Were you able to find the cause of the error? I have the exact same problem. I did a migration before and there was no problem.

Now I see the same error in the log files and in the last line there is also no "true" or "false"

At the same time, if I run the script manually
Code: [Select]
sshpass -p PASSWORD /usr/bin/ssh -p PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet root@HOST test -d /usr/local/cwp/ && echo 'true' || echo 'false' 2>&1
The server will answer "true".

I would like to understand where the error could be.
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: webaits on August 13, 2022, 04:19:30 AM
I was in a hurry and the CWP community/mods/support aren't that enough active.
I'm using the pro version.
So I had to perform the manual migration.
I'm not sure what was causing the issue.
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: setecabanas on August 18, 2022, 09:19:54 AM
I have same problem  :(

cwp-cwp tool migration is not working
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: Mickeys on August 30, 2022, 08:16:21 AM
I have same problem  :(

cwp-cwp tool migration is not working

I have same problem and solved executing from console:

Code: [Select]
export SSHPASS=password;/usr/bin/sshpass -e ssh-copy-id "-p Port" rootuser@xxx.xxx.xxx.xxx -o StrictHostKeyChecking=no 2>&1

 ssh -p ' 3814' -o 'StrictHostKeyChecking=no' 'root@149.202.78.83'


and now:
go migration and test and save, ready to migrate.


Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: PakPos on August 30, 2022, 08:54:09 AM
I have same problem  :(

cwp-cwp tool migration is not working

I have same problem and solved executing from console:

Code: [Select]
export SSHPASS=password;/usr/bin/sshpass -e ssh-copy-id "-p Port" rootuser@xxx.xxx.xxx.xxx -o StrictHostKeyChecking=no 2>&1

 ssh -p ' 3814' -o 'StrictHostKeyChecking=no' 'root@149.202.78.83'


and now:
go migration and test and save, ready to migrate.




you mean,, we must enter the command from cli first.. then we can use the GUI ?


i hope someone here have time to create tutorial in one post step by step... so n00b like me can be follow the instruction step by step...

and i hope staff make a batch script :D so we only need run SH.. then fill the question :D
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: Mickeys on August 30, 2022, 11:55:34 AM
Quote
you mean,, we must enter the command from cli first.. then we can use the GUI ?

from Remote Terminal login as root.
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: PakPos on August 31, 2022, 10:44:14 AM
Quote
you mean,, we must enter the command from cli first.. then we can use the GUI ?

from Remote Terminal login as root.

yes i mean remote terminal like putty.... under cli


so this is what i should to do
old server A: 1.1.1.1
username : root
pass : 12121212

new server B: 2.2.2.2
username: root
pass : 090909

firewall = off
ssh port : 2222 (both A and B)

step one:
connect to server using CLI, if remote then we can use like puTTY

login to server A

Code: [Select]
root@servera: # export SSHPASS=121212;/usr/bin/sshpass -e ssh-copy-id "-p 2222" root@1.1.1.1 -o StrictHostKeyChecking=no 2>&1 ssh -p ' 2222' -o 'StrictHostKeyChecking=no' 'root@2.2.2.2'enter
then go to CWP GUI do cwp-to-cwp migration just like tutorial

correct?
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: josemnunez on August 31, 2022, 01:01:41 PM
Make sure to put the ssh key in the authorized list on the origin server
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: kecoamumet on August 31, 2022, 11:06:25 PM
Quote
you mean,, we must enter the command from cli first.. then we can use the GUI ?

from Remote Terminal login as root.

yes i mean remote terminal like putty.... under cli


so this is what i should to do
old server A: 1.1.1.1
username : root
pass : 12121212

new server B: 2.2.2.2
username: root
pass : 090909

firewall = off
ssh port : 2222 (both A and B)

step one:
connect to server using CLI, if remote then we can use like puTTY

login to server A

Code: [Select]
root@servera: # export SSHPASS=121212;/usr/bin/sshpass -e ssh-copy-id "-p 2222" root@1.1.1.1 -o StrictHostKeyChecking=no 2>&1 ssh -p ' 2222' -o 'StrictHostKeyChecking=no' 'root@2.2.2.2'enter
then go to CWP GUI do cwp-to-cwp migration just like tutorial

correct?

hey pakpos, do you deliver mails? hehehe..

actually im facing same problem with you. what i do is.

on old server
after doing the API allow stuff than generate the ssh generator

on the new server
you can do this on ssh


Code: [Select]
# export SSHPASS=passwordoldserver;/usr/bin/sshpass -e ssh-copy-id "-p 22" root@ipoldserver -o StrictHostKeyChecking=no 2>&1

# ssh -p ' 22' -o 'StrictHostKeyChecking=no' 'root@ipoldserver'

and please make sure the sshpass is installed on the new server. after that, you can do the cwp to cwp migration stuff.
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: sant0s on September 02, 2022, 07:09:06 AM
Let make simple,

on new server copy Public Key from: # cat /root/.ssh/id_rsa.pub
and paste Public key to Old server: # nano /root/.ssh/authorized_keys
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: sundar rajamani on September 03, 2022, 07:41:59 AM
Hi facing the same error after update cwp I think am facing this issue....
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: sundar rajamani on September 03, 2022, 08:01:41 AM
Let make simple,

on new server copy Public Key from: # cat /root/.ssh/id_rsa.pub
and paste Public key to Old server: # nano /root/.ssh/authorized_keys

Nice this method looks like its working any way once complete will update here
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: PakPos on September 03, 2022, 01:39:43 PM
Let make simple,

on new server copy Public Key from: # cat /root/.ssh/id_rsa.pub
and paste Public key to Old server: # nano /root/.ssh/authorized_keys

i will test soon
right now i already move all account manually :(

thankyou for your simple explanation
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: overseer on March 03, 2023, 05:16:22 AM
You have to stand on your head, pat your belly, and rub your feet at the same time in order to make this work. Actually, I just had the opportunity to do a CWP -> CWP migration, so here was my solution:
Disable the firewall (CSF & LDF) on both servers.
On both servers, reset the r00t password to be 8 characters or fewer.
In
Code: [Select]
/etc/ssh/sshd_config set:
Code: [Select]
PermitRootLogin yes
StrictModes no
Restart sshd:
Code: [Select]
service sshd restartOn the source server, set up the API key (CWP Settings > API Manager) for CWP Migration using the default CWP template.
On the receiving server, use the interface in User Accounts > CWP->CWP Migration.
After successfully migrating the accounts, revert all changes to your SSH configuration, reset the r00t passphrase to strong ones, and re-enable the firewalls.
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: overseer on March 03, 2023, 06:25:47 AM
on new server copy Public Key from: # cat /root/.ssh/id_rsa.pub
and paste Public key to Old server: # nano /root/.ssh/authorized_keys
And to be clear, this had no bearing on my connection difficulties. I already had my SSH key pair in place and it was in the authorized_keys, so that was not the issue. I too experienced the "Connection not reached - the following error occurred" error message before running down my solution list. (For sure, it was the standing on the head part that solved it...)
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: apsuva on June 09, 2024, 11:05:41 AM
I am trying to move server on (AlmaLinux release 9.4). Cwp to Cwp Migration error is "Connection not reached". Terminal is working but cwp to cwp module is not working.

on server terminal;

[root@server /]# export SSHPASS=xxxxxxx; /usr/bin/sshpass -e /usr/bin/ssh -p1111 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet  root@111.111.111.111
[root@ server /]# test -d /usr/local/cwp/ && echo 'true' || echo 'false'
true


on site cwp-to-cwp save after log file;

[root@server /]# tail -f /var/log/cwp/account_transfer.log
2024-06-09 10:57:49 export SSHPASS=**********;/usr/bin/sshpass -e ssh-copy-id "-p 1111" root@111.111.111.111 -o StrictHostKeyChecking=no 2>&1
2024-06-09 10:57:49 /usr/bin/ssh -p 1111 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet root@111.111.1111 test -d /usr/local/cwp/ && echo 'true' || echo 'false' 2>&1
2024-06-09 10:57:49 false

Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: Starburst on June 10, 2024, 06:26:16 PM
CWP Migration doesn't work on AL9 & CWP beta yet.
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: Orlox on December 28, 2024, 07:33:20 PM
I had to run:
export SSHPASS=mypasshere
and then
sshpass -e ssh-copy-id -p 22 -o StrictHostKeyChecking=no root@111.11.11.111 (old server ip)

also dance naked in the rain
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: Starburst on December 29, 2024, 04:05:25 AM
[Off Topic]

No one wants that last line.

Kinda like when waffle stomping in the shower doesn't work, sometimes you gotta go outback with a pressure washer...  ;D

Not sure why the neighbor's don't talk...  :o
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: samucamg on December 30, 2024, 12:40:04 PM
I tried to migrate from Almalinux 9 to Almalinux 9 and I have the problem of not being able to connect.
I hired support from CWP itself and asked them to make the connection, they asked me for the data, they couldn't do it, and they made up some excuse. The ticket has been open there for 5 days now.

I think I'll have to give up and do it manually, because the system doesn't even recover the backups generated by the system itself, and it doesn't even connect to make the transfer.
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: sundar rajamani on January 28, 2025, 07:41:23 PM
cwp migration still working for almalinux 8 previously i have done by using with the above procedure but today that procedure not working any update?
Title: Re: cwp-cwp migration Connection not reached The following error occurred
Post by: farhan on February 05, 2025, 01:17:39 AM
Let make simple,

on new server copy Public Key from: # cat /root/.ssh/id_rsa.pub
and paste Public key to Old server: # nano /root/.ssh/authorized_keys

It worked for me, thanks mate  :D