Menu

#2261 sfcb fails to start with ipv6 disabled

Function
pending-fixed
sfcb (1090)
5
2011-09-07
2011-08-29
No

sfcb fails to start on a Linux system with ipv6 disabled.

How to reproduce:
- Boot Linux with "ipv6.disable=1" in the kernel command line
- Start sfcbd

Observed behaviour:
--- Cannot listen on port 5989 (Address family not supported by protocol)

Expected behaviour:
- proper fallback to ipv4

Discussion

  • Klaus Kämpf

    Klaus Kämpf - 2011-08-29

    While a proper fallback is implemented for socket() in getSocket() (httpAdapter.c), it is missing for bind() in bindToPort()

     
  • Klaus Kämpf

    Klaus Kämpf - 2011-08-29

    This patch implements the ipv4 fallback for bind() and listen().

     
  • Klaus Kämpf

    Klaus Kämpf - 2011-08-29

    The bug is present in the 1.3.x and 1.4.x branches of sfcb

     
  • Klaus Kämpf

    Klaus Kämpf - 2011-08-29

    The first patch is for 1.3.11

     
  • Michael Chase-Salerno

    • assigned_to: buccella --> mchasal
     
  • Michael Chase-Salerno

    So far I have been unable to reproduce this, here's an example:

    gubber:~/CODE/sfcb-cvs> cat /proc/cmdline
    BOOT_IMAGE=/boot/vmlinuz-2.6.35-30-generic-pae root=UUID=575ce53a-16b7-48f6-9640-63d1dc3e5f70 ro ipv6.disable=1 quiet splash

    gubber:~/CODE/sfcb-cvs> wbemcli -noverify ein https://localhost:5989/root/interop:CIM_indicationservice
    localhost:5989/root/interop:CIM_IndicationService.CreationClassName="CIM_IndicationService",SystemCreationClassName="CIM_ComputerSystem",SystemName="gubber",Name="sfcb:NO-UUID-FILE-gubber"

    And no errors from sfcbd during this run:

    root@gubber:~# sfcbd
    --- sfcbd V1.3.13preview started - 13109
    --- Using /usr/local/etc/sfcb/sfcb.cfg
    --- User authentication disabled
    --- Max provider procs: 32
    --- initSocketPairs: 64
    --- localConnectServer started
    --- Max Http procs: 8
    --- sfcbd HTTP Daemon V1.3.13preview configured for port 5989 - 13112
    --- Keep-alive timeout: 15 seconds
    --- Maximum requests per connection: 10
    --- Caching ClassProvider for /usr/local/var/lib/sfcb/registration/repository/root/cimv2/classSchemas (1.0-3) using 1652 bytes
    --- Caching ClassProvider for /usr/local/var/lib/sfcb/registration/repository/root/interop/classSchemas (1.0-3) using 1176 bytes

    Is there perhaps some other factor at play here? Perhaps bind has different behavior on different kernels/distros? I see that the fallback isn't there, but I do want to be able to verify this is fixing a problem.

     
  • Klaus Kämpf

    Klaus Kämpf - 2011-09-04

    Hi Michael, looking at the code, I'd guess the missing fallback is pretty obvious. Why it doesn't fail on your system, I can only guess. sfcb was compiled with IPv6 ? ipv6.disable=1 really disables ipv6 on this kernel (check with 'ip addr' and look for inet6 entries) ?

     
  • Michael Chase-Salerno

    • status: open --> pending-fixed
     
  • Michael Chase-Salerno

    Well, my configuration is all as you suggest, ipv6 disabled in kernel, enabled in sfcb, and "ip addr" returns only v4 addrs.

    Looks like there might be a distro difference here somewhere that's allowing it to continue to work for me.

    I looked over, applied and tested the patches provided and they look good and test suite is clean after application. Committed to GIT and CVS to fix where this problem occurs.

     

Log in to post a comment.