It’s been a few months since I’ve had to create a new virtual server, but the new one is completely unreachable after creation. I ensured I set up the A record in Cloudflare to match other existing websites on the server. If I ping the website, it goes to the correct IP address. (I’ve tried both proxy and non-proxy on Cloudflare to no avail.)
This is the first time I’ve created a new virtual server where the default website wouldn’t load immediately after creation and I’m not sure where it is losing the connection in Virtualmin. I’ve got 16 others going just fine and they are served as normal on the internet.
For the fun of it I deleted the virtual server (twice, since it didn’t delete the first time even though it shown it had) and then re-created it.
I did notice that it would hang for several seconds in the default setup during the creation of the three status monitors (for website, SSL website, SSL certificate) and then during the attempt to generate a Let’s Encrypt SSL certificate.
The Apache access, PHP, and error logs for the virtual server are empty even after several attempts to connect. The external connectivity check shows a gateway timeout with this message: “Verify that your DNS server is running, that software.virtualmin.com can be resolved, and that no firewall is blocking outgoing HTTP requests.”
Viewing the journal gives me this hint:
Dec 21 00:21:40 systemd[1]: Stopped target sub File Systems.
Dec 21 00:21:40 systemd[1]: Stopped Apache fcgiwrap server for sub.domain.com.
Dec 21 00:21:40 systemd[1]: fcgiwrap-sub-domain-com.service: Failed with result ‘exit-code’.
Dec 21 00:21:40 systemd[1]: fcgiwrap-sub-domain-com.service: Control process exited, code=exited, status=1/FAILURE
Dec 21 00:21:39 systemd[1]: Stopping Apache fcgiwrap server for sub.domain.com…
NOTE: This is just the default website. I plan on using it as a proxy, but need to get the default working first.
That’s strange, Virtualmin outputs what it is doing when a virtual server is deleted, so if you were not able to delete it in your first attempt then you would have been able to see from Virtualmin’s output exactly where the delete process was interrupted.
Digging in a bit deeper it appears that the fcgiwrap process is unavailable for the new domain. What would cause it to not be created?
Dec 31 13:12:41 systemd[1]: fcgiwrap-sub-domain-com.service: Failed with result 'exit-code'.
Dec 31 13:12:41 systemd[1]: fcgiwrap-sub-domain-com.service: Control process exited, code=exited, status=1/FAILURE
Dec 31 13:12:41 kill[386712]: kill: cannot find process "/var/fcgiwrap/1766348431144844.fcgiwrap.pid`"
Dec 31 13:12:41 kill[386712]: kill: cannot find process "`/bin/cat"
Dec 31 13:12:41 systemd[1]: Stopping Apache fcgiwrap server for sub.domain.com...
And the pid doesn’t match what is shown as running in /var/fcgiwrap/ for that particular sub-domain-com user.
Can you think of any other places I could look? I’m just not sure why it isn’t loading a new site at all but current ones have no issues. (Tried another subdomain with the same results.)
If other domains are loading and you have a timeout only for this new one, it means DNS is not pointing at the server.
A misconfigured virtual server will serve something (what it serves depends on a variety of things, but it’s going to be an error or the wrong site) it will not be a network timeout.
Oh, except a 50x gateway timeout error served by the web server. That would be a problem with something being proxied to (FPM or fcgi are both proxied). But, that’s not a network timeout for your browser, it’s an actual error page served by the server.