migration tool - fails to connect as remote user

Discussion in 'Plugins/Modules/Addons' started by Lushy, Jun 27, 2019.

  1. Lushy

    Lushy New Member

    Hi all,
    I'm hoping someone can help. I have a Centos 6 installation and migrating to a new server (Centos 6). I keep getting an error either in dry or migraiton mode. The initial SOAP connection as the remote user fails:

    [ERROR] API call to login failed. See log file for details.
    Could not connect to api. Please check if the data you provided is correct.

    However, I do not see any attempt to access the server in the apache logs. To make things more complicated, I created a php script to test the remote user and this logged in no problems at all - plus I see the logon showing in the apache logs.

    The migration log is showing:
    2019-06-27 14:35:59 - [ERROR] JSON API ERROR in API call (login): NO ACCESS
    2019-06-27 14:35:59 - [INFO] Trying again (login)
    2019-06-27 14:36:01 - [ERROR] JSON API ERROR in API call (login): NO ACCESS
    2019-06-27 14:36:01 - [INFO] Trying again (login)
    2019-06-27 14:36:03 - [ERROR] JSON API ERROR in API call (login): NO ACCESS
    2019-06-27 14:36:03 - [ERROR] API call to login failed.
    2019-06-27 14:36:03 - [ERROR] JSON API ERROR. Arguments sent were: array (
    'username' => '<remote user>',
    'password' => '<password>',
    )
    2019-06-27 14:36:03 - [ERROR] Could not log in to api at https://<target server>:8080/remote/ with user migration.

    I'm running ISPConfig 3.1.13p1 on both servers. I'm running php 5.4 on the source server and php 5.7 on the target.

    I've checked the obvious things like making sure the account has all the grant options selected and I can login via a soap connection to it.

    I'm at a loss as to why the script is failing and I am not seeing a connection attempt in the logs.

    Any one have any thoughts?

    Thanks

    Rich
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to start the migration tool like this:

    ./migrate --legacy-tls

    This switches the tool into the legacy tls mode, it helps when the two servers are not able to communicate over tls.
     
  3. Lushy

    Lushy New Member

    Perfect, that was the fix.

    Thanks
     
  4. Kroks

    Kroks New Member

    Hello,
    have the same problem.

    source server (old): debian 6
    target server (new): ubuntu 18.04

    I tried to run ./migrate and ./migrate --legacy-tls
    [ERROR] API call to login failed. See log file for details.
    Could not connect to api. Please check if the data you provided is correct.

    Tried to turn off SSL in new ubuntu server (/etc/apache2/sites-available/ispconfig.vhost) - SSLEngine Off
    same result.

    Running migration tool in source server (old debian)
    Any help please?
     
    Last edited: Mar 4, 2020
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Have you done that?
    Have you done that? What did log show?
     
  6. Kroks

    Kroks New Member

    Checked it already, data are correct.

    Log is the same as above:
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Might be a firewall or router issue. Are you sure that the connection from old to the new server on port 8080 is possible at all? Try with e.g. wget command on old server:

    wget https://my.private.ip.address:8080
     
  8. Kroks

    Kroks New Member

    Can't post URL here so:
    if I try wget, getting:
    [email protected]:~# wget my.private.ip.address:8080
    --2020-03-05 08:35:15-- my.private.ip.address:8080/
    Connecting to my.private.ip.address:8080... connected.
    ERROR: cannot verify my.private.ip.address’s certificate, issued by “/C=SK/ST=ABC/L=ABC/O=ABCs r.o./CN=my.domain.com”:
    Self-signed certificate encountered.
    ERROR: certificate common name “my.domain.com” doesn’t match requested host name “my.private.ip.address”.
    To connect to my.private.ip.address insecurely, use ‘--no-check-certificate’.


    If I try wget without https, getting:
    [email protected]:~# wget my.private.ip.address:8080
    --2020-03-05 08:35:12-- my.private.ip.address:8080/
    Connecting to my.private.ip.address:8080... connected.
    HTTP request sent, awaiting response... 400 Bad Request
    2020-03-05 08:35:12 ERROR 400: Bad Request.
     
    Last edited: Mar 5, 2020
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Does it work with?

    wget --no-check-certificate my.private.ip.address:8080
     
  10. Kroks

    Kroks New Member

    Connecting to xxxxx:8080... connected.
    HTTP request sent, awaiting response... 400 Bad Request
    2020-03-05 08:46:39 ERROR 400: Bad Request.

    This is because there is htpasswd maybe?
    Can turn it off it it's necessary
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, you must turn it off. The tool can not connect if you disallow connections by htpasswd.
     
  12. Kroks

    Kroks New Member

    Ok, seems it works fine now. Thank you
     
    Gwyneth Llewelyn likes this.

Share This Page