Skip to content

urequests issue OSError: [Errno 103] ECONNABORTED possible MTU issue #645

@davetayl

Description

@davetayl

I've been trying to get a fairly simple requests function working

    @property
    def alm_state(self):
        payload = '[{"cmd":"GetAlarm", "action": 1, "param":{"Alarm": {"type": "md", "channel": 0}}}]'
        return urequests.post(f'http://{self.ip}/api.cgi?cmd=GetAlarm&token={self.api_token}', json=payload).json()

However the issue I think is with the network being unable to respond to lower MTU paths
If I do a simple requests to a HTTP endpoint on the LAN everything works as expected, however if I do one to a HTTP endpoint over a VPN I get an error.

urequests.post("http://192.168.4.5")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "urequests.py", line 120, in post
  File "urequests.py", line 60, in request
OSError: [Errno 103] ECONNABORTED

Public websites are mostly ok and local HTTP endpoints are ok.

>>> urequests.post("http://10.16.4.1")
<Response object at 3fff0890>
>>> urequests.post("http://www.cisco.com")
<Response object at 3fff12f0>
>>>

I looked into the network library but there is no option to change MTU. I suspect that the network stack on the NodeMCU boards at least is unable to respond to MTU changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions