Page 1 of 1

Server Restart Times Out to Blank Page

Posted: Thu Dec 28, 2017 12:54 am
by JerDoggMcKoy
Whenever I go to "Server" and hit the "Restart" button under the hostname server, it hangs for about a minute and then sends me to an error page with no VestaCP, and it takes a while before I can get back on. Shouldn't it keep me on the control panel while it finishes its restart?

Image

After I Click that restart button, here is what I get next:

Image

Anyone else experiencing this and know how to fix?

Re: Server Restart Times Out to Blank Page

Posted: Thu Dec 28, 2017 3:38 am
by joem
This happens to everyone because PHP has to finish executing v-restart-system before it redirects to list server page.

You can fix this by doing the following, keep in mind when you update Vesta these settings will be overwritten and you will need to reapply the changes.

In /usr/local/vesta/bin/v-restart-system Replace

Code: Select all

if [  "$restart" = 'yes' ]; then
    /sbin/reboot
fi
With

Code: Select all

if [  "$restart" = 'yes' ]; then
    sleep 5
    /sbin/reboot
fi
In /usr/local/vesta/web/restart/system/index.php Replace

Code: Select all

exec (VESTA_CMD."v-restart-system yes", $output, $return_var);
With

Code: Select all

exec (VESTA_CMD."v-restart-system yes >/dev/null 2>/dev/null &", $output, $return_var);

Re: Server Restart Times Out to Blank Page

Posted: Fri Dec 29, 2017 5:35 am
by JerDoggMcKoy
Sorry, it took me a short while before I had the time to implement your fix. Thank you very much! Worked perfectly!

Happy New Year!