Panel won't start after restart

  • I'm installing i-MSCP in VirtualBox. No errors or warnings show up during installation, and in fact, once the installation is complete, the whole thing works great.


    However, when I restart the virtual machine, the panel won't start on port 8880. Port 80 opens fine and shows the default Apache page, though.


    The only solution I've found is to run the entire installation again. Then the whole thing works. I've tried restarting the services in /etc/init.d and I've looked for logs telling me something, but none of them contain any hints as far as I can tell.


    I've tried versions 1.4.3 and 1.4.7 of i-MSCP and Debian 8.8 and Debian 9.0. Same result every time; works fine after installation, but then I reboot and then I need to install again in order to bring the thing alive again.


    I feel like I must be missing something. Is there something that needs to be done after installation to make the system automatically start after installation? Given that it sets up init scripts and what not, I feel like it should automatically start. It seems to intend to, but it doesn't. The installation documentation doesn't seem to mention anything with regard to this, and searching for others with the same problem online has yielded no results.


    Any help would be greatly appreciated. Thanks in advance.


    Command "service [service] status" output:


  • Somewhere there are supernatural beings that have declared that once you've given up on trying things and just go ahead and ask someone on the internet, you'll figure it out moments later. Maybe their plan is to increase the distribution of solutions to technical problems.


    Anyway. I've figured it out, thanks to the aforementioned supernatural beings.


    So the panel is run with Nginx as a web server on port 8880, not Apache. Nginx fails to start due to:


    Code
    1. [root@imscp-host ~]# cat /var/log/nginx/error.log
    2. 2017/07/14 10:07:48 [emerg] 490#0: bind() to 192.168.123.48:8880 failed (99: Cannot assign requested address)


    So for some reason it can't open port 8880 at startup.


    Nginx is started using the traditional startup script in /etc/rc4.d/S04nginx (a symbolic link to /etc/init.d/nginx, of course).


    What worked for me, was simply starting Nginx slightly later, by changing the name of the symbolic link /etc/rc4.d/S04nginx to /etc/rc4.d/S06nginx. Other things started at S04 are: S04bluetooth, S04bootlogs, S04cron, S04dovecot, S04proftpd, and then there is S05postfix after that. I don't know if any of these are interfering during Nginx's startup, or if perhaps something even earlier in the process needs port 8880 temporarily or what, but at any rate, delaying the startup of Nginx worked for me.


    I hope this helps someone else having the same problem.

  • @Teekin


    First please use bbcode around the content that you want show us: [code] bla bla bla [/code].


    About your problem, we need more information. My first thinking is that your network is not configured as expected. Please reboot your vm and once done, show us the content of your /etc/network/interfaces file and also the result of the ifconfig command.


    Also please, give us more details about virtualization technologie that you use.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • I'll keep that in mind next time, thanks. I found the solution though, and posted it above.

  • I'll keep that in mind next time, thanks. I found the solution though, and posted it above.

    That not a solution ;) That is a workaround.


    Be sure that when the nginx service start, the network is already configured, preferably staticaly. If you use DHCP, that could explain the problem. The error message (99: Cannot assign requested address) is clear enough. At time Nginx start, the IP is not configured yet.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Well, I'm using DHCP and will continue to do so. So I'm not sure what else I could do, other than delay the starting of it.


    Actually, that solution above even only worked for Debian 8.8. Once I was in Debian 9.0 I had to use /etc/rc.local, which is even uglier, but it works.


    If you have a solution that's not a workaround, I'm all ears. This works for me and hopefully others who are only setting up a dev environment.

  • Well, I'm using DHCP and will continue to do so.

    Fine but so, don't ask us for a solution ;) The issue is not related to i-MSCP and google is your friend ;)
    Thread closed.


    See also: https://ask.fedoraproject.org/…nitialized-the-ip-adress/

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206