Skip to content
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

[BUG] ConnectionReset on AWS lambda - registry #647

Open
ruivitit opened this issue Jan 27, 2025 · 3 comments
Open

[BUG] ConnectionReset on AWS lambda - registry #647

ruivitit opened this issue Jan 27, 2025 · 3 comments
Labels

Comments

@ruivitit
Copy link

Describe the bug
When running graphistry on a lambda (in this case using a Docker container) I have a ConnectionResetError on the registry step.
If I run the code locally, the issue does not occur.

To Reproduce
Code, including data, than can be run without editing:

import graphistry
graphistry.register(api=3,  personal_key_id="123123", personal_key_secret="123123")

Expected behavior
I should be able to successfully register.

Actual behavior
I get the ConnectionResetError (see screenshot attached).

Screenshots
Image

Browser environment (please complete the following information):

  • OS: Docker Lambda Environment
  • Browser N/A
  • Version: N/A

Graphistry GPU server environment

  • Where run: AWS Docker Lambda
  • If self-hosting, Graphistry Version: N/A

PyGraphistry API client environment

  • Version: 0.35.4
  • Python Version: 3.10

Additional context
There is connection to hub.graphistry.com since I've performed two validations:

  1. On another lambda (same network configuration), I can curl the endpoint with no problems.
  2. All network traffic is accepted (confirmed by looking at the VPC Flow Logs)
@ruivitit ruivitit added the bug label Jan 27, 2025
@lmeyerov
Copy link
Contributor

lmeyerov commented Jan 27, 2025

Interesting!

graphistry.register(api=3, protocol='https', server='hub.graphistry.com', ...

@ruivitit
Copy link
Author

  • Did you test a curl from the same process, docker container, or host? It may be the docker container / network is locked down somehow...

Yes, I've performed a curl from my machine, from a regular lambda, from a docker container.
I always get a response from hub.graphistry.com.

  • Does the same docker image succeed when run locally?

Yes.

  • What happens if you add a retry?

Actually didn't try that, but not sure why a retry would be needed.

Previous iteration of this code had the server and/or protocol specified, always the same result. I've pretty much tried every combination of parameters of the register function.

I get a connection successfull.

@lmeyerov
Copy link
Contributor

So the python httpx version works from the serverless, while request-based (pygraphistry default) doesn't?

It's hard to imagine what is different there, that sounds like a client env thing. For example, I think request obeys SOCKS proxy overrides, while httpx might not. It does point to a client issue vs server issue, but I'm still confused if a pygraphistry bug or your python env / server setup, like the SOCKS issue

  • I wonder if some sort of telemetry can help here, like a way to capture the outbound request and compare it to a regular curl from the same box. So we can compare working vs non-working

  • Another idea can be to have the docker container python process call curl via a popen/exec shell out

  • We don't have an easy reproducible on our end, so been tricky to help. Maybe there is a way you can make a minimal repro, including lambda automation? Ideally using stock base images to avoid security issues etc on our end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants