transfersite.php pull doesn't seem to have an effect

If/when I use the pull function in transfersite, it doesn’t seem to pull from the remote server.

If I enter a domain on the remote server and not the local one we get

WARNING: {closure}(): No sites found matching example.com’`

If we use --all, it starts to transfer the local sites to the remote server, doesn’t pull.

apnscp_php /usr/local/apnscp/bin/scripts/transfersite.php -p -s server1.example.ca -c dns,enabled=0 --all

Here are some helpful considerations when filing a bug:

  • What version of apnscp are you running?
    cpcmd misc_cp_version
revision: ca92487ad55c94763dc5ee86356589136e86246e
timestamp: 1762907856
ver_maj: 3
ver_min: 2
ver_patch: 48
ver_pre: ''
dirty: false
debug: false
  • Which version of RHEL or CentOS are you using?
    cat /etc/redhat-release
Rocky Linux release 8.10 (Green Obsidian)
  • Can you reproduce this bug reliably? Provide steps. If not, provide steps to the best of your recollection.

Yes.

  • Enable debug mode (cpcmd config_set apnscp.debug true). Restart backend by hand,
    cd /usr/local/apnscp/bin ; ./bin/apnscpd -f restart
    This will give more information including backtraces.

Attempting to push rather than pull, the “normal” way…

[root@server1 ~]# apnscp_php /usr/local/apnscp/bin/scripts/transfersite.php -s server1.apiscp.com -c dns,enabled=0 example.com
Cannot load the ionCube PHP Loader - it was built with configuration API420210902,NTS, whereas running engine is API420230831,NTS
Zend OPcache requires Zend Engine API version 420210902.
The Zend Engine API version 420230831 which is installed, is newer.
Contact Zend Technologies at http://www.zend.com/ for a later version of Zend OPcache.

ERROR  : CLI_Transfer::get_migration_stage(): DNS is not configured - cannot determine migration stage. Set manually with --stage=N
         0. Error_Reporter::add_error("DNS is not configured - cannot determine migration stage. Set manually with --stage=N", )
            [/usr/local/apnscp/lib/log_wrapper.php:72]
         1. error("DNS is not configured - cannot determine migration stage. Set manually with --stage=N")
            [/usr/local/apnscp/lib/CLI/Transfer.php:302]
         2. CLI_Transfer->get_migration_stage()
            [/usr/local/apnscp/bin/scripts/transfersite.php:232]
beginning migration: example.com (stage 0)
creating site on server1.apiscp.com
INFO   : Overrides detected - replacing values
INFO   : Overriding [dns] enabled => 0
  + unsetting ssh port index
WARN: /usr/local/sbin/AddDomain --'output'='json' --'fd'='10' -c 'aliases,aliases'='[]' -c 'aliases,enabled'='0' -c 'aliases,max'='None' -c 'aliases,version'='3.2' -c 'apache,enabled'='1' -c 'apache,jail'='1' -c 'apache,subnum'='None' -c 'apache,version'='3.2' -c 'apache,webserver'='www.example.com' -c 'apache,webuser'='apache' -c 'auth,cpasswd'='None' -c 'auth,enabled'='1' -c 'auth,iprestrict'='50' -c 'auth,passwd'='None' -c 'auth,tpasswd'='None' -c 'auth,version'='3.2' -c 'bandwidth,enabled'='1' -c 'bandwidth,threshold'='500' -c 'bandwidth,units'='GB' -c 'bandwidth,version'='3.2' -c 'billing,addons'='None' -c 'billing,ctime'='1677687439' -c 'billing,enabled'='1' -c 'billing,invoice'='apnscp-IJGCWBGJ' -c 'billing,parent_invoice'='None' -c 'billing,version'='3.2' -c 'cgroup,cpu'='2000' -c 'cgroup,cpupin'='None' -c 'cgroup,cpuweight'='100' -c 'cgroup,delegator'='None' -c 'cgroup,enabled'='1' -c 'cgroup,io'='4096' -c 'cgroup,ioweight'='100' -c 'cgroup,memory'='512' -c 'cgroup,proclimit'='100' -c 'cgroup,readbw'='100' -c 'cgroup,readiops'='None' -c 'cgroup,version'='3.2' -c 'cgroup,writebw'='100' -c 'cgroup,writeiops'='None' -c 'crontab,enabled'='1' -c 'crontab,permit'='1' -c 'crontab,version'='3.2' -c 'diskquota,amnesty'='None' -c 'diskquota,enabled'='1' -c 'diskquota,fquota'='None' -c 'diskquota,group'='None' -c 'diskquota,quota'='4000' -c 'diskquota,units'='MB' -c 'diskquota,version'='3.2' -c 'dns,enabled'='0' -c 'dns,key'='None' -c 'dns,provider'='null' -c 'dns,version'='3.2' -c 'files,enabled'='1' -c 'files,fsopt'='None' -c 'files,mounts'='[]' -c 'files,version'='3.2' -c 'ftp,enabled'='1' -c 'ftp,ftpserver'='ftp.example.com' -c 'ftp,version'='3.2' -c 'ipinfo,enabled'='1' -c 'ipinfo,ipaddrs'='[]' -c 'ipinfo,namebased'='1' -c 'ipinfo,version'='3.2' -c 'ipinfo6,enabled'='0' -c 'ipinfo6,ipaddrs'='[]' -c 'ipinfo6,namebased'='1' -c 'ipinfo6,version'='3.2' -c 'logrotate,enabled'='1' -c 'logrotate,version'='3.2' -c 'logs,enabled'='1' -c 'logs,version'='3.2' -c 'mail,catchallfwd'='None' -c 'mail,enabled'='0' -c 'mail,extfwd'='None' -c 'mail,key'='None' -c 'mail,mailserver'='None' -c 'mail,preference'='None' -c 'mail,provider'='null' -c 'mail,smtpserver'='None' -c 'mail,version'='3.2' -c 'mail,webmail'='[]' -c 'metrics,enabled'='1' -c 'metrics,version'='3.2' -c 'mlist,enabled'='0' -c 'mlist,max'='0' -c 'mlist,provider'='majordomo' -c 'mlist,version'='3.2' -c 'mysql,dbaseadmin'='djones' -c 'mysql,dbasenum'='None' -c 'mysql,dbaseprefix'='comp_' -c 'mysql,enabled'='1' -c 'mysql,passwd'='None' -c 'mysql,version'='3.2' -c 'pgsql,dbaseadmin'='None' -c 'pgsql,dbasenum'='None' -c 'pgsql,dbaseprefix'='None' -c 'pgsql,enabled'='0' -c 'pgsql,passwd'='None' -c 'pgsql,tablespace'='None' -c 'pgsql,version'='3.2' -c 'php,enabled'='1' -c 'php,maxpools'='1' -c 'php,user'='apache' -c 'php,version'='3.2' -c 'rampart,enabled'='1' -c 'rampart,max'='0' -c 'rampart,version'='3.2' -c 'rampart,whitelist'='[]' -c 'reseller,enabled'='1' -c 'reseller,id'='0' -c 'reseller,parent_id'='None' -c 'reseller,version'='3.2' -c 'shield,enabled'='1' -c 'shield,pagecount'='None' -c 'shield,pageinterval'='None' -c 'shield,sitecount'='None' -c 'shield,siteinterval'='None' -c 'shield,version'='3.2' -c 'siteinfo,admin'='admin3' -c 'siteinfo,admin_user'='djones' -c 'siteinfo,domain'='example.com' -c 'siteinfo,email'='admin@example.com' -c 'siteinfo,enabled'='1' -c 'siteinfo,notes'='[]' -c 'siteinfo,plan'='basic' -c 'siteinfo,version'='3.2' -c 'spamfilter,enabled'='1' -c 'spamfilter,provider'='spamassassin' -c 'spamfilter,version'='3.2' -c 'ssh,enabled'='1' -c 'ssh,jail'='1' -c 'ssh,version'='3.2' -c 'ssl,enabled'='1' -c 'ssl,version'='3.2' -c 'tomcat,enabled'='0' -c 'tomcat,permit'='0' -c 'tomcat,version'='3.2' -c 'users,enabled'='1' -c 'users,max'='500' -c 'users,version'='3.2' -c 'vacation,enabled'='0' -c 'vacation,version'='3.2': NON-ZERO RETURN: 255
output:
[{"message":"fatal(): service `php' unknown - disable strict interpretation or install service","severity":64,"caller":"Opcenter...
stderr:
FATAL  : fatal(): service `php' unknown - disable strict interpretation or install service
         0. Error_Reporter::trigger_f...
FATAL  : fatal(): service `php' unknown - disable strict interpretation or install service
         0. Error_Reporter::merge_buffer([[message:"fatal(): service `php' unknown - disable strict interpretation or install service", severity:64, caller:"Opcenter\SiteConfiguration::__construct", bt:"         0. Error_Reporter::trigger_fatal("service `php' unknown - disable strict interpretation or install service", ["php"])            [/usr/local/apnscp/lib/log_wrapper.php:50]         1. fatal("service `%s' unknown - disable strict interpretation or install service", "php")            [/usr/local/apnscp/lib/Opcenter/SiteConfiguration.php:184]         2. Opcenter\SiteConfiguration->__construct("site5", [[enabled:0, max:null, version:3.2], [[enabled:1, jail:1, subnum:null, version:3.2, ]]])            [/usr/local/apnscp/lib/Opcenter/Account/Create.php:179]         3. Opcenter\Account\Create->installServices("FILESYSTEM.created", Opcenter\Filesystem)            [/usr/local/apnscp/lib/Event/Cardinal.php:143]         4. Event\Contracts\Subscriber@anonymous/usr/local/apnscp/lib/Event/Cardinal.php:132$9e->update("FILESYSTEM.created", Opcenter\Filesystem)            [/usr/local/apnscp/lib/Event/Manager.php:187]         5. Event\Manager->fire("FILESYSTEM.created", Opcenter\Filesystem)            [/usr/local/apnscp/lib/Event/Cardinal.php:172]         6. Event\Cardinal::fire(["FILESYSTEM", "created"], Opcenter\Filesystem)            [/usr/local/apnscp/lib/Opcenter/Filesystem.php:79]         7. Opcenter\Filesystem->populate()            [/usr/local/apnscp/lib/Opcenter/Filesystem.php:47]         8. Opcenter\Filesystem::create("site5", null)            [/usr/local/apnscp/lib/Opcenter/Account/Create.php:154]         9. Opcenter\Account\Create->exec()            [/usr/local/apnscp/bin/AddDomain:36]"]])
            [/usr/local/apnscp/lib/CLI/Transfer.php:397]
         1. CLI_Transfer->_create_site()
            [/usr/local/apnscp/lib/CLI/Transfer.php:142]
         2. CLI_Transfer->process()
            [/usr/local/apnscp/bin/scripts/transfersite.php:233]
ERROR  : CLI_Transfer::_create_site(): unable to add site, aborting!
         0. Error_Reporter::add_error("unable to add site, aborting!", )
            [/usr/local/apnscp/lib/log_wrapper.php:72]
         1. error("unable to add site, aborting!")
            [/usr/local/apnscp/lib/CLI/Transfer.php:403]
         2. CLI_Transfer->_create_site()
            [/usr/local/apnscp/lib/CLI/Transfer.php:142]
         3. CLI_Transfer->process()
            [/usr/local/apnscp/bin/scripts/transfersite.php:233]
CLI_Transfer::get_migration_stage(): DNS is not configured - cannot determine migration stage. Set manually with --stage=N
Overrides detected - replacing values
Overriding [dns] enabled => 0
fatal(): service `php' unknown - disable strict interpretation or install service
CLI_Transfer::_create_site(): unable to add site, aborting!
INFO: Overrides detected - replacing values
INFO: Overriding [dns] enabled => 0
FATAL: fatal(): service `php' unknown - disable strict interpretation or install service
[root@server1 ~]#

pull has no effect on that release of the migration component.

php service is missing on the target server, which means it’s on 3.2.48 or older. php service is introduced in 3.2.49, to be released. Move the destination server to edge for compatibility with the old server.

That explains the errors. Thank you.

Well… Had to try… :wink: Some of us do read the help output. :smiley:

I’ve migrated the accounts manually because the questionable server seemed to be getting worse by the day.

Thank you again. Now… Where the did the ‘Mark post as solution’ button go…