curl: (52) Empty reply from server with SAM local invoke. #3016
Labels
area/local/invoke
sam local invoke command
stage/needs-investigation
Requires a deeper investigation
type/bug
Description:
I spend a lot of time tackling this problem, but it seems not sensible at all,
I have tried to build an AWS lambda function based on Custom Docker images, and I prepared the images well, and it works fine on my PC (with sam local invoke) and return the expected output, but I moved the files to EC2, and re-built the image, but when to test it locally it didn't work, the idea is simple, when invoking the image, there is Splash webdriver star and listen to http://0.0.0.0:8050 then go running the app.handler using RIE, and handler just making a request through splash by redirecting the request of the site using http://0.0.0.0:8050, but the response of curl was (52) Empty reply from server, which means there is a problem with that IP or port (not responding from server), but the same task works very well on my pc without this issue.
Steps to reproduce:
here is my Dockerfile
entery_point.sh
app.py
Observed result:
Expected result:
I know that the function returns the expected results, but the problem it's not work as expected, I have used the same image once on the local pc, and it works correctly and as expected (with sam and with docker), once on EC2, but the above problem happened, and i tried to deploy it, but the same problem happened.
I also tried to mimic the same task to run it using docker, by making a file that starts Splash then makes curl request, and name it main, then run the docker image using
docker run --rm -it --entrypoint python3 lambda-splash:latest main.py
and it returned the expected output well, so that means the problem, not in the Docker network, it seems in RLE,
any ideas ?
Additional environment details (Ex: Windows, Mac, Amazon Linux, etc)
sam --version
: SAM CLI, version 1.25.0Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: