windows docker 安装kafka

docker run -d --name zookeeper -p 2181:2181 -t wurstmeister/zookeeper

运行zookeeper 出现以下错误提示时:docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:2181: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

依照以下步骤在CMD中解决:

net stop winnat

netsh int ipv4 add excludedportrange protocol=tcp startport=2181 numberofports=1

net start winnat

docker run -d --name kafka --publish 9092:9092  --link zookeeper  --env KAFKA_ZOOKEEPER_CONNECT=192.168.1.117:2181 --env KAFKA_ADVERTISED_HOST_NAME=192.168.1.117  --env KAFKA_ADVERTISED_PORT=9092  wurstmeister/kafka

windows docker 安装kafka

上一篇:微软被泄露的Windows源代码合集(XP)


下一篇:三十六、windows里面jmeter /ant/tomcat 接口自动化