latest update (2/8/21) broke docker in container?

kyriazis

Active Member
Oct 28, 2019
96
4
28
Austin, TX
Hello,

yesterday I just upgraded packages and noticed that docker in my LXC containers stopped working. I found out that now /proc/sys is now mounted read-only inside the container, while previously it was mounted read-write. The errors I got in the container's syslog are:
Code:
Feb  9 16:38:11 <hostname> dockerd[490]: failed to start daemon: Error initializing network controller: error obtaining controller instance: Enabling IP forwarding failed: open /proc/sys/net/ipv4/ip_forward: read-only file system

Is there any way to get around that issue?

thank you!

George
 
Hi George,

on PVE Host:
run: sysctl -w net.ipv4.ip_forward=1
for permanent change, uncomment the "net.ipv4.ip_forward=1" line in /etc/sysctl.conf

Julio
 
Last edited:
  • Like
Reactions: dariuszszyc
Thank you! That worked.

But why was docker working before, with net.ipv4.ip_forward=0 ? What changed? Anything else that might have been affected?
 
Thank you ! I had the same issue and setting ip_forward=1 on PVE Host worked!
I am also wondering what changed as docker used to work fine and suddenly - it stopped .

Interestingly - I didn't upgrade packages on PVE.
 
Old thread but I've done that this way:

Code:
nano /etc/pve/lxc/100.conf
...
lxc.hook.autodev = sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
...

This in order not to enable ip_forward on the complete host.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!