2

This is related to question bash: C:/Program: No such file or directory

I am using Git Bash in Windows 10 and following the example/tutorial for Debezium for MSSQL Server that is found here: https://github.com/debezium/debezium-examples/blob/master/tutorial/README.md#using-sql-server

When I run the following command:

docker-compose -f docker-compose-sqlserver.yaml exec kafka /kafka/bin/kafka-console-consumer.sh \--bootstrap-server kafka:9092 \--from-beginning \--property print.key=true \--topic server1.dbo.customers

I get the following error:

the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'

When I type the following command:

winpty docker-compose -f docker-compose-sqlserver.yaml exec kafka /kafka/bin/kafka-console-consumer.sh --bootstrap-server kafka:9092 --from-beginning --property print.key=true --topic server1.dbo.customers

I get the following error:

OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"C:/Program Files/Git/kafka/bin/kafka-console-consumer.sh\": stat C:/Program Files/Git/kafka/bin/kafka-con sole-consumer.sh: no such file or directory": unknown

Why is this happening and what is the fix?

UPDATE:

I am able to run the same command in Visual Studio Code's terminal window. The problem appears to be terminal specific. Can anyone expand on why the same command is treated differently across terminal environments?

Note: It would have been really helpful if the creator had provided and example for Windows 10 / Powershell users. I have posted a related question on what this script would like in Powershell v5.1 here: How to write the following script in Powershell

J Weezy
  • 3,507
  • 3
  • 32
  • 88

0 Answers0