• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved configuration template messed up - websites unreachable

proton23

Basic Pleskian
Hi,

I installed pihole on my root server which was a bad idea. I removed it but now I'm struggling with some major problems. My websites are unreachable, but Plesk knows that it is because of a damaged configuration file. Reconfiguration of the file does not work, because it seems like somehow I managed to mess up my configuration template for websites.

/usr/local/psa/admin/logs/panel.log tells me this:
Code:
[2018-01-31 13:07:28] ERR [1] /opt/psa/admin/bin/httpdmng '--reconfigure-all' failed with message: Execution failed.
Command: httpdmng
Arguments: Array
(
    [0] => --reconfigure-domains
    [1] => gitlab.big.deal,big.deal,nextcloud.big.deal
)

Details: [2018-01-31 13:07:24] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '80' '--https-port' '443'] with exit code [255]
[2018-01-31 13:07:26] ERR [panel] Apache config (15174002310.79298200) generation failed: Template_Exception: Can not restart web server: httpd stop failed
0 /usr/sbin/apache2 processes are killed
httpd stop failed
0 /usr/sbin/apache2 processes are killed

file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0
Can not restart web server: httpd stop failed
0 /usr/sbin/apache2 processes are killed
httpd stop failed
0 /usr/sbin/apache2 processes are killed

How can I get a working template again?

Best regards
 
I did
Code:
sudo plesk bin skeleton --reset admin
Default virtual host file template was successfully installed.

Now the configuration files all seem to be valid but nevertheless the websites are unreachable.
I have absolutely no idea why my websites don't work. :(
Can anybody help?

Should I make a new thread?

Best regards
 
Seems like I was a little bit premature. After restarting apache the configuration files are not checked anymore.
But I'm not sure were to look for more information...

Best regards
 
I am not sure what you mean by "configuration files are not checked anymore"? How do you know? Did you run
# apachectl -t
# nginx -t
Are the services up?
# service httpd restart
# service nginx restart
 
I made screenshots as you can see below. Hopefully they make clear what I mean.

Suggested commands put out:
Code:
sudo apachectl -t
Syntax OK

Code:
sudo /etc/init.d/apache2 restart
[sudo] password for proton:
[ ok ] Restarting apache2 (via systemctl): apache2.service.

Is nginx necessary?
Because it seems to be not on my system.

Code:
sudo nginx -t
sudo: nginx: command not found

Best regards
 

Attachments

  • after_reconfiguration.png
    after_reconfiguration.png
    92 KB · Views: 7
  • after_restarting_apache.png
    after_restarting_apache.png
    101.3 KB · Views: 6
So Apache is restarting, and then, after restarting Apache, all the sudden the website configuration files become incorrect???
 
It seems so or I'm doing something wrong, but I don't know what that is.
I will try again and post the results.
 
I think I know what the case is. I have had opened two tabs, reconfigured in one and because it took so long I refreshed in the other one in the meantime. That was also them moment I made the screenshot where everything was okay.
If I do everything in one tab I always get:

Code:
Fehler: Die Webserver-Konfigurationen können nicht rekonfiguriert werden: Unable to execute httpdmng: Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => gitlab.big.deal,big.deal,nextcloud.big.deal
)

Details: [2018-02-01 14:45:29] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '80' '--https-port' '443'] with exit code [255]
[2018-02-01 14:45:30] ERR [panel] Apache config (15174925270.20570200) generation failed: Template_Exception: Can not restart web server: httpd stop failed
0 /usr/sbin/apache2 processes are killed
httpd stop failed
0 /usr/sbin/apache2 processes are killed

file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0
Can not restart web server: httpd stop failed
0 /usr/sbin/apache2 processes are killed
httpd stop failed
0 /usr/sbin/apache2 processes are killed

What can I do?

Best regards
 
If so, it was unintentional.

Code:
ls -la /usr/local/psa/admin/conf/templates
total 16
drwxr-xr-x 4 root root 4096 Dez 30 04:01 .
drwxr-xr-x 5 root root 4096 Feb  2 06:34 ..
drwxr-xr-x 6 root root 4096 Feb  2 06:26 default
drwxr-xr-x 3 root root 4096 Dez 30 04:01 pci_compliance

Does "plesk bin skeleton --reset JDoe" modify this file?

Best regards
 
I thought it should, but I have never tested it. So I don't really know. You can probably copy the "default" directory from a working installation, and I'd have an "original", but as the software is copyrighted I cannot share it as a .tar.gz archive here.

I am not sure, either, whether "# plesk repair installation" will reinstall the default files. I think, however, if the default files are in place and you run a reconfigure-all on the webserver configuration, things should work again. So the solution will probably be to restore the original /default content and run the reconfigure-all afterwards.

Another point we did not yet check is whether you have individual Apache or Nginx directives in the domains. Maybe these are false?
 
I finally found time to try it again.
You can see the result below.

I had a problem "some packages have unmet dependencies" and resolved it by following this thread Issue - Plesk Upgrade Failed: some packages have unmet dependencies
and adding
/etc/apt/sources.list.d/plesk_17.5.3_xenial.list (I just saw the missing trusty-part)
Could I have messed up my system by doing it wrong?

If I make a backup and reinstall the system, what are the chances I also backup this error?

Best regards

Code:
sudo plesk repair installation
[sudo] password for proton:

Reconfiguring the Plesk installation
 
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.
[...]
 Reconfiguring mail subsystem...
 Reconfiguring Apache web server...
Module mpm_prefork already disabled
Module mpm_worker already disabled
 Reconfiguring ProFTPD FTP server...
===> Configuring ProFTPD server
 Reconfiguring AWStats web statistics...
-i used with no filenames on the command line, reading from STDIN.
 Reconfiguring WatchDog...
 Restoring SELinux contexts...
[...]
Executing /lib/systemd/systemd-sysv-install enable psa
 Reconfiguring SSL ciphers and protocols...
 Regenerating web servers' configuration files...
Warning: web server configuration is broken. We will try to repair it. This operation can take a lot of time, please do not interrupt the process.

**** Product repair started.

===> Checking for previous installation ... found.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

 Trying to start service mysql... /usr/sbin/mysqld (pid 24661) is running...
done
 Trying to establish test connection... connected
done
 Trying to find psa database... version is 017005003
 Trying to backup MySQL database... done
 MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.17.5.3-17.5.3.20180208-141337.dump.gz
 Finishing up upgrade procedures and rerunning previously failed upgrade actions...
 Checking for the group 'lock-manager'...
 Trying to add supplementary group 'lock-manager' for user 'psaadm'...  already there
===> Cumulative APS controller database (apsc) upgrade and repair has been started.
Upgrade or repair for 'apsc' (stage 'prep') is not required
 Trying to backup MySQL database... done
 MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.apsc.17.5.3-17.5.3.20180208-141347.dump.gz
===> Cumulative upgrade and repair of APS controller database has been completed.
Connection to APSC DB is possible
===> Cumulative APS controller upgrade and repair (final stage) has been started.
Upgrade or repair for 'apsc' (stage 'post') is not required
===> Cumulative upgrade and repair of APS controller (final stage) has been completed.
 Trying to reset database user password for 'pma_x4gBqsDATMHF@'... done
===> Cumulative Plesk database upgrade and repair (revertable stage) has been started.
Upgrade or repair for 'core' (stage 'prep') is not required
===> Preparing Plesk database upgrade (revertable stage).
 Trying to resolve hostname 'essen127.startdedicated.de' and validate its IP address... done

 Trying to set psa database version to 017005003... done
===> Cumulative upgrade and repair of Plesk database (revertable stage) has been completed.
===> Plesk database scheme upgrade has been started.
===> Plesk database scheme upgrade has been completed.
done
===> Cumulative Plesk upgrade and repair (final stage) has been started.
Upgrade or repair for 'core' (stage 'post') is not required
===> Preparing Plesk upgrade (final stage).
===> Cumulative upgrade and repair of Plesk (final stage) has been completed.
 Trying to upgrade and repair SpamAssassin service configuration... Upgrade or repair for 'spamassassin' (stage 'files') is not required
done
 Trying to upgrade and repair Roundcube webmail configuration... Upgrade or repair for 'roundcube' (stage 'files') is not required
done
Upgrade of Roundcube Web Based mail client configs and DB is not required - no previous version
 Trying to upgrade and repair Parallels Premium antivirus (DrWeb) service configuration (bootstrapper-prep stage)... Upgrade or repair for 'drweb' (stage 'bootstrapper-prep') is not required
done
 Trying to upgrade and repair Parallels Premium antivirus (DrWeb) service configuration (bootstrapper-post stage)... Upgrade or repair for 'drweb' (stage 'bootstrapper-post') is not required
done
 Reconfiguring mail subsystem...
 Trying to execute mail_restore to synchronize mail server settings and Plesk Database... ==> Checking for: mailsrv_conf_init... ok
==> Checking for: mail_handlers_init... ok
==> Checking for: mailsrv_entities_dump... ok
==> Checking for: mail_admin_aliases... ok
==> Checking for: mail_auth_dump... ok
==> Checking for: mailman_lists_dump... ok
==> Checking for: mail_kav8_restore... ok
==> Checking for: mail_responder_restore... ok
==> Checking for: mail_imap_restore... ok
==> Checking for: mail_spam_restore... ok
==> Checking for: mail_grey_restore... ok
==> Checking for: mail_mailbox_restore... ok
==> Checking for: mail_spf_restore... ok
==> Checking for: mail_dk_restore... ok
==> Checking for: mail_dmarc_restore... ok
==> Checking for: mail_drweb_restore... ok
==> Checking for: mail_outgoing_restore... fail
==> Checking for: mail_transport_restore... ok
Errors occured in mail restore procedure
Some utilities have exited with errors:
  /usr/lib/plesk-9.0/remote_mail_restore/mail_outgoing_restore
 Reconfiguring Apache web server...
 Reconfiguring ProFTPD FTP server...
 Reconfiguring AWStats web statistics...
 Reconfiguring WatchDog...
 Restoring SELinux contexts...
 Trying to register service sw-cp-server... done
 Trying to register service sw-engine... done
 Trying to register service dovecot... done
 Trying to register service kavehost... done
 Trying to register service drwebd... done
 Trying to register service spamassassin... done
 Trying to register service pc-remote... done
 Trying to register service psa... done
 Reconfiguring SSL ciphers and protocols...
 Trying to configure SSL ciphers and protocols for: ... done
 Regenerating web servers' configuration files...
Execution failed.
Command: httpdmng
Arguments: Array
(
    [0] => --reconfigure-domains
    [1] => nobigdeal.de,big.deal,nextcloud.big.deal,gitlab.big.deal
)

Details: [2018-02-08 14:21:49] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '80' '--https-port' '443'] with exit code [255]
[2018-02-08 14:21:52] ERR [panel] Apache config (15180958910.15336200) generation failed: Template_Exception: Can not restart web server: httpd stop failed
0 /usr/sbin/apache2 processes are killed
httpd stop failed
0 /usr/sbin/apache2 processes are killed

file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0
Can not restart web server: httpd stop failed
0 /usr/sbin/apache2 processes are killed
httpd stop failed
0 /usr/sbin/apache2 processes are killed


Warning: web server configuration is broken. We will try to repair it. This operation can take a lot of time, please do not interrupt the process.
Unable to rebuild web server configuration, possible there are broken domains
 Trying to reconfigure web-server configurations skipping broken domains... Execution failed.
Command: httpdmng
Arguments: Array
(
    [0] => --reconfigure-domains
    [1] => gitlab.big.deal
    [2] => -skip-broken
)

Details: [2018-02-08 14:25:37] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '80' '--https-port' '443'] with exit code [255]
[2018-02-08 14:25:38] ERR [panel] Apache config (15180961200.33628200) generation failed: Template_Exception: Can not restart web server: httpd stop failed
0 /usr/sbin/apache2 processes are killed
httpd stop failed
0 /usr/sbin/apache2 processes are killed

file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0
[2018-02-08 14:29:15] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '80' '--https-port' '443'] with exit code [255]
Can not restart web server: httpd stop failed
0 /usr/sbin/apache2 processes are killed
httpd stop failed
0 /usr/sbin/apache2 processes are killed



WARNING!
Some problems are found during reconfigure web-server configurations skipping broken domains(see log file: /var/log/plesk/install/plesk_17.5.3_repair.log)

Continue...

 Cleaning active Panel sessions...

Bootstrapper repair finished.
Errors occurred while performing the following actions: restore mail, regenerate web servers configuration files.
Check '/var/log/plesk/install/plesk_17.5.3_repair.log' and '/var/log/plesk/install/plesk_17.5.3_repair_problems.log' for details.
If you can't resolve the issue on your own, please address Parallels support.

exit status 1
 
Backup did not have the error but the mailbox seemed to be corrupted so I lost all my e-mails from the past 7 years.
But now everythings works again.
 
Back
Top