ISPConfig migration script - Name of remote user?

Discussion in 'Plugins/Modules/Addons' started by carpman, Oct 29, 2016.

  1. carpman

    carpman Member

    Hi, ok I have to migrate my old server to a new server complete with new IPs, I just in the process of trying a dry run and it is asking the question:

    Name of the remote user of TARGET ISPConfig3 system []:

    No 100% sure about this, would it be root?

    Bear in mind i want to migrate the complete server in go.

    thanks
     
  2. carpman

    carpman Member

    OK, think it is probably the ISPconfig user it is asking for, though have tried this and no joy?

    Setup

    New server does not have a domain on it as i am migrating complete server and so the domains on old server will be moved to new.

    remote user name = admin
    password for remote user = apassword
    URL for remote server = https://newserverIP:9500/remote (note changed the default port)

    using the above the script just loops back to:
    I will now make a test connection to the remote api. Please press return when I may try to connect.

    It gives error message
    Could not connect to api. Please check if the data you provided is correct.

    Note i can login into ISPConfig on new server fine.

    Any ideas?

    thanks
     
  3. webguyz

    webguyz Active Member HowtoForge Supporter

    You need to create a remote api user and pw on the Target server. When creating the remote user check all the boxes so the Remote User has full access.
     
  4. carpman

    carpman Member

    Thanks for reply, I thought that might have been it so did create on with all boxes checked, but still the same problem that it can't connect it api?
     
  5. carpman

    carpman Member

    Ok checking the target system logs for time when i try a test connection from source i see this in the logs


    Oct 29 19:40:01 server /USR/SBIN/CRON[4944]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Oct 29 19:40:01 server /USR/SBIN/CRON[4945]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Oct 29 19:40:01 server /USR/SBIN/CRON[4946]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /dev/null)
    Oct 29 19:40:02 server pure-ftpd: (?@::1) [INFO] New connection from ::1
    Oct 29 19:40:02 server pure-ftpd: (?@::1) [INFO] Logout.
    Oct 29 19:40:02 server dovecot: imap-login: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=::1, lip=::1, secured, session=<GB96TQVAQQAAAAAAAAAAAAAAAAAAAAAB>

    Is it just coincidence or is this the migration script trying connect?

    thanks
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The log you posted shows activity of the ispconfig monitor on the local server and not the migration tool.

    Ensure that you have no firewall between the servers that blocks the connection from old to new server and the remote URL ends with a /, so correct would be https://newserverIP:9500/remote/ if 9500 is the port that you run ispconfig on the new servers.

    And as webguyz pointed out, the remote user is a user that you created under System > Remote user on the new server, all checkboxes should be checked for that user.
     
  7. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    In addition, please check the migrate.log that is created.
     
  8. carpman

    carpman Member

    thanks for replies.

    1. Firewall
    I can connect fine to ISPCongig control panel using custom port, so unless there is another port that need to be open this is not the issue.

    2. Remote user
    As previously confirmed i created a remote user on target server with all boxes checked

    3. / on end of remote server URL
    This was just a typeO and was used when running script

    4. migrate.log
    I have not been able to locate this file?

    thanks
     
  9. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    The migrate.log is in the directory where you launched the migrate script. If you have an older php version it might be in subfolder "legacy".
     
  10. carpman

    carpman Member

    Ok found migrate.log, here is contents

    cat /root/migration/legacy/migrate.log
    2016-10-29 15:42:12 - [INFO] Migration tool version 1.5.7 started.
    2016-10-29 15:42:15 - [INFO] Config file not present.
    2016-10-29 15:42:15 - [INFO] .. is not a valid module file.
    2016-10-29 15:42:15 - [INFO] . is not a valid module file.
    2016-10-29 15:54:19 - [ERROR]
    2016-10-29 15:54:43 - [ERROR]
    2016-10-29 15:55:56 - [ERROR]
    2016-10-29 15:56:33 - [ERROR]
    2016-10-29 16:06:05 - [ERROR]
    2016-10-29 16:41:54 - [INFO] Migration tool version 1.5.7 started.
    2016-10-29 16:41:57 - [INFO] Config file not present.
    2016-10-29 16:41:57 - [INFO] .. is not a valid module file.
    2016-10-29 16:41:57 - [INFO] . is not a valid module file.
    2016-10-29 16:44:41 - [ERROR]
    2016-10-29 16:46:11 - [ERROR]
    2016-10-29 17:00:59 - [INFO] Migration tool version 1.5.7 started.
    2016-10-29 17:01:00 - [INFO] Config file not present.
    2016-10-29 17:01:00 - [INFO] .. is not a valid module file.
    2016-10-29 17:01:00 - [INFO] . is not a valid module file.
    2016-10-29 17:02:11 - [ERROR]
    2016-10-29 17:45:27 - [ERROR]
    2016-10-29 18:38:11 - [ERROR]
    2016-10-29 18:40:10 - [ERROR]


    thanks
     
  11. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Empty message behind [ERROR]? This should mean that your remoting url does not give any reply. You could try disabling SSL on the ispconfig vhost temporarily and try the http:// url instead then.
     
  12. webguyz

    webguyz Active Member HowtoForge Supporter

    Can you access the page with a browser? https://newserverIP:9500/remote/
    You should get a blank page, but no errors. This will tell you if the path and port info is correct.
     
  13. carpman

    carpman Member

    I will try disabling ssl, though when loading url
    https://newserverIP:9500/remote/
    i get blank page no errors which as webguyz says should indicate url is ok
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you try this from the old server e.g. with wget? It is possible that you can connect from your browser but not from the old server. Try:

    cd /tmp
    wget --no-check-certificate https://newserverIP:9500/remote/
     
  15. carpman

    carpman Member

    Hi, ok tried this and get warning

    Self-signed certificate encountered.
    WARNING: certificate common name “mydomain.net” doesn’t match requested host name “newserverIP”.
    HTTP request sent, awaiting response... 200 OK
    Length: 0 [text/html]
    Saving to: “index.html”
     
  16. carpman

    carpman Member

    Any ideas?

    thanks
     
  17. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    POst #11 - disabel ssl on the target
     
  18. carpman

    carpman Member

    Ok, disabled ssl and got a connection, tried a dryrun and all seemed ok so did migration, kept seeing this during import after running migration import file on target

    Permission denied (publickey).

    rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]

    rsync error: unexplained error (code 255) at io.c(605) [Receiver=3.0.9]

    chmod: cannot access `/var/vmail/domain.co.uk/bounce/Maildir/cur/*': No such file or directory

    chmod: cannot access `/var/vmail/domain.co.uk/bounce/Maildir/tmp/*': No such file or directory

    it finished with copying over all databases.

    Checking target server i can see it has added accounts and sites, though sites use old IPs ?

    thanks
     
  19. carpman

    carpman Member

    Check domain storage space usage on target server and all looks ok except mail usage show only 164 KB for each account and as imap is used it should much more?
     
  20. carpman

    carpman Member

    Another issue i have regards IP allocation, i am using a vps server and the host has their own firewall in place that is configured via vps CP, they also issue internal IPs to server with the external ones mapped in vps CP.

    So on server config look like this (IPS change)

    cat /etc/network/interfaces

    # The loopback network interface
    auto lo
    iface lo inet loopback
    # The primary network interface
    #allow-hotplug eth0
    #iface eth0 inet dhcp
    auto eth0
    iface eth0 inet static
    address 70.8.7.27
    netmask 255.255.255.0
    gateway 11.12.1.1
    auto eth0:1
    iface eth0:1 inet static
    address 70.8.7.203
    netmask 255.255.255.0
    gateway 11.12.1.1
    auto eth0:2
    iface eth0:2 inet static
    address 70.8.7.122
    netmask 255.255.255.0
    gateway 11.12.1.1
    etc
    In ISPconfig server IPs the internal one are listed only, they are also listed when choosing an IP in Sites.

    When choosing an IP iin DNS records it lists new internal IPs, old server IPs and 2 new external IPs.
    The listed external IPs have been set in server main domain DNS records as primary server IP and ns1 and ns2.

    Question, why can i see these 2 external IP, but not others in dns?

    Do i have to setup Server IPv4 mappin so i can see and use external IPs

    Thanks
     

Share This Page