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

External API invocation is failing with 502 error #1595

Open
suneelkandali opened this issue Nov 15, 2022 · 0 comments
Open

External API invocation is failing with 502 error #1595

suneelkandali opened this issue Nov 15, 2022 · 0 comments

Comments

@suneelkandali
Copy link

I wrote a Java function with below http client code snippet and deployed to my local Fn then function invocation failed with 502 error

I have Rancher Desktop on my local

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("http://webcode.me"))
.GET() // GET is default
.build();

HttpResponse response = client.send(request,
HttpResponse.BodyHandlers.discarding());

System.out.println(response.statusCode());
Error message in log

time="2022-11-02T21:37:59Z" level=debug msg="Inside Java Hello World function suneel
n" action="server.handleFnInvokeCall)-fm" app_id=01GGVTFKZYNG8G00GZJ0000001 call_id=01GGX4F2ESNG8G00GZJ000000W fn_id=01GGWWQSQGNG8G00GZJ0000006 image="sunkandalidocker/fn-process-aggregator-stream-consumer:0.0.18" user_log=true

time="2022-11-02T21:38:00Z" level=info msg="hot function terminating" app_id=01GGVTFKZYNG8G00GZJ0000001 container_id=01GGX4F2ETNG8G00GZJ000000X cpus= error="Post http://localhost/call: EOF" fn_id=01GGWWQSQGNG8G00GZJ0000006 idle_timeout=30 image="sunkandalidocker/fn-process-aggregator-stream-consumer:0.0.18" memory=128

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