Docker Community Forums

Share and learn in the Docker community.

IPv4 forwarding getting disabled intermittently 'net.ipv4.ip_forward = 0'

docker

(1pagedevops) #1

Hi Team,

Here are my server details:

OS Version/build : 3.10.0-514.10.2.el7.x86_64, RHEL Server release 7.3 (Maipo),
App version (Docker) : 1.13.0-1.el7.centos.x86_64
Steps to reproduce : unable to reproduce
Setup : Marathon-Mesos-Docker

Issue:
We am facing this problem on my servers randomly. The setting ‘net.ipv4.ip_forward’ is supposed to be enabled by Docker start by default. But randomly some day it is getting disabled and we start seeing logs “IPv4 forwarding is disabled. Networking will not work.” which affects container deployment.

To recover it we do Docker service restart (planning to write a puppet module temporarily until this is fixed).

Please assist as this is affecting our critical environments.


Here are some log lines from affected servers:

Jun 29 22:12:43 stg-hostname dockerd: time="2017-06-29T22:12:43.818073956-07:00" level=warning msg="[!] DON'T BIN
D ON ANY IP ADDRESS WITHOUT setting -tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!]"
Jun 29 22:12:43 stg-hostname dockerd: time="2017-06-29T22:12:43.831257684-07:00" level=info msg="libcontainerd: n
ew containerd process, pid: 1382"
Jun 29 22:12:44 stg-hostname dockerd: time="2017-06-29T22:12:44.894977719-07:00" level=info msg="Graph migration
to content-addressability took 0.00 seconds"
Jun 29 22:12:44 stg-hostname dockerd: time="2017-06-29T22:12:44.897521722-07:00" level=info msg="Loading containe
rs: start."
Jun 29 22:12:44 stg-hostname dockerd: time="2017-06-29T22:12:44.962186917-07:00" level=info msg="Firewalld runnin
g: false"
Jun 29 22:12:45 stg-hostname dockerd: time="2017-06-29T22:12:45.074680180-07:00" level=info msg="Default bridge (
docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Jun 29 22:12:45 stg-hostname dockerd: time="2017-06-29T22:12:45.134668271-07:00" level=info msg="Loading containe
rs: done."
Jun 29 22:12:45 stg-hostname dockerd: time="2017-06-29T22:12:45.165894814-07:00" level=info msg="Daemon has compl
eted initialization"
Jun 29 22:12:45 stg-hostname dockerd: time="2017-06-29T22:12:45.165949862-07:00" level=info msg="Docker daemon" c
ommit=49bf474 graphdriver=overlay version=1.13.0
Jun 29 22:12:45 stg-hostname dockerd: time="2017-06-29T22:12:45.179694617-07:00" level=info msg="API listen on /v
ar/run/docker.sock"
Jun 29 22:12:45 stg-hostname dockerd: time="2017-06-29T22:12:45.179951247-07:00" level=info msg="API listen on [:
:]:2375"
Jun 29 22:12:58 stg-hostname dockerd: time="2017-06-29T22:12:58.423953797-07:00" level=error msg="Handler for GET
 /v1.25/containers/artf-hostname/ccp-docker-release-local/monitoring/prometheus:v002/json returne
d error: No such container: artf-hostname/ccp-docker-release-local/monitoring/prometheus:v002"
Jun 29 22:12:58 stg-hostname dockerd: time="2017-06-29T22:12:58.562842970-07:00" level=error msg="Handler for GET
 /v1.25/containers/mesos-29f30454-0e2f-436a-abe2-65eefa1f665b-S21.6763bd91-96ce-4006-8033-5d49395bf8ca/json returned e
rror: No such container: mesos-29f30454-0e2f-436a-abe2-65eefa1f665b-S21.6763bd91-96ce-4006-8033-5d49395bf8ca"
Jun 29 22:12:58 stg-hostname dockerd: time="2017-06-29T22:12:58.564564778-07:00" level=warning msg="IPv4 forwarding is disabled. Networking will not work"

Thanks
Rahul


#2

Hi, had the same problem and emailed the CIrcleCI support. He gave a link to the following StackOverflow thread. Hope it’ll help you: https://stackoverflow.com/questions/41453263/docker-networking-disabled-warning-ipv4-forwarding-is-disabled-networking-wil