1

While going through the apache official page

https://kafka.apache.org/quickstart

A text file is created as

echo -e "foo\nbar" > test.txt

And to use kakfa connect following command is used

bin/connect-standalone.sh config/connect-standalone.properties config/connect-file-source.properties config/connect-file-sink.properties

But while above command gets executed it shows a message kafka-connect stopped

enter image description here

OneCricketeer
  • 126,858
  • 14
  • 92
  • 185
  • [**Do not post images of code or errors!**](https://meta.stackoverflow.com/q/303812/995714) Images and screenshots can be a nice addition to a post, but please make sure the post is still clear and useful without them. If you post images of code or error messages make sure you also copy and paste or type the actual code/message into the post directly. – Rob Jun 04 '18 at 12:25
  • Yes, already all the codes and page description is mentioned in the question along with problem screen shot for clearance @Rob Thank you – RAHUL KUMAR Jun 04 '18 at 12:27
  • `Address already in use`... Not a Kafka problem. You're running something else that conflicts with it – OneCricketeer Jun 04 '18 at 13:08
  • @cricket_007 I killed the initial `test` topic created, deleted the offsets then started kafka again it is showing `WARN FAILED org.eclipse.jetty.server.Server@652ce654: java.net.BindException: Address already in use` and `Kafka Connect stopped` . How to rectify this ? – RAHUL KUMAR Jun 05 '18 at 09:17
  • You must stop the other process running on that port. I cannot tell you what that is based on the information provided. Your port is 8083 https://stackoverflow.com/a/12737392/2308683 You *could* change the Kafka Connect port... Look in the property files for 8083, and pick a different number like 8084 – OneCricketeer Jun 05 '18 at 12:11
  • See my answer on https://stackoverflow.com/questions/50698358/how-to-change-the-kafka-connect-port – OneCricketeer Jun 06 '18 at 01:17
  • Possible duplicate of [How to change the "kafka connect" component port?](https://stackoverflow.com/questions/50698358/how-to-change-the-kafka-connect-component-port) – Keet Sugathadasa Nov 13 '18 at 20:23

1 Answers1

3

Something else is using the same port that Kafka Connect wants to use.

You can use netstat -plnt to identify the other program (you'll need to run it as root if the process is owned by a different user).

If you want to get Kafka Connect to use a different port, edit config/connect-standalone.properties to add:

rest.port=18083

Where 18083 is an available port.

Robin Moffatt
  • 22,478
  • 3
  • 38
  • 64