Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
davetayl opened this issue Apr 16, 2023 · 1 comment
Closed

Comments

@davetayl
Copy link

davetayl commented Apr 16, 2023

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.

@davetayl
Copy link
Author

Ok so checked and not an MTU issue, this really has me stumped,

@davetayl davetayl closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant