• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Docker with Kafka Error Connection to node -1 (localhost/127.0.0.1:9092) could not be established.

 
Ranch Hand
Posts: 666
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to run a producer connecting to Kafka though docker, Keep getting the following error

Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available.


I think this is the problem

I have set up for Kafka
From the logs


But for producer logs I have


bootstrap server should be set to kafka:19092

So in my applications.yml I have



So my first question is why is  bootstrap-servers defaulting to localhost 9092


I have set up a docker-compose.yaml



it builds and runs the 3 images



 
Tony Evans
Ranch Hand
Posts: 666
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The full logging

 
Tony Evans
Ranch Hand
Posts: 666
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Tony Evans
Ranch Hand
Posts: 666
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Tony Evans
Ranch Hand
Posts: 666
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My bad, so deep in docker compose I forgot to gradle build
 
reply
    Bookmark Topic Watch Topic
  • New Topic