Error installing nethserver-httpd-virtualhosts

NethServer Version: 7.7
Module: Cockpit software center

I’m running a clean installation of Neth 7.7 on a test VM, with all updates installed. When I log into the Cockpit server manager and go to the software center and try to install MySQL and Web Hosting, I get this error:
image
Though it remains an epic fail that you can’t simply show the error in the web GUI, I clicked the Copy button and ran the command:

[root@neth-test ~]#  echo '{"action":"install","packages":["@nethserver-mysql","@nethserver-web"]}' | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/system-packages/update | jq
{
  "state": "running",
  "steps": -1,
  "event": "Initialization"
}
{
  "state": "running",
  "steps": -1,
  "event": "Resolving RPM dependencies"
}
{
  "state": "running",
  "steps": -1,
  "event": "Downloading Packages"
}
{
  "state": "running",
  "steps": -1,
  "event": "Running Test Transaction"
}
{
  "state": "running",
  "steps": -1,
  "event": "Running Transaction"
}
{
  "status": "success",
  "steps": -1,
  "event": "Transaction end"
}
{
  "state": "success"
}
[root@neth-test ~]# 

I don’t see an error there–what’s going on?
The last few lines from /var/log/messages:

Apr  3 10:25:56 neth-test systemd: Reloading.
Apr  3 10:25:57 neth-test FireQOS[9703]: Cleared all QOS on all interfaces
Apr  3 10:25:57 neth-test FireQOS[9762]: QoS applied ok (0 tc commands applied)
Apr  3 10:25:57 neth-test root: Shorewall reloaded
Apr  3 10:25:57 neth-test esmith::event[8387]: [NOTICE] Shorewall restart
Apr  3 10:25:57 neth-test esmith::event[8387]: Action: /etc/e-smith/events/nethserver-firewall-base-save/S89nethserver-shorewall-restart SUCCESS [1.216433]
Apr  3 10:25:57 neth-test systemd: Reloading.
Apr  3 10:25:57 neth-test esmith::event[8387]: [INFO] service lsm is disabled: skipped
Apr  3 10:25:57 neth-test esmith::event[8387]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.218587]
Apr  3 10:25:57 neth-test esmith::event[8387]: Event: nethserver-firewall-base-save SUCCESS
Apr  3 10:25:57 neth-test esmith::event[8355]: Action: /etc/e-smith/events/firewall-adjust/S20firewall-adjust SUCCESS [2.037261]
Apr  3 10:25:57 neth-test esmith::event[8355]: Event: firewall-adjust SUCCESS
Apr  3 10:26:27 neth-test pkgaction[13104]: remove:
Apr  3 10:26:27 neth-test pkgaction[13104]: update:
Apr  3 10:26:27 neth-test pkgaction[13104]: install: @nethserver-mysql, @nethserver-web
[root@neth-test ~]# 

Did you fully updated the server before install the module?

Yes, I re-ran yum upgrade immediately prior.

Sorry for doubting…:slight_smile:

@danb35

Hi
Does the old Dashboard work?

(ie is it a cockpit problem?)

My 2 cents
Andy

The old server manager gives an even more useless error:


And no, there are no metadata caching issues; I ran yum clean all before I tried the installation.

Edit: It appears in both cases that the packages are actually installed, just that the server manager is giving spurious errors.

1 Like

Does a yum update or yum check-update give some error/warning (like failed mirrors)?

[root@neth-test ~]# yum update
Loaded plugins: changelog, fastestmirror, nethserver_events
Loading mirror speeds from cached hostfile
 * ce-base: linux.cc.lehigh.edu
 * ce-extras: linux.cc.lehigh.edu
 * ce-sclo-rh: linux.cc.lehigh.edu
 * ce-sclo-sclo: linux.cc.lehigh.edu
 * ce-updates: linux.cc.lehigh.edu
 * epel: mirror.atl.genesisadaptive.com
 * nethforge: mirror.nethserver.org
 * nethserver-base: mirror.nethserver.org
 * nethserver-updates: mirror.nethserver.org
No packages marked for update
[root@neth-test ~]# 

There was a problem with upstream SCLO repository which suddenly removed some PHP 7.1 packages.
I fixed our repo as soon as possible, but the metadata and packages are still being synchronizing to mirrors.

I think the issue could be relates to this, but I’m not sure.
Eventually, you could post the output of:

yum install @nethserver-mysql @nethserver-web
[root@neth-test ~]# yum install @nethserver-mysql @nethserver-web
Loaded plugins: changelog, fastestmirror, nethserver_events
Loading mirror speeds from cached hostfile
 * ce-base: linux.cc.lehigh.edu
 * ce-extras: linux.cc.lehigh.edu
 * ce-sclo-rh: linux.cc.lehigh.edu
 * ce-sclo-sclo: linux.cc.lehigh.edu
 * ce-updates: linux.cc.lehigh.edu
 * epel: mirror.atl.genesisadaptive.com
 * nethforge: mirror.nethserver.org
 * nethserver-base: mirror.nethserver.org
 * nethserver-updates: mirror.nethserver.org
Warning: Group nethserver-mysql does not have any packages to install.
Warning: Group nethserver-web does not have any packages to install.
Nothing to do
[root@neth-test ~]# 

So it seems not related, maybe you could find more info inside the /var/log/messages to see what was broken.

I’d looked, but apparently hadn’t gone back far enough. This looks relevant:

Apr  3 10:54:24 neth-test esmith::event[3258]: expanding /etc/httpd/conf.d/virtualhosts.conf
Apr  3 10:54:24 neth-test esmith::event[3258]: expanding /etc/opt/rh/rh-php71/php-fpm.d/000-virtualhost.conf
Apr  3 10:54:24 neth-test esmith::event[3258]: expanding /etc/opt/rh/rh-php72/php-fpm.d/000-virtualhost.conf
Apr  3 10:54:24 neth-test esmith::event[3258]: expanding /etc/opt/rh/rh-php73/php-fpm.d/000-virtualhost.conf
Apr  3 10:54:24 neth-test esmith::event[3258]: ERROR: Cannot create output file //etc/opt/rh/rh-php73/php-fpm.d/000-virtualhost.conf.3260 No such file or directory
Apr  3 10:54:24 neth-test esmith::event[3258]: at /etc/e-smith/events/actions/generic_template_expand line 64.
Apr  3 10:54:24 neth-test esmith::event[3258]: [WARNING] expansion of /etc/opt/rh/rh-php73/php-fpm.d/000-virtualhost.conf failed
Apr  3 10:54:24 neth-test esmith::event[3258]: Action: /etc/e-smith/events/actions/generic_template_expand FAILED: 1 [0.152214]
Apr  3 10:54:24 neth-test systemd: Reloading.
Apr  3 10:54:24 neth-test esmith::event[3258]: [INFO] service httpd reload
Apr  3 10:54:24 neth-test systemd: Reloading The Apache HTTP Server.

I’m not sure why it’s trying to create files for rh-php[71-73] when none of those are installed, though…

I think it’s a small bug in nethserver-httpd.

The directory for /etc/opt/rh/rh-php73/php-fpm.d/ is not created and therefore the expand fails.
I guess if you create the dir manually you won’t get the error anymore.

1 Like

Time for switch to “bug” section?

2 Likes

Confirmed. With directory /etc/opt/rh/rh-php73/php-fpm.d/ created before install it works…

Apr  3 18:39:53 testserver esmith::event[7311]: expanding /etc/opt/rh/rh-php71/php-fpm.d/000-virtualhost.conf
Apr  3 18:39:53 testserver esmith::event[7311]: expanding /etc/opt/rh/rh-php72/php-fpm.d/000-virtualhost.conf
Apr  3 18:39:53 testserver esmith::event[7311]: expanding /etc/opt/rh/rh-php73/php-fpm.d/000-virtualhost.conf
Apr  3 18:39:53 testserver esmith::event[7311]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.133013]

I am going to open an issue/PR…

EDIT:

3 Likes

I do not understand it is created by the rh-php73 rpm it self not by us :-?

which rpm did you installed

nethserver-httpd
or nethserver-httpd-virtualhosts

Whichever one is installed through the software center when you select “web hosting.”

1 Like

got it … lesson of life, from time to time, left the CLI :expressionless:

1 Like

if you would like to valid it, we can release soon

1 Like

released, thank mates

2 Likes