Skip to content

Docker fails to start with firewalld enabled on CentOS 7.1 #16763

Closed

Description

@cxxly

Description of problem:

After installed docker with Install with the script method on centos7 , I can't start docker daemon with command systemctl start docker .

Information

docker version, docker info:
no result after execute these command.

cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)

uname -a: 
Linux localhost.localdomain 3.10.0-229.14.1.el7.x86_64 #1 SMP Tue Sep 15 15:05:51 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Environment details:
VMWare workstation

Steps to Reproduce:

  1. install docker

    curl -sSL https://get.docker.com/ | sh
    
  2. Start the Docker daemon.

    systemctl start docker  
    Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.  
    
  3. systemctl status docker:

    docker.service - Docker Application Container Engine
       Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
       Active: activating (start) since Mon 2015-10-05 04:43:17 EDT; 11s ago
         Docs: https://docs.docker.com
     Main PID: 30073 (docker)
       CGroup: /system.slice/docker.service
               └─30073 /usr/bin/docker daemon -H fd://
    
    Oct 05 04:43:17 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
    Oct 05 04:43:17 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
    Oct 05 04:43:17 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
    Oct 05 04:43:17 localhost.localdomain docker[30073]: time="2015-10-05T04:43:17.857494433-04:00" level=info msg="[graphdriver] using prior storage driver \"devicemapper\""
    Oct 05 04:43:17 localhost.localdomain docker[30073]: time="2015-10-05T04:43:17.858169372-04:00" level=info msg="Option DefaultDriver: bridge"
    Oct 05 04:43:17 localhost.localdomain docker[30073]: time="2015-10-05T04:43:17.858192797-04:00" level=info msg="Option DefaultNetwork: bridge"
    Oct 05 04:43:17 localhost.localdomain docker[30073]: time="2015-10-05T04:43:17.867660517-04:00" level=warning msg="Running modprobe bridge nf_nat br_netfilter failed with message: modprobe: WARNING: Module br_netfilter not found.\n, error: exit status 1"
    

After I stop firewalld, Then docker daemon start sucessfully

systemctl stop firewalld
systemctl start docker

docker version:
Client:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Thu Sep 10 19:08:45 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Thu Sep 10 19:08:45 UTC 2015
 OS/Arch:      linux/amd64


docker info:
ontainers: 0
Images: 0
Storage Driver: devicemapper
 Pool Name: docker-253:1-134960995-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 1.821 GB
 Data Space Total: 107.4 GB
 Data Space Available: 34.22 GB
 Metadata Space Used: 1.479 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.146 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.93-RHEL7 (2015-01-28)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.10.0-229.14.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 1
Total Memory: 979.7 MiB
Name: localhost.localdomain
ID: APCF:P2ON:RANA:H3P3:TGHF:OBPC:2E3Y:JEDA:6PA4:GCJN:A74B:DRIN
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Activity

  1. changed the title [-]BUG REPORT INFORMATION[/-] [+]Docker fails to start with firewalld enabled on CentOS 7.1[/+] on Oct 5, 2015
  2. thaJeztah commented on Oct 5, 2015

    @thaJeztah
    Member

    @cxxly this looks like the same issue as #15498.

    If I'm correct, this will be resolved with the upcoming 1.9 release (#15832), but as a workaround, you can use the instructions that are described here; #16550

    Could you test if the workaraound in #16550 resolves this for you?

  3. cxxly commented on Oct 7, 2015

    @cxxly
    ContributorAuthor

    @thaJeztah thanks, it's the same issue as #15498, I have tested the workaraound in #16550 and it resolves this. But I think we should make a note at docker document before docker 1.9 release.

  4. thaJeztah commented on Oct 7, 2015

    @thaJeztah
    Member

    @moxiegirl perhaps we should add this as a "known issue" to the release notes for Docker 1.8? I seriously have no idea where that page is generated from though, because the release-notes.md in this repo still states "docker 1.6" ☺️

  5. moxiegirl commented on Oct 7, 2015

    @moxiegirl
    Contributor

    @thaJeztah In general, we wouldn't update the release notes after the release. They went out at a particular point in time and it is normal to expect that issues will be found and reported after a release. Customers have the ability to search these issues. Rather than continue the discussion here, please feel free to IM me with additional thoughts on the topic.

  6. mfischer-zd commented on Oct 15, 2015

    @mfischer-zd

    There's a new problem now, even when docker-selinux is installed. When attempting to access the UNIX domain socket locally (e.g. with docker ps), SELinux denies it:

    type=USER_AVC msg=audit(1444905891.630:422): pid=1438 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_return dest=:1.37 spid=1429 tpid=3988 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:system_r:docker_t:s0 tclass=dbus  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
    

    The good news is that the SELinux policy is fixed in a prerelease update to the package:

    sudo yum -y install http://cbs.centos.org/kojifiles/packages/docker/1.8.1/4.git32b8b25.el7/x86_64/docker-selinux-1.8.1-4.git32b8b25.el7.x86_64.rpm
    
  7. thaJeztah commented on Oct 15, 2015

    @thaJeztah
    Member

    @mfischer-zd would you be able to test if this is resolved for you in the 1.9 release candidate? information can be found in this PR: #17000 (comment)

    Please note that these are release candidates, so use at your own risk, and not on important data :)

  8. mfischer-zd commented on Oct 16, 2015

    @mfischer-zd

    @thaJeztah what changed in 1.9 that would fix it? are you now shipping an SELinux policy manifest that is synchronized with your changes? If so I don't see anything there.

  9. thaJeztah commented on Oct 16, 2015

    @thaJeztah
    Member

    @mfischer-zd see this PR #15832

  10. calavera commented on Mar 3, 2016

    @calavera
    Contributor

    yep, it should be fixed now. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions