Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 557182 - app-emulation/docker failed with 'Error creating default "bridge" network'
Summary: app-emulation/docker failed with 'Error creating default "bridge" network'
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Tianon
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-10 00:31 UTC by Shining
Modified: 2020-01-15 10:47 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info,5.08 KB, text/plain)
2015-12-06 22:28 UTC, Peter Wilmott (RETIRED)
Details
emerge -pqv app-emulation/docker (emerge-pqv,111 bytes, text/plain)
2015-12-06 22:29 UTC, Peter Wilmott (RETIRED)
Details
/var/log/docker.log (docker-log,1.68 KB, text/plain)
2015-12-06 22:29 UTC, Peter Wilmott (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shining 2015-08-10 00:31:38 UTC
PC: Intel x86_64 4Gram 128GB SSD
Kernel: genkernel all

Bad Example: docker -d 
             FATA[0000] Error starting daemon: Error initializing network controller: Error creating default "bridge" network: package not installed

Reproducible: Always

Steps to Reproduce:
1. docker -d
2.
3.
Actual Results:  
FATA[0000] Error starting daemon: Error initializing network controller: Error creating default "bridge" network: package not installed

Expected Results:  
docker daemon is started.

To exclude the configure problem, I tried the kernel configuration from boot2docker, the error is the same.
Comment 1 Andrew Savchenko gentoo-dev 2015-08-16 11:28:07 UTC
Please provide the output of:
emerge --info app-emulation/docker
Comment 2 Peter Wilmott (RETIRED) gentoo-dev 2015-12-06 22:26:47 UTC
This appears to be due to a missing dependency on net-misc/bridge-utils.
Comment 3 Peter Wilmott (RETIRED) gentoo-dev 2015-12-06 22:28:52 UTC
Created attachment 418690 [details]
emerge --info
Comment 4 Peter Wilmott (RETIRED) gentoo-dev 2015-12-06 22:29:21 UTC
Created attachment 418692 [details]
emerge -pqv app-emulation/docker
Comment 5 Peter Wilmott (RETIRED) gentoo-dev 2015-12-06 22:29:41 UTC
Created attachment 418694 [details]
/var/log/docker.log
Comment 6 Tianon 2015-12-07 18:51:56 UTC
I don't have net-misc/bridge-utils installed, and my daemon starts up OK.

According to https://github.com/docker/docker/issues/6853 (and my own experience), this is most commonly a sign of missing kernel config (especially CONFIG_BRIDGE); are you absolutely certain you applied, recompiled, and rebooted correctly for testing the boot2docker kernel config?  If you've got "/proc/config.gz" enabled, you can try something like "zgrep BRIDGE /proc/config.gz" to determine whether that flag is enabled.
Comment 7 László Szalma 2017-02-01 22:28:47 UTC
I ran into this problem. I have bridge-utils installed. I have BRIDGE in my config:

# zgrep BRIDGE /proc/config.gz
CONFIG_BRIDGE_NETFILTER=y
# CONFIG_BRIDGE_NF_EBTABLES is not set
CONFIG_BRIDGE=y
CONFIG_BRIDGE_IGMP_SNOOPING=y
CONFIG_DRM_BRIDGE=y

And I have every config option set suggested in the ebuild (the optinals too), but some of them are as modules.

I have gentoo-sources-4.8.17
I use these flags:

[ebuild   R    ] app-emulation/docker-1.13.0::gentoo  USE="btrfs container-init seccomp -apparmor -aufs -device-mapper -hardened -overlay -pkcs11" 0 KiB

I have this output:

# dockerd -D
DEBU[0000] docker group found. gid: 978                 
DEBU[0000] Listener created for HTTP on unix (/var/run/docker.sock) 
INFO[0000] libcontainerd: new containerd process, pid: 23217 
WARN[0000] containerd: low RLIMIT_NOFILE changing to max  current=1024 max=4096
DEBU[0000] containerd: read past events                  count=0
DEBU[0000] containerd: supervisor running                cpus=6 memory=11960 runtime=docker-runc runtimeArgs=[] stateDir=/var/run/docker/libcontainerd/containerd
DEBU[0000] containerd: grpc api on /var/run/docker/libcontainerd/docker-containerd.sock 
DEBU[0000] libcontainerd: containerd health check returned error: rpc error: code = 14 desc = grpc: the connection is unavailable 
DEBU[0001] Using default logging driver json-file       
DEBU[0001] Golang's threads limit set to 84060          
INFO[0001] [graphdriver] using prior storage driver: btrfs 
DEBU[0001] Using graph driver btrfs                     
DEBU[0001] Max Concurrent Downloads: 3                  
DEBU[0001] Max Concurrent Uploads: 5                    
INFO[0001] Graph migration to content-addressability took 0.00 seconds 
INFO[0001] Loading containers: start.                   
DEBU[0001] Option Experimental: false                   
DEBU[0001] Option DefaultDriver: bridge                 
DEBU[0001] Option DefaultNetwork: bridge                
INFO[0001] Firewalld running: false                     
DEBU[0001] /sbin/iptables, [--wait --version]           
DEBU[0001] /sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER] 
DEBU[0001] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER] 
DEBU[0001] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER] 
DEBU[0001] /sbin/iptables, [--wait -t nat -D PREROUTING] 
DEBU[0001] /sbin/iptables, [--wait -t nat -D OUTPUT]    
DEBU[0001] /sbin/iptables, [--wait -t nat -F DOCKER]    
DEBU[0001] /sbin/iptables, [--wait -t nat -X DOCKER]    
DEBU[0001] /sbin/iptables, [--wait -t filter -F DOCKER] 
DEBU[0001] /sbin/iptables, [--wait -t filter -X DOCKER] 
DEBU[0001] /sbin/iptables, [--wait -t filter -F DOCKER-ISOLATION] 
DEBU[0001] /sbin/iptables, [--wait -t filter -X DOCKER-ISOLATION] 
DEBU[0001] /sbin/iptables, [--wait -t nat -n -L DOCKER] 
DEBU[0001] /sbin/iptables, [--wait -t nat -N DOCKER]    
DEBU[0001] /sbin/iptables, [--wait -t filter -n -L DOCKER] 
DEBU[0001] /sbin/iptables, [--wait -t filter -N DOCKER] 
DEBU[0001] /sbin/iptables, [--wait -t filter -n -L DOCKER-ISOLATION] 
DEBU[0001] /sbin/iptables, [--wait -t filter -N DOCKER-ISOLATION] 
DEBU[0001] /sbin/iptables, [--wait -t filter -C DOCKER-ISOLATION -j RETURN] 
DEBU[0001] /sbin/iptables, [--wait -I DOCKER-ISOLATION -j RETURN] 
DEBU[0001] start clean shutdown of all containers with a 15 seconds timeout... 
DEBU[0001] Cleaning up old mountid : start.             
DEBU[0001] Cleaning up old mountid : done.              
Error starting daemon: Error initializing network controller: list bridge addresses failed: no available network


I guess I have some kernel config / module load problem, but this debug doesn't give me any hint what really failes. ( I tried with empty /var/lib/docker too)
Comment 8 László Szalma 2017-02-01 22:39:45 UTC
When running

# docker -D -b none

The docker daemon starts fine. docker run hello-world runs. But no container using network is working. "could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network" - this is normal without bridging i guess.

So unsurprisingly the problem must be really with the bridge :) I can try anything if you have idea.
Comment 9 László Szalma 2017-02-02 22:08:50 UTC
I installed 1.13.1_rc1 from this overlay (see below) and it works fine. I didn't have time too see the difference, maybe upstream changed something, I don't know. But this suggest that my kernel config is fine, the problem must be in the code itself.

https://github.com/tianon/docker-overlay