Format error in Systemd Exec files

Using virtualmin-lemp-stack, everytime you create a server a php-fcgi-wrapper process was created.

Now no process is being created, so the socket referenced by nginx configuration points to an inexistent unix:/var/php-nginx/SERVER_ID.sock/socket which results in 502 errors.

No error entries in the log and the GUI states that everything is A_OK:

Creating home directory ..
.. done

Creating Nginx virtual host ..
.. done

Starting PHP FastCGI server ..
.. done

Setting up log file rotation ..
.. done

Creating MySQL database foo ..
.. done

Saving server details ..
.. done

Applying Nginx configuration ..
.. done

Updating Webmin user ..
.. done

Creating initial website index page ..
.. done

Re-loading Webmin ..
.. done
Status: 
Active
Virtualmin version: 
6.14
Webmin version: 
1.973

Comments

fedevera's picture
Submitted by fedevera on Thu, 03/11/2021 - 16:35

Looking arround I came across this: https://www.virtualmin.com/comment/831037#comment-831037

As it turns out Virtualmin is creating the process in systemd instead of inid.d, which is awesome... but it's done the wrong way...

● php-fcgi-domain-com.service - Starts Nginx PHP FastCGI server for domain.com (Virtualmin)
   Loaded: error (Reason: Exec format error)
   Active: inactive (dead)

systemd requires all paths to be absolute, and there are two paths that aren't: - su - sleep

So as a workaround I prepended /bin/ to the commands and now... everything works! Still the Exec files are in the wrong format and this should be remedied.

fedevera's picture
Submitted by fedevera on Thu, 03/11/2021 - 16:37

Title: New server doesn't create php-fcgi process » Format error en Systemd Exec files
fedevera's picture
Submitted by fedevera on Thu, 03/11/2021 - 16:38

Title: Format error en Systemd Exec files » Format error in Systemd Exec files

This bug should be fixed in Webmin 1.973. Is the config still bad for new domains you create after upgrading Webmin?

fedevera's picture
Submitted by fedevera on Fri, 03/12/2021 - 07:02

Hi there!

I just upgraded.

It's still not working, There's a /bin/ missing in the ExecStop entry; specifically in the last ; sleep 1

After adding it, running systemctl daemon-reload the process could be started without any problems.

As a "footnote", there are a lot of these:

Use of uninitialized value $mode in string ne at /usr/share/webmin/virtualmin-nginx/virtual_feature.pl line 940.

In the upgrade log.

Regards

Ilia's picture
Submitted by Ilia on Fri, 03/12/2021 - 07:24

As it turns out Virtualmin is creating the process in systemd instead of inid.d, which is awesome... but it's done the wrong way. systemd requires all paths to be absolute, and there are two paths that aren't: - su - sleep

This has been fixed a while ago. However, I never made a new release, as there were few more bugs to fix, which I wanted Jamie to have a look at.

I assume, Jamie was busy, so nevermind, I will have a closer look then, and provide an update within few next days.

We can do a new Nginx plugin release now to fix this one

Ilia's picture
Submitted by Ilia on Sun, 03/14/2021 - 04:23

Yes, Jamie. Just yesterday, I have already included all of the patches needed, and tagged a new release for both Nginx and Nginx SSL Virtualmin modules. It should be out within 24h hours.