infinyon / fluvio

Lean and mean distributed stream processing system written in rust and web assembly. Alternative to Kafka + Flink in one.
https://www.fluvio.io/
Apache License 2.0
3.79k stars 503 forks source link

Socket io Connection Error when connecting to fluvio running in docker compose #3916

Closed chokosabe closed 5 months ago

chokosabe commented 6 months ago

When using a service running in docker (arroyo in this instance) to connect to a fluvio instance running in docker. Keep getting an error from the fluvio client: fluvio::producer::partition_producer: Failed to flush producer: Socket error: Socket io Connection refused (os error 111), can't connect to 0.0.0.0:9110

You would expect to be able to connect to the service from another docker instance

Setup is fluvio running in docker compose and another service running on a different docker instance

digikata commented 6 months ago

The default instructions are for a reference configuration of a docker compose service running on a local machine, with a client connecting from the machine. Your described setup is a requires different network addressing.

Depending on the network setup of your docker container vs the docker compose service, you need to change the registered public address of the spu. This line in the docker compose is what sets that address.

fluvio cluster spu register --id 5001 -p 0.0.0.0:9110 --private-server spu:9011.

The -p <dns or ip:port> is what is given to clients to connect to the spu. If your fluvio-client container is bridged to cluster service, you need to provide an address within that bridge network. e.g. maybe spu:9010 or some other variation.

digikata commented 5 months ago

Closing as stale