Skip to content

Spring cloud function on aws getting connection refused exception from netty #367

@kleung

Description

@kleung

Using version 2.1.0.RELEASE of spring-cloud-function-(core, context, adapter-aws, webflux and web) cause the following stack trace when deployed on aws:

NOTE: I tried both functional and non-function bean registration still ends up the same error.

. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: 

2019-05-19 12:49:53.866 INFO 1 --- [ main] lambdainternal.LambdaRTEntry : Starting LambdaRTEntry on 169.254.103.29 with PID 1 (/var/runtime/lib/LambdaJavaRTEntry-1.0.jar started by sbx_user1051 in /)
2019-05-19 12:49:53.867 INFO 1 --- [ main] lambdainternal.LambdaRTEntry : No active profile set, falling back to default profiles: default
2019-05-19 12:49:56.207 INFO 1 --- [ main] c.t.T.cloudFunction.AuthorizerFunction : context: lambdainternal.api.LambdaContext@4f6ee6e4
2019-05-19 12:49:56.263 INFO 1 --- [ main] c.t.T.cloudFunction.AuthorizerFunction : context: lambdainternal.api.LambdaContext@4f6ee6e4
2019-05-19 12:49:57.968 INFO 1 --- [ main] o.s.c.f.web.source.SupplierExporter : Starting
2019-05-19 12:49:58.347 INFO 1 --- [ main] reactor.Flux.MonoRepeatPredicate.1 : onSubscribe(FluxRepeatPredicate.RepeatPredicateSubscriber)
2019-05-19 12:49:58.350 INFO 1 --- [ main] reactor.Flux.MonoRepeatPredicate.1 : request(256)
2019-05-19 12:49:58.584 INFO 1 --- [ main] lambdainternal.LambdaRTEntry : Started LambdaRTEntry in 6.159 seconds (JVM running for 8.113)
Started
2019-05-19 12:49:58.627 INFO 1 --- [ main] c.t.T.cloudFunction.AuthorizerFunction : ARN: arn:aws:lambda:XXXXXX:XXXXXX:function:XXXXXX
2019-05-19 12:49:58.691 ERROR 1 --- [or-http-epoll-3] reactor.Flux.MonoRepeatPredicate.1 : onError(io.netty.channel.AbstractChannel$AnnotatedConnectException: syscall:getsockopt(..) failed: Connection refused: localhost/127.0.0.1:80)
2019-05-19 12:49:58.705 ERROR 1 --- [or-http-epoll-3] reactor.Flux.MonoRepeatPredicate.1 : 

io.netty.channel.AbstractChannel$AnnotatedConnectException: syscall:getsockopt(..) failed: Connection refused: localhost/127.0.0.1:80
at io.netty.channel.unix.Socket.finishConnect(..)(Unknown Source) ~[task/:na]
Caused by: io.netty.channel.unix.Errors$NativeConnectException: syscall:getsockopt(..) failed: Connection refused
... 1 common frames omitted

I think this is the same issue as stackoverflow post: https://stackoverflow.com/questions/56138363/why-is-my-spring-cloud-function-attempting-to-open-local-http-connections

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions