Akkaserverless proxy unable to connect to emulator : Connection refused error

Upon running “docker compose up” on akkaseverless-archtype project start akkaserless proxy and pub/sub emulator. all functionality work fine except publishing to pub/sub emulator broker/topic.

PS : emulator start fine with following log. “INFO: Server started, listening on 8085”.

Following message is seen in proxy log.
“Caused by: io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(…) failed: Connection refused: localhost/\nCaused by: java.net.ConnectException: finishConnect(…) failed: Connection refused\n\tat io.grpc.netty.shaded.io.netty.channel.unix.Errors.throwConnectException”.

Any help on this

I got this error (similar) earlier and the reason for that was because I had already started a pubsub emulator through gcloud beta emulators pubsub start --project=test --host-port= Once that was taken care of, I had to restart docker process otherwise I was getting the same error.


I had the same issue but what was missing for me was

PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator

in the environment section in the yaml file. However this appears to be fixed in later version but I wanted to comment anyways just in case it ends up helping someone.