Discover Centmin Mod today
Register Now

[Solved] Enable ipv6 error

Discussion in 'Bug Reports' started by pamamolf, Dec 5, 2019.

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    Hello

    On a vps i install Centminmod using:
    Code:
    DISABLE_IPVSIX='y'
    A day later i i change it to:
    Code:
    DISABLE_IPVSIX='n'
    and when i start Centminmod i got:
    Code:
    postconf: fatal: parameter inet_interfaces: no local interface found for ::1
    and i am actually a bit confused on how to re enable ipv6...

    /etc/hosts
    Code:
    ::1 server.mydomain.com server
    ::1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6
    
    Thanks !

     
    Last edited: Dec 5, 2019
  2. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:35 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    try re-running centmin.sh after the change, does it fix it as centmin.sh will detect the change and should set postfix appropriately
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Yes i re run it as "n" and "y" but i am always getting the same error...

    At postfix i have:
    Code:
    inet_interfaces = localhost
    inet_protocols = all
    
    but i didn't adjust anything there....
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Also maybe there is a better method to do the ipv6 disable function ?

    I was tested GlusterFS and it needs rpcbind to work.

    If ipv6 is disabled by the sysctl.conf file after reboot the rpcbind is not running with a failed state ....

    Checking on the net i found at Red hat:
    1402961 – rpcbind.socket systemd unit fails to start when IPv6 is disabled.

    Code:
    The problem is that if you disable ipv6 in sysctl.conf, it is not disabled from the beginning of the boot, but actually quite late in the boot process. Meanwhile systemd found out that ipv6 is enabled and scheduled a start of a socket, that would listen on ipv6.
    
    There are two solution to this problem. Either disable the ipv6 from kernel command line, or after you edit the sysctl.conf call dracut -f, so your change also gets into the initramfs.

    It will be great if it is possible to adjust the ipv6 enable/disable function to avoid that issue.

    Thank you !
     
    Last edited: Dec 5, 2019
  5. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:35 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    rpcbind should be reactivated when centmin.sh runs with DISABLE_IPVSIX='n' from my code in 123.09beta01

    question is after setting DISABLE_IPVSIX='n', did you run centmin.sh once for centmin mod to reverse the changes made from DISABLE_IPVSIX='y' ?
     
  6. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Yes it should...

    Yes.

    The only way to fix it is by running:

    but i was looking for a proper fix...

    I can send you login info if you want to check it...
    It is just a test vps server....

    Thank you
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:35 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I believe I know why as centmin.sh only starts rpcbind after apply the update for DISABLE_IPVSIX='n' if it detected that rpcbind was running before. But as you don't have rpcbind running before hand, it didn't start. That is as expected and not a bug unless you had rpbind running before DISABLE_IPVSIX='n' and before server reboot and it didn't start after server reboot.
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Yes rpcbind was not running when i tried to enable back the ipv6.

    What i did is a Centminmod install using DISABLE_IPVSIX='n' and then just restart the server and rpcbind was not able to start...

    The reason seems to be the way of disabling ipv6 as described in the above links and that's why i asked if it is possible to adjust the enable/disable function and be able to get rpcbind always running after reboots even if i use ipv6 or not....

    Thanks :)
     
  9. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:35 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    can't do that as rpcbind needs to be able to listen to ipv4 or ipv6 or both to start up. When you disable IPv6 via DISABLE_IPVSIX='y' part of the routine sets rpcbind to listen to only ipv4 so when rpcbind starts it listens to ipv4. But when you re-enable IPv6 via DISABLE_IPVSIX='n' + run centmin.sh once, rpcbind is automatically configured to start listening for both ipv4 and ipv6. But if you don't do centmin.sh run step, it wouldn't do the required changes to rpcbind for ipv4 and ipv6 so when you reboot, rpcbind won't start up until you run centmin.sh once with DISABLE_IPVSIX='n' set.

    So proper way to re-enable IPv6 is set DISABLE_IPVSIX='n' and run centmin.sh once and then manually start rpcbind once and enable it
    Code (Text):
    systemctl daemon-reload
    systemctl start rpcbind.socket
    systemctl enable rpcbind.socket
    

    These would be general must know steps for setting up GlusterFS

    If you aren't running centmin.sh menu once, then manual way is removing the no-ipv6.conf that centmin mod sets up on DISABLE_IPVSIX='y'
    Code (Text):
    rm -rf /etc/systemd/system/rpcbind.socket.d/no-ipv6.conf
    systemctl daemon-reload
    systemctl start rpcbind.socket
    systemctl enable rpcbind.socket
    
     
  10. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    To be easier to follow :)

    What i just did:

    i set the DISABLE_IPVSIX='n'

    cmupdate
    centminmod

    Then i got this:
    Code:
    postconf: fatal: parameter inet_interfaces: no local interface found for ::1
    exit using menu 24 option.
    then i run the commands that you recommend me:
    Code:
    systemctl daemon-reload
    systemctl start rpcbind.socket
    systemctl enable rpcbind.socket
    Then checked the rpcbind status:

    Code:
    systemctl status rpcbind
    ● rpcbind.service - RPC bind service
       Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
       Active: inactive (dead)
    
    Dec 06 16:03:35 server.mydomain.com systemd[1]: Dependency failed for RPC bind service.
    Dec 06 16:03:35 server.mydomain.com systemd[1]: Job rpcbind.service/start failed with result 'dependency'.
    The commands that will fix it are:
    Code:
    systemctl enable rpcbind.socket
    systemctl restart rpcbind.socket
    systemctl start rpcbind.service
    After that:
    Code:
    systemctl status rpcbind
    ● rpcbind.service - RPC bind service
       Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
       Active: active (running) since Fri 2019-12-06 23:05:51 UTC; 3s ago
      Process: 7035 ExecStart=/sbin/rpcbind -w $RPCBIND_ARGS (code=exited, status=0/SUCCESS)
     Main PID: 7036 (rpcbind)
       CGroup: /system.slice/rpcbind.service
               └─7036 /sbin/rpcbind -w
    
    Dec 06 23:05:51 server.mydomain.com systemd[1]: Starting RPC bind service...
    Dec 06 23:05:51 server.mydomain.com systemd[1]: Started RPC bind service.
    Then all working great.

    After i reboot the server and rpcbind status is:
    Code:
    systemctl status rpcbind
    ● rpcbind.service - RPC bind service
       Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
       Active: inactive (dead)
    
    Dec 06 23:08:36 server.mydomain.com systemd[1]: Dependency failed for RPC bind service.
    Dec 06 23:08:36 server.mydomain.com systemd[1]: Job rpcbind.service/start failed with result 'dependency'.
    From my point of view the problem is the socket...

    ifconfig doesn't show an ipv6 address ...

    lsmod|grep ipv6: kernel output
    Code:
    nf_reject_ipv6         13717  1 ip6t_REJECT
    nf_conntrack_ipv6      18935  3
    nf_defrag_ipv6         35104  1 nf_conntrack_ipv6
    nf_conntrack          139224  7 nf_nat_ftp,nf_nat,nf_nat_ipv4,xt_conntrack,nf_conntrack_ftp,nf_conntrack_ipv4,nf_conntrack_ipv6
    rejecting?

    cat /etc/sysconfig/network
    Code:
    NETWORKING=yes
    NETWORKING_IPV6=yes
    IPV6_AUTOCONF=no
    cat /etc/sysconfig/network-scripts/ifcfg-eth0
    Code:
    IPV6INIT=yes
    In a few words rpcbind can't start at reboot no matter if i use ipv4 alone or both ipv4/ipv6.
     
    Last edited: Dec 7, 2019
  11. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:35 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    does the file exist /etc/systemd/system/rpcbind.socket.d/no-ipv6.conf ? it should automatically be removed when you run centmin.sh menu with DISABLE_IPVSIX='n' set
     
  12. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    It doesn't exist...

    Also i just got another vps to test this and i install Centminmod with ipv6 as disabled.

    Restarting the server rpcbind was not working.

    Then i try to enable ipv6 and run centminmod but again after reboot was not working.

    The last third try was to enable ipv6 and run centminmod and successfully start rpcbind using the commands on my previous post.

    All was ok and then i restart the server and again rpcbind was not working...

    So i think it is not something that i mess with and i can reproduce it anytime...

    Thank you
     
  13. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:35 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what about if you install Centmin Mod without setting DISABLE_IPVSIX='y' and left it at default DISABLE_IPVSIX='n' ?
     
  14. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    I just install Centminmod on a new clean vps and rpcbind was started with no issues.

    Then i reboot the server and rpcbind was ok again... So if i don't use DISABLE_IPVSIX='y' on fresh install all is fine.

    Then i tried to see if it will work by setting the DISABLE_IPVSIX='y' and start centminmod...

    result was rpcbind to fail:
    Code:
    systemctl status rpcbind.service
    ● rpcbind.service - RPC bind service
       Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
       Active: inactive (dead) since Sat 2019-12-07 21:00:34 UTC; 36s ago
     Main PID: 622 (code=exited, status=0/SUCCESS)
    Then i restart the server to see if it will work.

    rpcbind didn't start

    The i tried to do a last check by using DISABLE_IPVSIX='n' and running centminmod.

    Then rpcbind failed again ....

    So the issue starts if a user uses DISABLE_IPVSIX='y' . After that rpcbind will never auto start.

    You will need to run these commands manually to start every time (after reboot also):

    Code:
    systemctl enable rpcbind.socket
    systemctl restart rpcbind.socket
    systemctl start rpcbind.service
    Just send you the login info if you want to check it... It is a blank with no domains or data vps. You can burn it if you want :)

    Thank you
     
    Last edited: Dec 8, 2019
  15. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:35 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    if you set that on initial install and before reboot set only
    Code (Text):
    systemctl enable rpcbind.socket
    

    and reboot

    does rpcbind start up on the reboot ? that is probably what you're missing as it's common knowledge to do that after installing a service you want to start up on reboot. Centmin Mod wouldn't do that step for you. As with any service you install yourself, you need to configure it to start on reboot either via systemctl enable servicename or old chkconfig servicename on
     
  16. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    I already did that:

    Code:
    systemctl enable rpcbind.socket
    systemctl restart rpcbind.socket
    systemctl start rpcbind.service
    After that it works.

    Then if i reboot it doesn't.

    It is set to startup after reboot:
    Code:
    Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
     
  17. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Keep in mind that i didn't touch any files and i can see also Postfix is failing:

    Code:
    systemctl --failed
      UNIT            LOAD   ACTIVE SUB    DESCRIPTION
    ● kdump.service   loaded failed failed Crash recovery kernel arming
    ● postfix.service loaded failed failed Postfix Mail Transport Agent
    ● rpcbind.socket  loaded failed failed RPCbind Server Activation Socket
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    I think that postfix issue is related also to the DISABLE_IPVSIX='y' ...
     
  18. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    On another vps server (not the one that i send you the login info) that i had the same issue i remove the rpcbind from the system and reboot the server and postfix didn't start again... :(

    Code:
    systemctl status postfix.service
    ● postfix.service - Postfix Mail Transport Agent
       Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Sat 2019-12-07 21:59:28 UTC; 1min 30s ago
      Process: 1180 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)
      Process: 1168 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
      Process: 961 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=75)
    
    Dec 07 21:59:25 server.mydomain.com systemd[1]: Starting Postfix Mail Transport Agent...
    Dec 07 21:59:25 server.mydomain.com aliasesdb[961]: /usr/sbin/postconf: fatal: parameter inet_interfaces: no local interface found for ::1
    Dec 07 21:59:26 server.mydomain.com aliasesdb[961]: newaliases: fatal: parameter inet_interfaces: no local interface found for ::1
    Dec 07 21:59:26 server.mydomain.com postfix/sendmail[1156]: fatal: parameter inet_interfaces: no local interface found for ::1
    Dec 07 21:59:27 server.mydomain.com postfix[1180]: fatal: parameter inet_interfaces: no local interface found for ::1
    Dec 07 21:59:28 server.mydomain.com systemd[1]: postfix.service: control process exited, code=exited status=1
    Dec 07 21:59:28 server.mydomain.com systemd[1]: Failed to start Postfix Mail Transport Agent.
    Dec 07 21:59:28 server.mydomain.com systemd[1]: Unit postfix.service entered failed state.
    Dec 07 21:59:28 server.mydomain.com systemd[1]: postfix.service failed.
     
  19. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    3:35 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Just did another test.

    Tried to install Centminmod without rpcbind using DISABLE_IPVSIX='y' and then use DISABLE_IPVSIX='n'
    and check Postfix ...

    So after installation using DISABLE_IPVSIX='y' i got this?
    Code:
    systemctl status postfix.service
    ● postfix.service - Postfix Mail Transport Agent
       Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
       Active: inactive (dead)
    
    Dec 07 23:07:06 server.mydomain.com systemd[1]: Unit postfix.service cannot be reloaded because it is inactive.
    So Postfix had a problem before i even be able to test DISABLE_IPVSIX='n'

    I really don't get it.... :(
     
  20. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:35 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Indeed it was a centmin mod bug when installed with DISABLE_IPVSIX='y' to disable ipv6 and then later you try to set DISABLE_IPVSIX='n' to re-enable ipv6 support - the centmin.sh run didn't properly re-enable ipv6 when it detected DISABLE_IPVSIX='n'. The latest centmin mod 123.09beta01 update will fix this.