Can i run multiple instances of kafka streams application under same and different machines

I am trying to run multiple instances of my kafka streams application on different machines but getting following error:

Could not lock global state directory. This could happen if multiple KafkaStreams instances are running on the same host using the same state directory.
kstream-test-prod-6f9bc47d9c-bmq2z: org.apache.kafka.streams.errors.LockException: Failed to lock the global state directory: /tmp/kafka-streams/test-app/global

This is predictable in case i launch more than 1 instance on same machine, but here i am launching them on different machines, still getting the same issue.

Read more here: Source link