Page 2 of 2

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 15:38
by Perryg
Pretty much only Linux users would know what LEMP or LAMP meant, but it is a valid acronym. LEMP (Linux, Nginx, MySQL, and PHP) has a smaller footprint by design but I don't understand what this would have to do with VirtualBox as it is OS specific code and not actually controlled by VirtualBox.

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 15:50
by pom
scottgus1 wrote:Have you tried shutting down the guest from within the guest's OS, using its built-in Shut Down feature?
I was exiting users and then "power off" but I get the same results with the ACPI shutdown.
I just tried "shutdown" in the OS and it did look like it was gracefully shutting down, waited 60 seconds before executing, but the directory was missing again on reboot.

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 15:56
by pom
Perryg wrote:...I don't understand what this would have to do with VirtualBox as it is OS specific code and not actually controlled by VirtualBox.
I'm not sure where the problem lies and that's why I'm asking. Like I said I've never experienced this with my live servers but again I've only ever rebooted them via console, not power cycled them. I would think as /run/ and /var/run/ are default locations for sockets this issue would be documented but there's practically nothing in google results for it.

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 16:00
by Perryg
I can pretty much say with certainty that this is not a VirtualBox issue. I asked in your other thread if you had talked to them and until you do and can show that this is actually an issue with VirtualBox I have nothing more to add to this discussion.

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 16:15
by Martin
Are these "installed to the virtual harddisk" guests or are you maybe just running lifeboot ISOs?

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 16:21
by pom
Yeah installed to virtual hard disc. I forget which option, I just chose the defaults.

The rest of my changes stick and my full websites are there but won't show because php-fpm can't run without the directory.

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 16:23
by socratis
pom wrote:Yeah installed to virtual hard disc
I haven't seen the slightest proof for that.
  1. Start the VM. Not from a saved or paused state. Clean start.
  2. Take the steps required to generate/observe the error.
  3. Shut down the VM (if it hasn't aborted by itself). Not saved or paused. Completely shut down. If you can't shut it down by normal means, close the VM window and select "Power off".
  4. Right-click on the VM in the VirtualBox Manager. Select "Show Log..."
  5. Save it (only the first VBox.log), ZIP it and attach it to your response (see the "Upload attachment" tab below the reply form).
I would also like to see the "recipe" of the VM, the ".vbox" file:
  1. Right-click on the VM in the VirtualBox Manager. Select "Show in Finder/Explorer/Whatever".
  2. ZIP the selected ".vbox" file and attach it to your response.

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 16:49
by pom
Ok, here's the log and .vbox...
log and vbox.zip
(22.62 KiB) Downloaded 14 times

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 17:06
by pom
Here's a couple of screenshots too if they're any help.

Making the /run/php/ directory, setting permissions, enabling php-fpm to run at start, and shutdown from the OS.
VirtualBox_old crumplclobber_09_08_2017_15_58_21.png
VirtualBox_old crumplclobber_09_08_2017_15_58_21.png (10.63 KiB) Viewed 2715 times
Rebooted, checked the status of php-fpm and for the /run/php/ directory...
VirtualBox_old crumplclobber_09_08_2017_16_04_18.png
VirtualBox_old crumplclobber_09_08_2017_16_04_18.png (14.64 KiB) Viewed 2715 times

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 17:19
by Perryg
https://serverfault.com/questions/61546 ... ntu-server
/var/run is a temporary mounted filesystem, that is re-created after each reboot, so changes are not persisted in it. So in order to have a custom directory for socket files you will have to create it every time. The best place to add such functionality is an upstart config for PHP FPM....
/run is pretty much the same thing. Like I said it is package/OS specific and not an issue with VirtualBox.

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 18:04
by pom
Yeah I found that thread and another.

Their solutions are to create a global pid but it is already explicitly set in my case, I've double checked the conf file to make sure. "enable" in centos initialises the process to start at boot which I have done too.
You might very well be right that it is OS specific but the issue has only been brought to my attention by using virtualbox and I'm only asking here in case any others have had similar experience.
If it is OS specific I might never have know until a power outage or similar on my remote servers as they have the exact same setup as my guests.

Re: Miss OS file directories after reboot of OS

Posted: 9. Aug 2017, 18:44
by socratis
pom wrote:If it is OS specific I might never have know until a power outage or similar on my remote servers as they have the exact same setup as my guests.
I would hurry then and fix the real servers, to prevent a power outage wiping the real deal. But, as Perryg found out, this is definitely *not* a VirtualBox problem. I'll mark the thread as [WorksForMe].

Re: [WorksForMe] Miss OS file directories after reboot of OS

Posted: 10. Aug 2017, 00:10
by pom
[solved] It's definitely not virtualbox specific in my case.
There is a /run/php-fpm/ directory that is persistent after hard boots and I've been trying to force it on /run/php/ which isn't.
Still not entirely sure why, I'm guessing it's a difference between my typical LEMP install notes and a php version outside of the main repo, and I'm creating a process that can't start again after a hard boot.
socratis wrote:I would hurry then and fix the real servers, to prevent a power outage wiping the real deal.
I'm on it. If any good's came out of this it's that virtualbox has alerted me to a potential problem. All's well that ends well.
Thanks for your help.