Error connecting to node ip-172-31-3-158.ap-northeast-2.compute.internal:9092 (id: 0 rack: null) java.net.UnknownHostException
/confluent/etc/kafka/server.properties
advertised.listeners=PLAINTEXT://localhost:9092
[kafka-producer-network-thread | producer-1] INFO org.apache.kafka.clients.Metadata - [Producer clientId=producer-1] Resetting the last seen epoch of partition simple-topic-0 to 0 since the associated topicId changed from null to WOJgSyYMTDWMoFJDJj10Qw
[kafka-producer-network-thread | producer-1] INFO org.apache.kafka.clients.Metadata - [Producer clientId=producer-1] Cluster ID: Zz7rQyY-SdaOgNgR3nSCuw
[kafka-producer-network-thread | producer-1] INFO org.apache.kafka.clients.NetworkClient - [Producer clientId=producer-1] Node 0 disconnected.
[kafka-producer-network-thread | producer-1] WARN org.apache.kafka.clients.NetworkClient - [Producer clientId=producer-1] Connection to node 0 (localhost/127.0.0.1:9092) could not be established. Broker may not be available.
났지만 해결해서 바로 결과
ec2에서 실행하는 경우에는 advertised.listeners를 public ip로 설정하고, SG도 열어줘야 가능했다!