Author Topic: CWP-CWP migration fails: Error API TOKEN  (Read 2002 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CWP-CWP migration fails: Error API TOKEN
« on: January 10, 2021, 09:55:35 PM »
Im using latest CWP version: 0.9.8.1031 on source (CentOS 7.8) and destination servers (CentOS 7.9)
I can ssh from dest to source, CSF is disabled on both
SSH and port 2304 opened on both, password and key auth allowed on both.

I have created API access key on source and trying to connect from dest to source following https://docs.control-webpanel.com/docs/admin-guide/user-accounts/cwp-to-cwp-migration and when I hit "Test and Save" I always get:
"Error API TOKEN
There is a problem with your TOKEN API"

In the logs:
Code: [Select]
2021-01-10 21:51:27 entre 1
2021-01-10 21:51:28 export SSHPASS='***'; /usr/bin/sshpass -e /usr/bin/ssh -p 223 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet root@185.235.130.135
2021-01-10 21:51:28 true

2021-01-10 21:51:28 entre 2
2021-01-10 21:51:29 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system.
(if you think this is a mistake, you may want to use -f option)

--> export SSHPASS=**********;/usr/bin/sshpass -e ssh-copy-id "-p 223" root@185.235.130.135 -o StrictHostKeyChecking=no 2>&1
2021-01-10 21:51:30 true
--> /usr/bin/ssh -p 223 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet root@185.235.130.135 test -d /usr/local/cwp/ && echo 'true' || echo 'false' 2>&1
2021-01-10 21:51:30 entre 3
2021-01-10 21:51:30 entre 4

So it connects successfully and drops.

I know the same issue was reported previously by other users and was gone with the latest build but I'm already using the latest build https://forum.centos-webpanel.com/index.php?topic=9483.msg33171#msg33171
Please help to fix this.

Offline
*
Re: CWP-CWP migration fails: Error API TOKEN
« Reply #1 on: January 11, 2021, 12:04:24 PM »
Hello

Please try to enable and disable the firewall knowing that port 2304 is open. This should be done on both servers

Offline
*
Re: CWP-CWP migration fails: Error API TOKEN
« Reply #2 on: August 04, 2022, 03:01:24 PM »
Hi, I did everything as the poster did & previously, I did similar setup & migrated many servers. Today not able to do cwp to cwp migration. I got same your as you get. Can anyone confirm is it bugs or it's my end issue?

CWPpro version: 0.9.8.1142
Biswas Host Ltd

www.biswashost.com

Domain, Hosting, Cloud Hosting, VPS, Dedicated Server,

Web Design, SSL, VPN, Professional Email & More

Offline
*
Re: CWP-CWP migration fails: Error API TOKEN
« Reply #3 on: August 15, 2022, 03:37:52 PM »
I have the same issue, the error message produced by GUI is "Connection Not Reached"
Logs say same as previous poster.
I also disabled FW on both sides.
Validated SSH connection without issue.

I then tried to use full backup imports. Transferred the zipfile to the new CWP, then initiated the Account restore which fails at "Problem when unzipping the file, the path /home/tmpback/vmail/cp/ is not available"