You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint #26
The I/O is buffered. You should see the messages if you add std::cout.flush() at the end, or append << std::endl which has the side-effect of flushing.
Are you seeing the message [ERROR] [1553201323958] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint in your logs on every invocation? or sometimes?
I'd like to get more data on this to diagnose what's happening.
@marcomagdy sorry for delay, this is my personal github account, i see this in every invocation, "all works fine" but in see that message in every invocation, let me know what data you need if you want i can share the code of my function
"all works fine" but in see that message in every invocation
Me, too.
Every Lambda invocation starts out like this:
Lambda function invocation starting.
[WARN] 2019-07-03 22:05:46 FileSystemUtils [139730358032256] Home dir not stored in environment, trying to fetch manually from the OS.
Lambda function calling Lambda runtime.
START RequestId: cb1f23f2-4df9-4093-985c-d2a49d2f9354 Version: $LATEST
[ERROR] [1562191546320] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
Entering my_handler.
[...]
And, for Lambda invocations which get reused, it shows up on the next invocation too:
[...]
END RequestId: f1be42e8-84e2-4ca5-b877-3ac84d33b9d1
REPORT RequestId: f1be42e8-84e2-4ca5-b877-3ac84d33b9d1 Init Duration: 202.89 ms Duration: 9216.62 ms Billed Duration: 9500 ms Memory Size: 256 MB Max Memory Used: 80 MB
START RequestId: 384e8a2e-2230-4642-81db-c91f725f8e69 Version: $LATEST
[ERROR] [1562191572175] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
Entering my_handler.
[...]
Also, the warning:
[WARN] 2019-07-03 22:05:44 FileSystemUtils [140509995136896] Home dir not stored in environment, trying to fetch manually from the OS.
shows up at various points, as well, apparently without negative effect.
@webbnh the last warning is from the AWS SDK. Not Lambda. @samuaz I'm unable to reproduce the problem, and I feel it's yet-another-libcurl-problem that does not happen when using a different libcurl version.
I'm going to resolve all the libcurl problems by bundling a good version with this runtime.
The problem is I need to reproduce the problem and I haven't been able to so far.
What version of libcurl are you using?
If a newer version of libcurl resolves this issue, I will put up a PR that builds a known good version of libcurl and link to it as a CMake option.
But I need your help to make sure that's the root cause first.
Try building the latest release of libcurl from source and install it somewhere on your system that doesn't conflict with your OS (pass --prefix /home//my-libcurl-install to the configure command) and then build the runtime normally and pass -DCMAKE_PREFIX_PATH="/home/<username>/my-libcurl-install" to your CMake command.
Meanwhile, I will try to reproduce with libcurl 7.47.0
Which distro does that come as a default with btw?
I'm trying to run the demo example from the docs and I'm facing the same error. here is what I found:
First, I got this error:
[ERROR] [1660998782441] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
[ERROR] [1660998782581] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
[ERROR] [1660998782664] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
[ERROR] [1660998782664] LAMBDA_RUNTIME Exhausted all retries. This is probably a bug in libcurl v7.68.0 Exiting!
After I grep the runtime source code, I found that this is comming from here:
logging::log_error(LOG_TAG, "Failed to get next invocation. No Response from endpoint");
But the actual CURL "error" is just logged as a debug level log (which IMHO shouldn't be a debug level. it should be an error level message. No error context must be truncated...)
logging::log_debug(LOG_TAG, "CURL returned error code %d - %s", curl_code, curl_easy_strerror(curl_code));
So after recompiling my lambda with -DAWS_LAMBDA_LOG=2 (maybe it would be better to have a runtime log level configuration instead of needing to recompile it, but well... let's focus on the problem here...) I got the missing context:
[INFO] [1660999392927] LAMBDA_RUNTIME Initializing the C++ Lambda Runtime version 0.0.0
[DEBUG] [1660999392928] LAMBDA_RUNTIME Making request to http:///2018-06-01/runtime/invocation/next
[DEBUG] [1660999392960] LAMBDA_RUNTIME CURL DBG: Could not resolve host: 2018-06-01
[DEBUG] [1660999392960] LAMBDA_RUNTIME CURL DBG: Closing connection 0
[DEBUG] [1660999392960] LAMBDA_RUNTIME Completed request to http:///2018-06-01/runtime/invocation/next
[DEBUG] [1660999392960] LAMBDA_RUNTIME CURL returned error code 6 - Couldn't resolve host name
[ERROR] [1660999392960] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
[DEBUG] [1660999392960] LAMBDA_RUNTIME Making request to http:///2018-06-01/runtime/invocation/next
[DEBUG] [1660999392988] LAMBDA_RUNTIME CURL DBG: Could not resolve host: 2018-06-01
[DEBUG] [1660999392988] LAMBDA_RUNTIME CURL DBG: Closing connection 1
[DEBUG] [1660999392988] LAMBDA_RUNTIME Completed request to http:///2018-06-01/runtime/invocation/next
[DEBUG] [1660999392988] LAMBDA_RUNTIME CURL returned error code 6 - Couldn't resolve host name
[ERROR] [1660999392988] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
[DEBUG] [1660999392988] LAMBDA_RUNTIME Making request to http:///2018-06-01/runtime/invocation/next
[DEBUG] [1660999393011] LAMBDA_RUNTIME CURL DBG: Could not resolve host: 2018-06-01
[DEBUG] [1660999393011] LAMBDA_RUNTIME CURL DBG: Closing connection 2
[DEBUG] [1660999393011] LAMBDA_RUNTIME Completed request to http:///2018-06-01/runtime/invocation/next
[DEBUG] [1660999393011] LAMBDA_RUNTIME CURL returned error code 6 - Couldn't resolve host name
[ERROR] [1660999393011] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
[ERROR] [1660999393011] LAMBDA_RUNTIME Exhausted all retries. This is probably a bug in libcurl v7.68.0 Exiting!
Clearly requesting http:///2018-06-01/runtime/invocation/next would never going to work (and it's not a curl issue either). After checking the source how I set's this URL I found that the runtime creates this endpoint based on the environment variable AWS_LAMBDA_RUNTIME_API which, in my case, is clearly empty.
if (auto* ep = std::getenv("AWS_LAMBDA_RUNTIME_API")) {
I'm wondering if this environment variable is required for this runtime to work. Because if it is, we get no clue about it just from the logs... Maybe this runtime could improve the logging about this of better handling the endpoint configuration/setting process to avoid this confusion.
Thanks for the tip, marcomagdy!
Just tried running locally on my machine. That explains a lot =)
Sorry if this is dummy... I was just curious what would happen before uploading it to AWS. So I got these messages and found this issue. I'm a total beginner on aws lambda too.
Activity
marcomagdy commentedon Apr 9, 2019
The I/O is buffered. You should see the messages if you add
std::cout.flush()at the end, or append<< std::endlwhich has the side-effect of flushing.marcomagdy commentedon Apr 9, 2019
Are you seeing the message
[ERROR] [1553201323958] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpointin your logs on every invocation? or sometimes?I'd like to get more data on this to diagnose what's happening.
samuaz commentedon Apr 24, 2019
@marcomagdy sorry for delay, this is my personal github account, i see this in every invocation, "all works fine" but in see that message in every invocation, let me know what data you need if you want i can share the code of my function
webbnh commentedon Jul 3, 2019
Me, too.
Every Lambda invocation starts out like this:
And, for Lambda invocations which get reused, it shows up on the next invocation too:
Also, the warning:
shows up at various points, as well, apparently without negative effect.
marcomagdy commentedon Sep 14, 2019
@webbnh the last warning is from the AWS SDK. Not Lambda.
@samuaz I'm unable to reproduce the problem, and I feel it's yet-another-libcurl-problem that does not happen when using a different libcurl version.
I'm going to resolve all the libcurl problems by bundling a good version with this runtime.
deepak-1530 commentedon Dec 9, 2019
@marcomagdy Curious to see when this will be resolved. I am also stuck at the same spot
marcomagdy commentedon Dec 9, 2019
The problem is I need to reproduce the problem and I haven't been able to so far.
What version of libcurl are you using?
If a newer version of libcurl resolves this issue, I will put up a PR that builds a known good version of libcurl and link to it as a CMake option.
But I need your help to make sure that's the root cause first.
deepak-1530 commentedon Dec 9, 2019
I am using version 7.47.0
marcomagdy commentedon Dec 9, 2019
Try building the latest release of libcurl from source and install it somewhere on your system that doesn't conflict with your OS (pass --prefix /home//my-libcurl-install to the configure command) and then build the runtime normally and pass
-DCMAKE_PREFIX_PATH="/home/<username>/my-libcurl-install"to your CMake command.Meanwhile, I will try to reproduce with libcurl 7.47.0
Which distro does that come as a default with btw?
webbnh commentedon Dec 10, 2019
That's a Docker container built from
ubuntu:16.04withapt-get install -y libcurl4-openssl-dev.david-wb commentedon Dec 16, 2021
Any luck with this? I'm having the same issue in a python lambda.
AltafHussain4748 commentedon Aug 18, 2022
@david-wb
How did you solve that?
hbobenicio commentedon Aug 20, 2022
I'm trying to run the demo example from the docs and I'm facing the same error. here is what I found:
First, I got this error:
After I grep the runtime source code, I found that this is comming from here:
aws-lambda-cpp/src/runtime.cpp
Line 243 in 095ff84
But the actual CURL "error" is just logged as a debug level log (which IMHO shouldn't be a debug level. it should be an error level message. No error context must be truncated...)
aws-lambda-cpp/src/runtime.cpp
Line 242 in 095ff84
So after recompiling my lambda with
-DAWS_LAMBDA_LOG=2(maybe it would be better to have a runtime log level configuration instead of needing to recompile it, but well... let's focus on the problem here...) I got the missing context:Clearly requesting
http:///2018-06-01/runtime/invocation/nextwould never going to work (and it's not a curl issue either). After checking the source how I set's this URL I found that the runtime creates this endpoint based on the environment variableAWS_LAMBDA_RUNTIME_APIwhich, in my case, is clearly empty.aws-lambda-cpp/src/runtime.cpp
Line 405 in 095ff84
I'm wondering if this environment variable is required for this runtime to work. Because if it is, we get no clue about it just from the logs... Maybe this runtime could improve the logging about this of better handling the endpoint configuration/setting process to avoid this confusion.
marcomagdy commentedon Aug 20, 2022
That environment variable is set by AWS. See https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime
I am not 100% sure how that environment variable is empty for you.
hbobenicio commentedon Aug 20, 2022
Thanks for the tip, marcomagdy!
Just tried running locally on my machine. That explains a lot =)
Sorry if this is dummy... I was just curious what would happen before uploading it to AWS. So I got these messages and found this issue. I'm a total beginner on aws lambda too.