store | blogs | forums | twitter | facebook | wiki | downloads | support portal
Atomic Secure Linux
It is currently Thu Aug 22, 2019 2:02 pm

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Warnings on attempt to migrate Plesk
Unread postPosted: Fri May 20, 2016 9:48 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
I currently am on an old plesk 11.5 box, and would like to migrate to a new system.

The precheck is throwing these errors :

The following Apache modules are not installed on the destination server: mem_cache, authnz_ldap, ldap, python, authn_default, disk_cache, perl, authz_default, authn_alias. Please install and enable these modules to prevent possible problems.

The following Apache modules are disabled on the destination server: speling, cgi, usertrack, php5, file_cache. Please enable these modules to prevent possible problems
.
The PHP handler 5.4.45 Apache module (id=module) is not available on the destination server. Instead, Plesk will use the following PHP handler: 5.4.45 FPM application served by Apache (id=fpm). To use the same PHP handler as on the source server, you should turn on or install it on the destination server.

The component mod_python is not installed on the destination server. mod_python will be unavailable for all restored objects.

The component mod_perl is not installed on the destination server. mod_perl will be unavailable for all restored objects.

From a quick googling it seems like mod python and mod perl have been done away with, is this correct?

How would you recommend I proceed?


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sat May 21, 2016 9:14 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
When looking up about enabling the grayed out PHP5 module , I came across something telling me I should not use it, but use FPM or FastCGI instead.

Is there a way to do that in a seamless fashion, or would it require the possible editing of client site hosted files?


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sat May 21, 2016 9:47 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
I had checked all of the mentioned existing required services that were needed, apart from cgi as I hadmissed it , and php5 as it was grayed out.

I went back to the modules section and attempted to enable cgi and php5.

it threw an error

I went back in to the same section , all of my modules are deselected.

I restarted HTTPD, no change

I restarted the server, no change.

I ran another pre-check.

It gave this error now :


The following Apache modules are disabled on the destination server: proxy_http, authn_dbm, speling, authz_dbm, auth_basic, rewrite, authz_owner, cgi, userdir, proxy_ftp, proxy_ajp, proxy, headers, status, include, usertrack, logio, authz_groupfile, php5, deflate, info, ext_filter, file_cache, version, suexec, perl, proxy_connect, vhost_alias, proxy_balancer, authn_anon, cache, expires. Please enable these modules to prevent possible problems.


I went through selecting all that I could, apart from PHP5-zts

I got this error :
Error: START httpd_modules_ctl --enable auth_basic,authn_anon,authn_dbm,authz_dbm,authz_groupfile,authz_owner,cache,cgi,deflate,expires,file_cache,headers,include,info,perl,proxy_ajp,proxy_balancer,proxy_ftp,proxy_http,speling,suexec,usertrack,version,vhost_alias --set-mpm mpm_event websrvmng: /usr/local/psa/admin/sbin/apache_control_adapter execution failed: websrvmng: /usr/local/psa/admin/sbin/apache_control_adapter execution failed:


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sat May 21, 2016 9:59 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
some digging gave me this :

May 21 09:54:44 p4710714.pubip.serverbeach.com httpd[19447]: httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 9 of /etc/httpd/conf.modules.d/10-php.conf: Can't locate API module structure `php5-zts_module' in file /usr/lib64/httpd/modules/libphp5-zts.so: /usr/lib64/httpd/modules/libphp5-zts.so: undefined symbol: php5-zts_module


there was a 10-php.conf rpmnew in the folder, I renamed the existing one as bad , renamed rpmnew to existing, service started.

When I looked at modules, the gray php5 was now gray but checked, the php-zts was now unchecked.

Doing another precheck, all was good in the "disabled section" apart from CGI .

I went back to the modules section, checked it again, applied it. went back, was deselected again. Ideas?


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sat May 21, 2016 10:40 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
So I'm at this point now :

The following Apache modules are not installed on the destination server: mem_cache, authnz_ldap, ldap, python, authn_default, disk_cache, authz_default, authn_alias. Please install and enable these modules to prevent possible problems.

The following Apache modules are disabled on the destination server: cgi. Please enable these modules to prevent possible problems.

The component mod_python is not installed on the destination server. mod_python will be unavailable for all restored objects.


I see I have a module named "cache_disk" has this replaced disk_cache?


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sat May 21, 2016 12:19 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 2321
Are you migrating to Plesk 12.5 on Centos 7 with Apache 2.4?

With Plesk installed, it will have enabled everything you need to run php securely(ish) and you do not need to manually enable anything else. However, it will also have left a bunch of apache modules enabled that you could technically disable to conserve resources and increase security, but that's a different topic, and one I've been meaning to open but never got round to, so lets leave that aside for now.

The pre-migration checker looks for apache modules that are enabled on the source and will warn you about them if they are not enabled or installed on the destination, on the assumption that you had deliberately enabled them and therefore probably want them. This may not be the case and indeed probably isn't the case when going from 2.2 to 2.4, especially if you didn't manually enable anything specifically on the old system. So I'd say ignore most of them and leave things be.

You may recall that there are two tick boxes in the settings for a subscription in 11.5/10.4.4: Perl support and Python support. These are what those mod_perl and mod_python modules are (and I think php5 in your case?). Unless you had customers who used them (Note: this is different to cgi support where you have perl scripts in /cgi-bin) then you don't need them or want them.

Moving on, for php, in 11.5 and 10.4.4 you had the option of "Apache Module" which equated to mod_php and is massively insecure but that's how all sites were in earlier versions of plesk and how you may still have some sites set up.

There was also the option of running php using FastCGI (recommended for security but resource hog) and as CGI (nobody used that).

With Plesk 12, you no longer have the option of "Apache Module" and with Apache 2.4 you have the option of php-fpm, which is secure and not as much of a resource hog and is the recommended way. You also have the option of FastCGI.

So, when migrating from a system where there were sites running php as "Apache Module", Plesk will set all those sites to the new default, which is in your case appears to be 5.4.4 using php-fpm.

This is a good thing, and should be painless. However, if any of your php scripts created new files on your old system they will be owned by apache.apache or apache.psacln and will need to be converted to [ftpusrrname].psacln MANUALLY once migrated. (you can also do it automatically using one of the check tools but I'm afraid I've forgotten which one it is. It can be told to go through all the files in your customer sites and fix ownership to the correct ones automatically).

What I would do in your case, therefore, is either restore your new system to a clean state, or disable everything you tried to disable to get back to the state that Plesk was "out of the box".

Then do a full migration, ignoring the module issues. It is unlikely there will be a problem, though I can't absolutely guarantee that.

Once migrated, you can try testing some migrated sites to make sure they work OK. You can use the site preview facility in Plesk for this, or simply set you hosts file on your Windows PC (or whatever) to have whichever domains you want to test point to the new server. There are other ways too, such as setting your DNS server settings to point to the new server (temporarily).

If you are able to, once you are happy everything is good, you can restore the new server again to the out of the box state, and then do the migration for real, in one way or another.

I hope this helps.

Keep in mind that I'm pretty new to Apache 2.4 and Plesk 12.5 though, and I'm still experimenting and testing myself. I have yet to do anything other than a few million test migrations (and all well so far!). So I may be incorrect in my assertions here.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Last edited by faris on Sat May 21, 2016 12:26 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sat May 21, 2016 12:22 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
Looking into why the cgi module wasn't starting. It seems like it is dependent on MPM Prefork .

Is there an easy way to tell if I really need this cgi module, MPM is currently set to event, which seems like the modern preference.

I'm also hoping someone will come along and read this eventually so this isn't just a ramble of my own :)

(hadn't seen faris' post at this time :) )


Last edited by jmackenz on Sat May 21, 2016 12:48 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sat May 21, 2016 12:45 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
Yes , Plesk 12.5 on CentOS 7

So all of the initial errors are fine to ignore, and It would be safest to reimage the new server and start fresh?


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sun May 22, 2016 5:58 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Aug 01, 2006 2:45 pm
Posts: 573
Location: Netherlands
faris wrote:
This is a good thing, and should be painless. However, if any of your php scripts created new files on your old system they will be owned by apache.apache or apache.psacln and will need to be converted to [ftpusrrname].psacln MANUALLY once migrated. (you can also do it automatically using one of the check tools but I'm afraid I've forgotten which one it is. It can be told to go through all the files in your customer sites and fix ownership to the correct ones automatically).


Here you go:

Code:
plesk repair fs -y -v
plesk bin repair --restore-vhosts-permissions -y -v


Also, do not forget to remove any mod_php directives from .htaccess or vhost.conf's (it is OKAY if they are already inside an IfModule-block), otherwise you will get HTTP 500's.

Code:
# List of .htaccess files with mod_php directives:
find /var/www/vhosts/ -type f -name .htaccess > /root/files_htaccess.txt
for htfile in $(cat /root/files_htaccess.txt); do grep -i -n -H '^\s*php_' ${htfile}; done

# List of vhost.conf/vhost_ssl.conf files with mod_php directives:
grep -rin '^\s*php_' /var/www/vhosts/system/*/conf/vhost*.conf

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sun May 22, 2016 6:28 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 2321
thanks for that addition. I had just posted some additional detail then pushed the wrong button and lost it all.

And yes, I'd reimage and try again.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Mon May 23, 2016 6:28 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
After the system was re-imaged, I just attempted to do a migration of one domain .

It threw these errors :

`- Subscription 'domain.com'
|
`- error: Failed to create subscription domain.com' in target panel
Migration for that subscription is considered completely failed. No further actions are performed for it.
Migration tools tried to perform operation in 2 attempts.
----------------------------------------------------------------------------
Attempt #1 failed with the following error:
Command execution failed on the local server with non-zero exit code.
command: /usr/local/psa/bin/subscription --create domain.com -hosting true -hst_type phys -login loginname -passwd '***hidden***' -ip xx.xx.xx.xx-mail-service-ip xx.xx.xx.xx -do-not-apply-skeleton -notify false -service_plan Unlimited -force
exit code: 1
stdout:
stderr: [2016-05-23 18:24:36] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/mailmng-core' '--add-domain' '--domain-name=domain.com' '--disk-quota=-1'] with exit code [1]
An error occurred during domain creation: mailmng-core failed: /usr/bin/killall execution failed:
qmail-send: no process found
mailmng[21789]: Reload of qmail-send failed, performing full restart
/etc/init.d/qmail execution failed:
fork_execv: execv("/etc/init.d/qmail") failed: No such file or directory



----------------------------------------------------------------------------
Attempt #2 failed with the following error:
Subscription already exists on target server: most probably it was created at the previous attempt,
but migration tools are not sure if it was created correctly.
It is recommended to:
1) Resolve the original issue that caused subscription creation to fail,
delete subscription, and then run migration again.
OR
2) Ensure that created subscription is fine, or the original issue is minor,
then simply run migration for that subscription again.


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Tue May 24, 2016 1:44 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 2321
That's a bit bonkers. Unless I'm missing something, it indicated qmail isn't installed or is broken.

Can you check email is working on the server? Try sending stats summary to yourself or something.


Also note the following from MU33, released yesterday:
[-] If domain forwarders were present on the Plesk source server, the migration was blocked. (PMT-2830)

(I did not encounter this, btw)

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Wed May 25, 2016 12:42 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 2321
Just adding to the mix----

I happened to do a new test migration today.

After migration, the Service Plans I had created on the source server were migrated to the target server, as expected.

On the source server, mod_perl support was enabled in both Service Plans. As a result, all subscriptions showed as Unsynched on the target server, as mod_perl was not enabled.

A message appears to tell you this.

To fix it, you need to go to the Service Plan section, Hosting Parameters, then untick (in your case mod_perl and mod_python if need be) then Synch at the bottom.

This will make every subscription that is no Locked sync with the new parameters.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sun Jun 05, 2016 3:13 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
Been very busy so just coming back to this now ,

I had the system reloaded and attempted again. same issue.

Quote:
qmail.service - Panel qmail MTA service
Loaded: loaded (/usr/lib/systemd/system/qmail.service; disabled; vendor preset: disabled)
Active: active (running) since Sun 2016-06-05 14:06:34 CDT; 51s ago
Main PID: 5017 (qmail-send)
CGroup: /system.slice/qmail.service
├─5017 qmail-send
├─5018 splogger qmail
├─5019 qmail-lspawn | /usr/bin/deliverquota ./Maildir
├─5020 qmail-rspawn
└─5021 qmail-clean


Quote:
error: Failed to create subscription 'something.com' in target panel
| Migration for that subscription is considered completely failed. No further actions are performed for it.
| Migration tools tried to perform operation in 2 attempts.
| ----------------------------------------------------------------------------
| Attempt #1 failed with the following error:
| Command execution failed on the local server with non-zero exit code.
| command: /usr/local/psa/bin/subscription --create something.com -hosting true -hst_type phys -login something -passwd '***hidden***' -ip something -mail-service-ip something -do-not-apply-skeleton -notify false -owner gremlin -service_plan 'Default Domain' -force
| exit code: 1
| stdout:
| stderr: [2016-06-05 14:02:22] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/mailmng-core' '--add-domain' '--domain-name=something.com' '--disk-quota=104857600'] with exit code [1]
| An error occurred during domain creation: mailmng-core failed: /usr/bin/killall execution failed:
| qmail-send: no process found
| mailmng[28867]: Reload of qmail-send failed, performing full restart
| /etc/init.d/qmail execution failed:
| fork_execv: execv("/etc/init.d/qmail") failed: No such file or directory



I can say that /etc/init.d/qmail does definitely not exist.


Top
 Profile  
Reply with quote  
 Post subject: Re: Warnings on attempt to migrate Plesk
Unread postPosted: Sun Jun 05, 2016 3:42 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jan 23, 2007 10:18 am
Posts: 116
Figured I'd try migrating and converting to postfix in one step, so far no errors....


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group