• 6.12.4 Unable to start dockers with custom IPv6 Address


    dan91
    • Urgent

    Hi,

     

    Upgraded from 6.12.3 and having issues with my dockers using custom ipv6 addresses. I'm getting this error:

     

    docker: Error response from daemon: user specified IP address is supported only when connecting to networks with user configured subnets.

     

     

    These are the settings which worked fine on 16.12.3:

    1047795022_Screenshot2023-09-02111800.thumb.png.b1df84783d9cd075e74fa64772c85083.png

    475421025_Screenshot2023-09-02111626.thumb.png.65494e9be5c9a6fc3b48810511518e4d.png

    docker run
      -d
      --name='binhex-sabnzbd'
      --net='br0'
      --ip='192.168.93.193'
      --ip6='2a02:restofip'
      -e TZ="Europe/London"
      -e HOST_OS="Unraid"
      -e HOST_HOSTNAME="tower"
      -e HOST_CONTAINERNAME="binhex-sabnzbd"
      -e 'TCP_PORT_8080'='8080'
      -e 'TCP_PORT_8090'='9090'
      -e 'UMASK'='000'
      -e 'PUID'='99'
      -e 'PGID'='100'
      -l net.unraid.docker.managed=dockerman
      -l net.unraid.docker.webui='http://[IP]:[PORT:8080]/'
      -l net.unraid.docker.icon='https://raw.githubusercontent.com/binhex/docker-templates/master/binhex/images/sabnzbd-icon.png'
      -v '/mnt/disks/WDC_1TB_BLACK/Sab':'/land':'rw,slave'
      -v '/mnt/cache/appdata/sab/':'/config':'rw' 'binhex/arch-sabnzbd:latest'

    366a3580aae5540d218ef2281456d083994bf8f7998a1cb51b05e378cd705ad6
    docker: Error response from daemon: user specified IP address is supported only when connecting to networks with user configured subnets.

     

     

    Am I missing something? Going to have to roll back for now. If i remove the specified IPv6 Address it works fine.

     

    Please let me know where to send diagnostics don't want to post them publicly.

     

    Thanks,

    Daniel




    User Feedback

    Recommended Comments

    Same problem here, but with macvlan - link to my post in the German section: 

     

     

    There is also another user in the linked post with similar problem using ipvlan - so it should be a problem with the vlan-driver from docker. 

     

    It seems like the GUI-Setting for IPv6 on the custom network does not work correctly, because an "docker network inspect eth0" shows that IPv6 is not enabled on the custom network: 

     

    [
        {
            "Name": "eth0",
            "Id": "63da494650cf9f1286cee6c0dec5f55b2e6fbbfbfee66d20c0bc582b51fbc2f0",
            "Created": "2023-09-02T13:47:25.953225226+02:00",
            "Scope": "local",
            "Driver": "macvlan",
            "EnableIPv6": false,
    ...

     

    Link to comment

    I also posted about this on: https://forums.unraid.net/topic/110395-docker-host-network-access-not-working-after-hard-reboot/?do=findComment&comment=1302630

     

    edit: for my only using an ipv4 address for the container does not seem to work

     

    edit2: it does work after making some change to the container (e.g. re-creating it)

     

    Will wait for a day then rollback as only ipv4 is not an option for me (to much stuff to change)

    Edited by mattie112
    Link to comment

    I have exactly the same issue. Also for me, not using IPv6 isn't an option. So I rolled back to 6.12.3.

    I hope this gets fixed in the next update.

    Link to comment
    On 9/5/2023 at 10:30 PM, mine said:

    I have exactly the same issue. Also for me, not using IPv6 isn't an option. So I rolled back to 6.12.3.

    I hope this gets fixed in the next update.

     

    Did you had any issues downgrading? I also want to get IPv6 back but never downgraded Unraid before so not to sure if that will go without problems.

    Link to comment

    It was my first downgrade as well. But it was very painless.

    Although I had a flash backup from the previous version, I decided to follow this guide to downgrade to the previous version.

    I learned that when you upgrade to a new Unraid version, the old system is always stored in a folder called "previous" on the flash drive. So I just had copy the files starting with bz* of that folder to the root directory of the flash drive. That's it. After a reboot I was back on the old system.

    But like stated in the release notes of the latest version, make sure to change back the network settings to use bridge mode again.

    Link to comment

    Same issue, ipv6 docker containers will not start with `bad argument` error if you have an `--ip6` argument set.  Docker itself shows ipv6 info in the docker settings section, but within each container, only the ipv4 subnet is shown.

     

    Also rolling back as a result.

    Edited by Cossid
    Link to comment

    So, it seems that this does not have a high prio, so I will rolling back this weekend this is taking way to long and is really a show stopper for me.

    Link to comment

    I upgraded yesterday from unraid 6.11.5 to 6.12.4 (so I cannot say from when 6.12 version this problem starts), and I'm also impacted by this bug.

    I managed to fix it by :

     

    1) Stopping docker service

    2) Modifying /usr/locale/etc/rc.d/rc.docker file :

    at line 350 from :

    IPV6=$(min6 $(max6 $(wipe $(ip -br -6 addr show $NETWORK scope global|awk '{$2="";print;exit}'))|sort|head -1))
    

    to

    IPV6=$(ip -6 addr show $NETWORK mngtmpaddr|awk '/^ +inet6 /{print $2;exit}')
    [[ -z $IPV6 ]] && IPV6=$(ip -6 addr show $NETWORK scope global permanent|awk '/^ +inet6 /{print $2;exit}'

    3) Restarting the docker service

     

    But I hope there will be a fix from unraid in future version !

    Edited by maximushugus
    • Confused 1
    Link to comment
    On 9/14/2023 at 10:03 PM, maximushugus said:

    I upgraded yesterday from unraid 6.11.5 to 6.12.4 (so I cannot say from when 6.12 version this problem starts), and I'm also impacted by this bug.

    I managed to fix it by :

     

    1) Stopping docker service

    2) Modifying /usr/locale/etc/rc.d/rc.docker file :

    at line 350 from :

    IPV6=$(min6 $(max6 $(wipe $(ip -br -6 addr show $NETWORK scope global|awk '{$2="";print;exit}'))|sort|head -1))
    

    to

    IPV6=$(ip -6 addr show $NETWORK mngtmpaddr|awk '/^ +inet6 /{print $2;exit}')
    [[ -z $IPV6 ]] && IPV6=$(ip -6 addr show $NETWORK scope global permanent|awk '/^ +inet6 /{print $2;exit}'

    3) Restarting the docker service

     

    But I hope there will be a fix from unraid in future version !

     

    Should that be on one line?

    root@Tower:~# /etc/rc.d/rc.docker start
    /etc/rc.d/rc.docker: line 366: syntax error near unexpected token `else'
    /etc/rc.d/rc.docker: line 366: `    else'
    

    It goes wrong on a different line. Or should it also contain an if; then?

    Link to comment
    On 9/24/2023 at 2:38 PM, maximushugus said:

    The command above is in two lines. You have to stop docker before modifying the file et restart after

     

    Ok so just to be sure:

     

      # add or remove custom network
      for NETWORK in $INCLUDE; do
        if [[ ! $DOCKER_CUSTOM_NETWORKS =~ "$NETWORK " ]]; then
          # automatic assignment
          AUTO=${NETWORK/./_}
          AUTO=DOCKER_AUTO_${AUTO^^}
          if [[ ${!AUTO} == no ]]; then
            [[ $NETWORKS =~ "$NETWORK " ]] && docker network rm $NETWORK >/dev/null
            continue
          fi
          # add auto defined networks
          SUBNET=; GATEWAY=; SERVER=; RANGE=;
          IPV4=$(ip -br -4 addr show $NETWORK|awk '{print $3;exit}')
          if [[ -n $IPV4 ]]; then
            SUBNET=$(ip -4 route show $IPV4 dev $NETWORK|awk '{print $1;exit}')
            SERVER=${IPV4%/*}
            DHCP=${NETWORK/./_}
            DHCP=DOCKER_DHCP_${DHCP^^}
            RANGE=${!DHCP}
            GATEWAY=$(ip -4 route show default dev $NETWORK|awk '{print $3;exit}')
          fi
          SUBNET6=; GATEWAY6=; SERVER6=; RANGE6=;
    #      IPV6=$(min6 $(max6 $(wipe $(ip -br -6 addr show $NETWORK scope global|awk '{$2="";print;exit}'))|sort|head -1))\
          IPV6=$(ip -6 addr show $NETWORK mngtmpaddr|awk '/^ +inet6 /{print $2;exit}')
          [[ -z $IPV6 ]] && IPV6=$(ip -6 addr show $NETWORK scope global permanent|awk '/^ +inet6 /{print $2;exit}'
          if [[ -n $IPV6 ]]; then
            # get IPV6 subnet, preset to /64 if single host address is given
            [[ ${IPV6#*/} == 128 ]] && SUBNET6=$(echo $IPV6|sed -r 's/^([^:]+):([^:]+):([^:]+):([^:]+).*$/\1:\2:\3:\4::\/64/') || SUBNET6=$(ip -6 route show $IPV6 dev $NETWORK|awk '{print $1;exit}')
            SERVER6=${IPV6%/*}
            DHCP6=${NETWORK/./_}
            DHCP6=DOCKER_DHCP6_${DHCP6^^}
            RANGE6=${!DHCP6}
            GATEWAY6=$(ip -6 route show default dev $NETWORK|awk '{print $3;exit}')
            # replace link local address for first address in subnet
            [[ ${GATEWAY6:0:4} == fe80 ]] && GATEWAY6=${SUBNET6%/*}1
          fi
        else
          # add user defined networks
          IPV4=; IPV6=;
    

     

    I have commented the original line and then added your 2 lines. However when I start docker I get:

     

    root@Tower:~# /etc/rc.d/rc.docker start
    /etc/rc.d/rc.docker: line 364: syntax error near unexpected token `else'
    /etc/rc.d/rc.docker: line 364: `    else'
    

     

    So that is really strange?

     

    edit:

    Ah I see it now, the 2nd line is missing a `)` at the end. I have added that and will try IPv6 again :)

    Edited by mattie112
    Link to comment

    And just as a small reminder: a reboot clears this fix :)

     

    (and still no comment from Unraid staff, wow I am starting to regret buying a licence if this is how bug reports are handled)

    • Upvote 1
    Link to comment

    Just needed to reboot my server to do some electrical work and ofc this is still an issue.

     

    Dear Unraid staff: please at least acknowledge this issue!

    Link to comment
    18 hours ago, mattie112 said:

    Dear Unraid staff: please at least acknowledge this issue!

    I agree. Would be good to know, if the devs have this issue on their radar so that this gets fixed in one of the upcoming releases.

    Link to comment
    On 11/21/2023 at 8:56 PM, ljm42 said:

    The fix for this issue is included in 6.12.5-rc1, thanks again for reporting!

    Great, thank you!

    Thanks for posting this info in this thread. Very helpful.

    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.