IPv6 only boxe - Nginx problem with i-MSCP 1.3.x

  • Hi,


    Currently testing out 1.3.x and have ran into a error while installing the control panel. The error occurs which what would seem at the end of installation when it is starting the services.


    Currently I have selected for only IPv6 to be enabled on the control panel:


    Error:

    Code
    1. [ERROR] Package::FrontEnd::start: Could not start the nginx service: iMSCP::Provider::Service::Sysvinit::_exec: Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details. at /usr/local/src/imscp-1.3.x/engine/PerlLib/iMSCP/Service.pm line 158.autoinstaller::Functions::install: An error occurred while performing installation steps
    Code
    1. root@beta:/usr/local/src/imscp-1.3.x# service nginx status● nginx.service - A high performance web server and a reverse proxy serverLoaded: loaded (/lib/systemd/system/nginx.service; enabled)Active: failed (Result: exit-code) since Sat 2016-05-28 15:36:42 EDT; 1min 23s agoProcess: 30373 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)


    I have investigated further using command nginx -t and it would seem nginx has a problem with IPv6:

    Code
    1. nginx: [emerg] invalid port in "4a069:b0c0:1:d0::30a:1001:8080" of the "listen" directive in /etc/nginx/sites-enabled/00_master:4


    *** Please note above is a fake IPv6 address.


    I have placed the IPv6 into squared brackets [ ] and this has resolved the above errors.


    Cheers

  • @Derek Wildman


    Distro? Codename? Nginx version?


    Could you also please show us your nginx conffiles after your modifications?


    right now, the template look as follow:

    Code
    1. server {server_name {BASE_SERVER_VHOST};listen {BASE_SERVER_IP}:{BASE_SERVER_VHOST_HTTP_PORT};# SECTION IPv6 BEGIN.listen [::]:{BASE_SERVER_VHOST_HTTP_PORT} default ipv6only=on;# SECTION IPv6 END....


    Here, it is assumed that there will be aways an IPv4 set for the server (primary ip) and that nginx will also listen on all IPv6 interfaces (if IPv6 is supported) which can indeed be wrong if you choose an IPv6 as primary IP during i-MSCP installation.


    For an IPv6 only boxe, you should have either something like:


    Code
    1. server {server_name {BASE_SERVER_VHOST};# SECTION IPv6 BEGIN.listen [::]:{BASE_SERVER_VHOST_HTTP_PORT} default ipv6only=on;# SECTION IPv6 END....

    to listen on all IPv6 interfaces, either something like:


    Code
    1. server {
    2. server_name {BASE_SERVER_VHOST};
    3. listen [{BASE_SERVER_IP}]:{BASE_SERVER_VHOST_HTTP_PORT};
    4. ...

    to listen only on the primary IPv6 interface (the one chosen as primary IP address while i-MSCP installation).


    I think that in your case, this would be the last case. Anyway both cases should work. A little test to suround IPv6 with squared brakets when needed seem missing in the frontEnd package. I'll investigate.

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

  • Hi @Nuxwin


    Distro - Debian 8
    nginx - 1.11.0
    Codename - Horner


    Please find below nginx conf files after alteration:



    I have altered file /configs/debian/frontend/00_master.conf prior to re-running the setup. As I did not test with SSL for the control panel I did not run into any further problems.
    While going through the setup I did not add an IPv4.

  • A fix has been added in the 1.3.x branch. See https://github.com/i-MSCP/imsc…37a5716e9f...f7bb46f26a8e
    This fix will be part of 1.3.0 release.


    Thank you for you report.

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

  • @Derek Wildman


    You're welcome.


    Thank you for using i-MSCP.

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