• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved ERROR while trying to check the hostname

VojkanC

Basic Pleskian
I had this on two of my servers:


"
Execution failed.
Command: autoinstaller
Arguments: Array
(
[0] => --select-product-id
[1] => plesk
[2] => --select-release-current
[3] => --upgrade-installed-components
)

Details: Downloading file products.inf3: 0%
Downloading file products.inf3: 100% was finished.
Downloading file plesk.inf3: 0%
Downloading file plesk.inf3: 100% was finished.
Downloading file ppsmbe.inf3: 0%
Downloading file ppsmbe.inf3: 100% was finished.
Downloading file sitebuilder.inf3: 0%
Downloading file sitebuilder.inf3: 100% was finished.
Downloading file sso.inf3: 0%
Downloading file sso.inf3: 100% was finished.
Downloading file setemplates.inf3: 0%
Downloading file setemplates.inf3: 100% was finished.
Downloading file pp-sitebuilder.inf3: 0%
Downloading file pp-sitebuilder.inf3: 100% was finished.
Downloading file billing.inf3: 0%
Downloading file billing.inf3: 100% was finished.
Downloading file mysql.inf3: 0%
Downloading file mysql.inf3: 100% was finished.
Downloading file apache.inf3: 0%
Downloading file apache.inf3: 100% was finished.
Downloading file nginx.inf3: 0%
Downloading file nginx.inf3: 100% was finished.
Downloading file php73.inf3: 0%
Downloading file php73.inf3: 100% was finished.
Downloading file php72.inf3: 0%
Downloading file php72.inf3: 100% was finished.
Downloading file php71.inf3: 0%
Downloading file php71.inf3: 100% was finished.
Downloading file php70.inf3: 0%
Downloading file php70.inf3: 100% was finished.
Downloading file php56.inf3: 0%
Downloading file php56.inf3: 100% was finished.
Downloading file php55.inf3: 0%
Downloading file php55.inf3: 100% was finished.
Downloading file php54.inf3: 0%
Downloading file php54.inf3: 100% was finished.
Downloading file php53.inf3: 0%
Downloading file php53.inf3: 100% was finished.
Downloading file php52.inf3: 0%
Downloading file php52.inf3: 100% was finished.
Downloading file pmm.inf3: 0%
Downloading file pmm.inf3: 100% was finished.
Checking for installed packages...
Downloading file PSA_17.8.11/plesk-17.8.11-cos7-x86_64.inf3: 0%
Downloading file PSA_17.8.11/plesk-17.8.11-cos7-x86_64.inf3: 100% was finished.
Downloading Extensions Catalog feed...
Downloading file PSA_17.8.11/plesk-patches-17.8.11-cos7-x86_64.inf3: 0%
Downloading file PSA_17.8.11/plesk-patches-17.8.11-cos7-x86_64.inf3: 100% was finished.
Downloading file PHP52_17/php52-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP52_17/php52-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP53_17/php53-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP53_17/php53-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP54_17/php54-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP54_17/php54-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP55_17/php55-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP55_17/php55-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP56_17/php56-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP56_17/php56-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP70_17/php70-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP70_17/php70-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP71_17/php71-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP71_17/php71-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP72_17/php72-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP72_17/php72-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP73_17/php73-cos7-x86_64.inf3: 0%
Downloading file PHP73_17/php73-cos7-x86_64.inf3: 100% was finished.
Downloading file SITEBUILDER_17.8.12/sitebuilder-17.8.12-rhall-all.inf3: 0%
Downloading file SITEBUILDER_17.8.12/sitebuilder-17.8.12-rhall-all.inf3: 100% was finished.
gpg-pubkey-f4a80eb5-53a7ff4b gpg(CentOS-7 Key (CentOS 7 Official Signing Key) <[email protected]>)
gpg-pubkey-352c64e5-52ae6884 gpg(Fedora EPEL (7) <[email protected]>)
gpg-pubkey-621e9f35-58adea78 gpg(Docker Release (CE rpm) <[email protected]>)
gpg-pubkey-914bdf7e-55c05220 gpg(Plesk Team <[email protected]>)
Loaded plugins: fastestmirror


Detecting installed product components.
gpg-pubkey-f4a80eb5-53a7ff4b gpg(CentOS-7 Key (CentOS 7 Official Signing Key) <[email protected]>)
gpg-pubkey-352c64e5-52ae6884 gpg(Fedora EPEL (7) <[email protected]>)
gpg-pubkey-621e9f35-58adea78 gpg(Docker Release (CE rpm) <[email protected]>)
gpg-pubkey-914bdf7e-55c05220 gpg(Plesk Team <[email protected]>)
Retrieving information about the installed license key...
Launching component and product checkers...
Downloading file PSA_17.8.11/examiners/disk_space_check.sh: 0%
Downloading file PSA_17.8.11/examiners/disk_space_check.sh: 100% was finished.
Downloading file PSA_17.8.11/examiners/panel_preupgrade_checker.php: 0%
Downloading file PSA_17.8.11/examiners/panel_preupgrade_checker.php: 100% was finished.
Downloading file PSA_17.8.11/examiners/php_launcher.sh: 0%
Downloading file PSA_17.8.11/examiners/php_launcher.sh: 100% was finished.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

epel/x86_64/metalink | 3.5 kB 00:00
* base: centos.mirror.ausnetservers.net.au
* epel: mirror.optus.net
* extras: centos.mirror.ausnetservers.net.au
* updates: mirror.optus.net

PHP_5_6-thirdparty | 2.9 kB 00:00

PHP_7_0-thirdparty | 2.9 kB 00:00

PHP_7_1-thirdparty | 2.9 kB 00:00

PHP_7_2-thirdparty | 2.9 kB 00:00

PHP_7_3-thirdparty | 2.9 kB 00:00

PLESK_17_8_11-dist | 2.9 kB 00:00

PLESK_17_8_11-extras | 2.9 kB 00:00

PLESK_17_8_11-thirdparty | 2.9 kB 00:00

PLESK_17_PHP56 | 2.9 kB 00:00

PLESK_17_PHP70 | 2.9 kB 00:00

PLESK_17_PHP71 | 2.9 kB 00:00

PLESK_17_PHP72 | 2.9 kB 00:00

PLESK_17_PHP73 | 2.9 kB 00:00

base | 3.6 kB 00:00

extras | 3.4 kB 00:00

plesk-migrator | 2.9 kB 00:00

plesk-migrator-tp | 2.9 kB 00:00

updates | 3.4 kB 00:00
+ plesk-repair-kit
+ psa-locale-base-en-US
+ psa-mail-driver-common

Installing packages
chsh: Warning: "/sbin/nologin" is not listed in /etc/shells.
chsh: Shell not changed.
Changing shell for popuser.
chsh: Warning: "/sbin/nologin" is not listed in /etc/shells.
chsh: Shell not changed.
Changing shell for mhandlers-user.

**** Product prep-install started.

===> Checking for previous installation ... found.
Create user 'psaadm' and group 'psaadm'
Checking for the group 'psaadm'...
Group 'psaadm' already exists

Checking for the user 'psaadm'...
User 'psaadm' already exists

Create group swkey-data
Checking for the group 'swkey-data'...
Group 'swkey-data' already exists

Checking for the group 'swkey-data'...
Trying to add supplementary group 'swkey-data' for user 'psaadm'... already there
Create Mail accounts
Checking for the group 'popuser'...
Group 'popuser' already exists

Checking for the user 'popuser'...
User 'popuser' already exists

Checking for the user 'mhandlers-user'...
User 'mhandlers-user' already exists

Trying to got legacy variables... done
Trying to save legacy variables... done
Trying to resolve hostname 'hosting.mydomain.com' and validate its IP address...
Can not bind a socket to address hosting.mydomain.com:715 - Cannot assign requested address
Please, check your network configuration

ERROR while trying to check the hostname
Check the error reason(see log file: /var/log/plesk/install/plesk_17.8.11_installation.log), fix and try again

***** problem report *****
ERROR while trying to check the hostname
Check the error reason(see log file: /var/log/plesk/install/plesk_17.8.11_installation.log), fix and try again

ERROR: An error occurred during performing of installation PREP actions (see log for details). Installation was rolled back.
Warning! Not all packages were installed.
Please check if your system services are operable.
Please resolve this issue and try to install the packages again.
If you cannot resolve the issue on your own, contact product technical support for assistance.
"

This didn't help:
Plesk upgrade or update fails: ERROR while trying to check the hostname
 
Last edited:
Hi VojkanC,

All cases like this I saw before were because of wrong hostname configuration. Would be great to see results of checking by commands from the KB.
 
The problem might be that I am using AWS LightSail and that default IP is a local IP which is being routed to the public IP.

When I enter command "hostname" in CentOS I get:
hosting.mydomain.com

When I enter command "nslookup hosting.mydomain.com" in CentOS I get:
"Server: 172.26.0.2
Address: 172.26.0.2#53

Non-authoritative answer:
Name: hosting.mydomain.com
Address: 13.238.xxx.xxx"

Content of "/etc/hosts" is:
127.0.0.1 localhost.localdomain localhost localhost4 localhost4.localdomain4
::1 localhost.localdomain localhost localhost6 localhost6.localdomain6
13.238.xxx.xxx hosting.mydomains.com hosting
172.26.6.235 hosting.myenginelab.com hosting

Content of "/etc/sysconfig/network" is:
"
NETWORKING=yes
NOZEROCONF=yes

HOSTNAME="hosting.mydomain.com"
"
 
I have tried to reproduce some steps from the beginning:

  • I deployed a new CentOS instance with 1vCPU / 1GB.
  • I created an A-record on external DNS ("centos-test.yamshanov.ru" for 54.226.204.253)
  • I pre-configured a hostname:
Code:
[root@ip-172-26-8-12 centos]# hostnamectl set-hostname centos-test.yamshanov.ru
[root@ip-172-26-8-12 centos]# hostname
centos-test.yamshanov.ru
[root@ip-172-26-8-12 centos]#
<disconnect and connect>
[root@centos-test centos]#
  • ...and I checked that everything is ok with DNS and with the hostname
Code:
[root@ip-172-26-8-12 centos]# yum install bind-utils[...]
[root@ip-172-26-8-12 centos]# nslookup centos-test.yamshanov.ru
Server:172.26.0.2
Address:172.26.0.2#53

Non-authoritative answer:
Name:centos-test.yamshanov.ru
Address: 54.226.204.253

[root@ip-172-26-8-12 centos]#


  • I checked what was written in "/etc/hosts" and "/etc/sysconfig/network" by default
Code:
[root@ip-172-26-8-12 centos]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

[root@ip-172-26-8-12 centos]# cat /etc/sysconfig/network
# Created by cloud-init on instance boot automatically, do not edit.
#
NETWORKING=yes

[root@ip-172-26-8-12 centos]#


  • I have tried to install Plesk
Code:
[root@ip-172-26-8-12 centos]# sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)
[...]
Installation is finished
 
                             Congratulations!
 
  The installation has been finished. Plesk is now running on your server.
[...]
[root@ip-172-26-8-12 centos]#
  • Everything is ok.

--

Looks like it does not depend on local IP and Public IP and need to investigate what is wrong with files "hosts" and "networks".

Could you please clarify why you need to update default /etc/hosts and /etc/sysconfig/network?
 
Thank you for taking the time to investigate this. I really appreciate it.

Could you please clarify why you need to update default /etc/hosts and /etc/sysconfig/network?
I don't need to update default /etc/hosts and /etc/sysconfig/network, I just want Plesk updates to work properly and not to display error "ERROR while trying to check the hostname".
Plesk's knowledge base instructed me to check these files, so I did.

I'll mention again that I am using Amazon AWS LightSail and that by default it has this combination of private and public IP.
I am copying again content of these files hoping you can tell what to change in order for my update to work without issues.

When I enter command "nslookup hosting.mydomain.com" in CentOS I get:
Code:
Server: 172.26.0.2
Address: 172.26.0.2#53

Non-authoritative answer:
Name: hosting.mydomain.com
Address: 13.238.xxx.xxx


Content of "/etc/hosts" is:
Code:
127.0.0.1 localhost.localdomain localhost localhost4 localhost4.localdomain4
::1 localhost.localdomain localhost localhost6 localhost6.localdomain6
13.238.xxx.xxx hosting.mydomains.com hosting
172.26.6.235 hosting.mydomains.com hosting

Content of "/etc/sysconfig/network" is:
Code:
NETWORKING=yes
NOZEROCONF=yes

HOSTNAME="hosting.mydomain.com"

Here is the copy of System Overview in Plesk's Home Dashboard Screenshot-2019-06-19T15:21:42.382Z.png:
Code:
Hostname hosting.mydomain.com
IP address 172.26.6.235 (13.238.xxx.xxx)
OS ‪CentOS Linux 7.6.1810 (Core)‬
Product Plesk Onyx
Version 17.8.11 Update #51, last updated on April 23, 2019 01:29 AM
 
Last edited:
I don't need to update default /etc/hosts and /etc/sysconfig/network, I just want Plesk updates to work properly and not to display error "ERROR while trying to check the hostname".
Plesk's knowledge base instructed me to check these files, so I did.

I'll mention again that I am using Amazon AWS LightSail and that by default it has this combination of private and public IP.
Yes, I understood and all my tests I made with CentOS image from Lightsail Catalog inside the Lightsail instance. It means that someone changes default "/etc/hosts" and "/etc/sysconfig/network". That's why I asked why the files were updated, was there the important reason or not?


I have tried to understand what exactly string cause your issue. Looks like that one of two last line in /etc/hosts because they address to the same hostname and it causes a conflict.
13.238.xxx.xxx hosting.mydomains.com hosting
172.26.6.235 hosting.mydomains.com hosting
If you remove one line of them (or last two lines, because it is a default state of /etc/hosts), you will resolve the issue.
 
Last edited:
Thank you so much for your help.

I've tried:
Deleting "172.26.6.235 hosting.mydomain.com hosting" but it didn't work;
Deleting "both 13.238.xxx.xxx hosting.mydomain.com hosting" and "172.26.6.235 hosting.mydomain.com hosting" but it didn't work;
Deleting "13.238.xxx.xxx hosting.mydomain.com hosting" this worked.

Thank you so much AYamshanov .
 
Back
Top