curl peer disconnects inside lxd container

Bug #2003936 reported by Lawrence
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-meta (Ubuntu)
New
Undecided
Unassigned

Bug Description

Repro steos

I have an (intermittent) issue when running curl/git inside an lxd container, the command always will interrupt with some kind of error due to peer disconnect e.g. "curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104". Outside the lxd container i.e. on ubuntu machine itself the same resource download without a problem.

```
# install and configure a virtual machine with ubuntu and configure it with bridged network, then install lxd on the vm with default configuration i.e. install network bridge lxdbr0 and run curl command.
sudo snap install lxd
sudo lxd init
sudo lxc launch images:ubuntu/focal wired-bluejay
sudo lxc exec wired-bluejay -- curl -o dart-sdk-linux-x64.zip https://storage.googleapis.com/flutter_infra_release/flutter/472e34cbbcd461c748973e7e735558ab200d4f5e/dart-sdk-linux-x64.zip
```

```
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  8 246M 8 20.8M 0 0 2780k 0 0:01:30 0:00:07 0:01:23 2951k
curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104
```

Additional information:

I discovered the issue under an wsl installation of ubuntu. Initially I wasn't able reproduce with on an virtual machine (fresh ubuntu 22.10), but recently discovered I *can* reproduce the behavior when the network adapter on the vm (virtualbox) is switched to bridged. Identical behavior manifests.

I stated above the issue is intermittent, with wsl I observed that only in two out of three networks the undesired behavior manifested. The networks are provided by the same internet service provider with same router models and assumed same network configuration.

I reported the bugs prior to other places:

- https://github.com/microsoft/WSL/issues/9427
- https://discuss.linuxcontainers.org/t/curl-git-dont-work-properly-inside-an-lxd-container-on-wsl-ubuntu-instance-and-disconnects-frequently/16036/3

Revision history for this message
Lawrence (phr34k) wrote :

I've recently circled back to lxc due to snapcraft again and discovered that this problem seems related to physical network i.e. the wifi signal strength. In my home setup, I have two access points, one isp provided router, and a ubiquity access point. I was able to repeatedly reproduce curl and git failing from my isp provided router, the ubuquity access point fine when at full stength.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.