1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Ensim 4 -> Plesk 10.3

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by btrotter, Jul 12, 2011.

  1. btrotter

    btrotter Guest

    0
     
    I'm new to both Ensim and Plesk but have been tasked with migrating a ton of Ensim 4 hosts to Plesk 10.

    When I try to start a migration, I get:

    and indeed that directory does not exist. From what I can gather, those directories contain migration agents that are supposed to get copied to the source server. As far as I can tell I've installed all possible software on the Plesk side and everything is marked green.

    Am I missing something, missing a step, need to download something, or is Ensim no longer a supported source in Plesk 10?

    Even if I have to go through an older version of plesk or even multiple versions of plesk, it may be worth doing given the number of sites needing to be migrated. Can anyone help me devise an automated path from Ensim 4 to Plesk 10?
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Please read carefully Announcement at the top of this forum's section.
     
  3. Sergey Prohorov

    Sergey Prohorov Basic Pleskian Staff Member

    27
    70%
    Joined:
    Feb 26, 2006
    Messages:
    98
    Likes Received:
    11
    Location:
    Novosibirsk, Russia
  4. btrotter

    btrotter Guest

    0
     
    Synchronize worked for me to get past the first error, but suggest fixing Plesk Panel so that it does a synchronize automatically when it hits that error?

    Now I get:

    Warning:

    /var/named/db.test.com has errors according to results of named-checkzone.

    Error: hosting "test.com"

    Execution of /opt/psa/admin/plib/api-cli/domain.php --update test.com -hosting true -hst_type phys -do-not-apply-skeleton -ip 192.168.0.107 -www-root httpdocs -ssl false -same_ssl true -err_docs false -login testcom -passwd '' -passwd_type encrypted -webspace-root /var/www/vhosts/test.com failed with return code 1.
    Stderr is
    An error occurred during domain update: error in hosting updating: Unable to update hosting settings: system user update is failed: Unable to create system user: usermng: Failed to set password for user 'testcom'


    Edit:
    http://kb.odin.com/6247 looked helpful but:
    root@PleskDV:~# cat /etc/pam.d/plesk_usermng_encrypted
    password required pam_plesk.so try_first_pass

    Re-Edit:
    http://kb.odin.com/1532
    after a little hacking about in pam.conf files (removing a line in common-files) and doing the above again, the command worked, but I still got the same error as posted before (in the other thread about creating user usermng)

    P.s. this is Ubuntu 10.04
     
    Last edited by a moderator: Jul 13, 2011
  5. Sergey Prohorov

    Sergey Prohorov Basic Pleskian Staff Member

    27
    70%
    Joined:
    Feb 26, 2006
    Messages:
    98
    Likes Received:
    11
    Location:
    Novosibirsk, Russia
    Could you provide password 'testcom' user password from two files?
    1. /opt/psa/PMM/rsessions/<latest directory>/info.xml
    2. /opt/psa/PMM/rsessions/<latest directory>/restore.xml
    it located in 'password' element inside 'sysuser' element with name="testcom"

    To speedup processing the problem you may use this announcement http://forum.parallels.com/announcement.php?f=569
     
  6. btrotter

    btrotter Guest

    0
     
    Session folder

    Since it wouldn't allow the XML files without compression or renaming, I just attached the entire session directory (27kb).

    The "testcom" password is "testcom" for reference as well.

    Thanks so much for taking the time. The announcement sounds like a great deal, but the man in charge who knows all the licensing stuff and could make the call just got married and is gone for 10 more days and I'm just trying to get a solid migration plan tested so we can do all these sites (a few hundred). As far as I know we don't need any more licenses, so if I can get this working we shouldn't need the official assistance.

    In any case, just to recap, this is an Ubuntu 10.04 LTS x86_64 VM, set up clean and plesk 10.3 installed following the directions. I'd be happy to wipe and reinstall 10.2 or do something different if it will help.

    info.xml:
    <sysuser home="/var/www/vhosts/test.com" name="testcom"><password type="encrypted">$1$sRbGmBdA$RmWB2AtGMLYTYq/tcABCD0</password>
    </sysuser>

    restore.xml:
    <sysuser home="/var/www/vhosts/test.com" name="testcom"><password type="encrypted">$1$sRbGmBdA$RmWB2AtGMLYTYq/tcABCD0</password></sysuser>


    for verification:
    php > echo crypt('testcom', '$1$sRbGmBdA$');
    $1$sRbGmBdA$RmWB2AtGMLYTYq/tcABCD0
     

    Attached Files:

    Last edited by a moderator: Jul 13, 2011
  7. btrotter

    btrotter Guest

    0
     
    If I try to do it manually (filling in the password in the empty quotes):

    root@PleskDV:/# /opt/psa/admin/plib/api-cli/domain.php --update test.com -hosting true -hst_type phys -do-not-apply-skeleton -ip 192.168.0.107 -www-root httpdocs -ssl false -same_ssl true -err_docs false -login testcom -passwd '$1$sRbGmBdA$RmWB2AtGMLYTYq/tcABCD0' -passwd_type encrypted -webspace-root /var/www/vhosts/test.com
    /usr/sbin/chpasswd: invalid option -- 'e'
    Usage: chpasswd [options]

    Options:
    -h, --help display this help message and exit
    -S, --stdout report encrypted passwords to stdout
    instead of changing the passwd file

    usermng: Failed to set password for user 'testcom'
    Error report was sent successfully
    Report body:
    <?xml version="1.0"?>
    <error><type>PleskUtilException</type><message>/opt/psa/admin/bin/usermng '--add-user' '--user=testcom' '--homedir=/var/www/vhosts/test.com' '--shell=/bin/false' failed with message: usermng: Failed to set password for user 'testcom'</message><file>/opt/psa/admin/plib/common_func.php3</file><line>1004</line><code>0</code><trace>#0 /opt/psa/admin/plib/SysUser.php(564): util_exec('usermng', Array, Array)
    #1 /opt/psa/admin/plib/SysUser.php(1089): SysUser-&gt;_updateUnix()
    #2 /opt/psa/admin/plib/PHostingManager.php(532): SysUser-&gt;update()
    #3 /opt/psa/admin/plib/PHostingManager.php(317): PHostingManager-&gt;updateSysUser()
    #4 [internal function]: PHostingManager-&gt;transactionalUpdate(Object(Transaction_Rollback))
    #5 /opt/psa/admin/plib/Transaction/Rollback.php(15): call_user_func(Array, Object(Transaction_Rollback))
    #6 /opt/psa/admin/plib/PHostingManager.php(293): Transaction_Rollback-&gt;commit(Array)
    #7 /opt/psa/admin/plib/DSWeb.php(91): PHostingManager-&gt;update()
    #8 /opt/psa/admin/plib/api-common/cuDomain.php(2223): DSWeb-&gt;update()
    #9 /opt/psa/admin/plib/api-common/cuDomain.php(1814): cuDomain-&gt;phostingUpdate(Object(BsDomain), Array, NULL)
    #10 /opt/psa/admin/plib/api-common/cuDomain.php(908): cuDomain-&gt;cmdUpdate('test.com', Array)
    #11 /opt/psa/admin/plib/api-common/AbstractCuExecutor.php(21): cuDomain-&gt;__construct()
    #12 /opt/psa/admin/plib/api-common/CuExecutor.php(29): AbstractCuExecutor-&gt;_execUtil('cuDomain', NULL)
    #13 /opt/psa/admin/plib/api-cli/CliUtilityRunner.php(18): CuExecutor-&gt;run()
    #14 /opt/psa/admin/plib/api-cli/CliUtilityRunner.php(43): CliUtilityRunner-&gt;run()
    #15 /opt/psa/admin/plib/api-cli/domain.php(4): require_once('/opt/psa/admin/...')
    #16 {main}</trace><user-ip/><host/><request-url/><request-method/><product-version>10.3.0 Ubuntu 10.04 1012110623.18
    </product-version></error>

    An error occurred during domain update: error in hosting updating: Unable to update hosting settings: system user update is failed: Unable to create system user: usermng: Failed to set password for user 'testcom'
     
  8. btrotter

    btrotter Guest

    0
     
    Related:
    http://forum.parallels.com/pda/index.php/t-107016.html

    Recommended solution to plesk:
    http://blog.loftninjas.org/2009/12/07/scripting-the-root-password-on-ubuntu-910-karmic/

    Found a post from IgorG:
    http://forum.parallels.com/pda/index.php/t-106608.html
    trying that chpasswd wrapper...

    on the command line seems to work now:
    root@PleskDV:/usr/sbin# /opt/psa/admin/plib/api-cli/domain.php --update test.com -hosting true -hst_type phys -do-not-apply-skeleton -ip 192.168.0.107 -www-root httpdocs -ssl false -same_ssl true -err_docs false -login testcom -passwd '$1$sRbGmBdA$RmWB2AtGMLYTYq/tcABCD0' -passwd_type encrypted -webspace-root /var/www/vhosts/test.com
    usermod: no changes
    SUCCESS: Update of domain 'test.com' completed.


    Trying full migrate....
    Looks good. Hooray!

    Thanks for your help in this thread and IgorG's older post!
     
    Last edited by a moderator: Jul 13, 2011
  9. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    btrotter,

    We are glad to hear your success story! We wish you to enjoy Plesk after migration from Ensim.
    Now you are Plesk user and we are ready to help you with any Plesk problems. I hope that our Plesk community and Plesk experts will support you here too :)
     
  10. btrotter

    btrotter Guest

    0
     
    I have two new problems during my migrations...
    The first seems to be one of converting MySQL 3 to MySQL 5.
    The second I'm unsure. Bob's password should have been bobbob, however that was on a domain I wasn't trying to import at the time, and the error it actually complained about was maximum number of mailboxes reached.
    Any ideas?



    ERROR: (domain object 'wp4test.foobar.com') Failed deployment of database wp4test_foobar_com_-_testdb (domain wp4test.foobar.com)

    ERROR: () Execution of /usr/bin/mysql --no-defaults -u admin -h localhost -P 3306 wp4test_foobar_com_-_testdb failed with return code 1.
    Stdin is
    source /tmp/migration-unpack-GXcLMg/sqldump_1107241939;
    exit
    Stderr is
    ERROR 1064 (42000) at line 4 in file: '/tmp/migration-unpack-GXcLMg/sqldump_1107241939': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-------------------------------------------------------






    DROP TABLE IF EXIS' at line 1




    ERROR: (domain object 'test.com') Failed deployment of mail user bob@test.com

    ERROR: () Execution of /opt/psa/admin/plib/api-cli/mail.php --create bob@test.com -passwd '' -passwd_type encrypted -mailbox true failed with return code 1.
    Stderr is
    Maximum number of mailboxes was reached.
     
  11. btrotter

    btrotter Guest

    0
     
    follow-up

    I disabled mysql conversion/importing by commenting out the lines that add the database names to the array in _getDatabases in Agent.pm, so then my site would continue importing. This got me around mysql for now (though I'll have to import manually).

    However I now seem to be having an issue where the users I import don't seem to be able to login if their password is their username. Will I have to manually check for this? It seems as though the script silently just doesn't accept the password when migrating (or tests and denies the password when logging in), leaving an apparently perfect completion but the user is unable to login. I surely hope I don't have any users with their passwords their usernames, but it would be nice to know everything will import.

    Additionally I'd really like to know how to make MySQL import properly and lastly what the deal was with the maximum mailboxes reached message...
     
  12. btrotter

    btrotter Guest

    0
     
    My current notes

    There are at least two real bugs in Plesk 10.3 on Ubuntu 10.04, so here are my current install notes

    Ensim 4 to Plesk 10.3 Migration guide for Ubuntu 10.04:

    step 1: install ubuntu 10.04 server with no roles checked

    step 2: install plesk

    step 3: fix AppArmor/selinux, which produces a bind startup error out of the gates

    vim /etc/apparmor.d/usr.sbin.named and add
    /var/named/run-root-** rw,
    to the end before the last }.
    /etc/init.d/apparmor restart
    /etc/init.d/bind9 start

    step 4: fix chpasswd braindeadness that doesn't account for changed chpasswd with no -e parameter

    mv /usr/sbin/chpasswd /usr/sbin/chpasswd.orig

    cat > /usr/sbin/chpasswd << EOF
    ARGS=

    for A in \$*; do
    if [ \$A != "-e" ]; then
    ARGS="\$ARGS \$A";
    fi
    done

    /usr/sbin/chpasswd.orig \$ARGS

    EOF

    chmod a+rx,u+w /usr/sbin/chpasswd

    step 5: Sync migration agents

    step 6: Disable Database Migration

    cd to /opt/psa/PMM/agents/PPCPL
    edit Agent.pm in _getDatabases to comment out the 3 lines that are the loop that fills the return array with the database names on the source system
    this is approximately line 508 which looks like this when commented

    my $databasesNode = XmlNode->new('databases');
    #foreach my $dbName (@userDatabases) {
    # $databasesNode->addChild(_getDatabaseNode($dbAdminLogin, $dbAdminPassword, $dbName, $domainName));
    #}
     
  13. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
  14. btrotter

    btrotter Guest

    0
     
    My company is already using plesk products in production and is already paid for. We're just tossing the last of our ensim machines. Mainly I'm just doing my job- I've mentioned the migration services to the higher uppers, but until I hear otherwise from them, I'm doing this on my own. That said, there are geniune bugs that I've reported here your guys will run into, they really should look into fixing them.. Especially the ubuntu 10.04 chpasswd issue and the bind9 issue, those are kind of dumb ones.

    I'm also guessing for security reasons they won't want to hand out root.
     
    Last edited by a moderator: Jul 24, 2011
  15. btrotter

    btrotter Guest

    0
     
    Finally got to trying a real migration

    After doing my tests, come to find out all the real ensim accounts have users called "admin" for each domain/client. These generate errors during migration for each domain attempted to migrate. How in the heck do I deal with that?


    Error:

    Failed deployment of client admin



    Error:

    Execution of /opt/psa/admin/plib/api-cli/client.php --create admin -name admin -notify false -passwd '' -passwd_type encrypted -email support@foobar.com -guid be0b208b-5e40-46af-93e6-7e06675d1094 -vendor-guid 6ff18ba2-35c0-466e-abc4-45f771fd084f -owner admin failed with return code 1.
    Stderr is
    An error occurred while creating an account: A customer with the username "admin" already exists
     
Loading...