启动userland代理时出错:绑定0.0.0.0:2181:意外错误权限被拒绝

时间:2019-03-10 13:05:50

标签: docker windows-10 apache-zookeeper

仅安装了 Docker Desktop Community ,但无法启动zookeeper。

.woocommerce ul.products li.product {
  width: 25%;
  margin: 0;
  border: 1px solid #f5f5f5;
  padding: 0 15px;
  transition: 
  color .15s ease-in-out,
  background-color .15s ease-in-out,
  border-color .15s ease-in-out,
  box-shadow .15s ease-in-out;
  float: left;
  position: relative;
  list-style: none outside;

  //cut off last div and button from description
  height: 366px;
  overflow: hidden;
}

.woocommerce ul.products li.first {
  clear: both;
}

// hover state
.woocommerce ul.products li.product:hover {
  -webkit-box-shadow: 0px 0px 20px 0px rgba(166, 166, 166, .75);
  -moz-box-shadow:    0px 0px 20px 0px rgba(166, 166, 166, .75);
  box-shadow:         0px 0px 20px 0px rgba(166, 166, 166, .75);
  height: auto;
  overflow: initial;
}

Docker版本

  • 版本2.0.0.3(31259)
  • 渠道稳定
  • 内部版本8858db3
  • 引擎18.09.2

Windows版本

  • Windows 10版本:Microsoft Windows [版本10.0.17763.348]

网络

C:\kafka>docker run --rm -d --name zookeeper --network app-tier -p 2181:2181 -p 3888:3888 zookeeper:latest
Unable to find image 'zookeeper:latest' locally
latest: Pulling from library/zookeeper
8e402f1a9c57: Pull complete
4866c822999c: Pull complete
205f26e90552: Pull complete
99243f6904c1: Pull complete
c6ac2a949410: Pull complete
7c9e37572768: Pull complete
637f41838913: Pull complete
Digest: sha256:7eb73b4f16688bdd6c6594ea3aacbaf31dacc33f7a8ab0d52a4fdc08bc4f919a
Status: Downloaded newer image for zookeeper:latest
1d96e4605efcd0836b9121be75c381195547014bb9d42ea4716c8a1b60068903
docker: Error response from daemon: driver failed programming external connectivity on endpoint zookeeper (48149ba74f7230bef95a5c98ab968498d0f965bede97ada98115384906c06300): Error starting userland proxy: Bind for 0.0.0.0:2181: unexpected error Permission denied.

关于如何解决此问题的任何想法?

1 个答案:

答案 0 :(得分:2)

在端口2181上使用Zookeeper几个月后,我遇到了同样的问题。我无法弄清楚为什么它没有绑定到端口2181,因为我以admin身份运行netstat -aon | findstr '2181'并且没有任何结果。我最终得出的结论是,即使未列出该端口,该端口实际上仍在使用中。我发现仍然使用端口2181的解决方案(这对于我的应用程序至关重要):

通过网络以安全模式启动Windows

在powershell / cmd中运行命令netsh int ipv4 add excludedportrange protocol=tcp startport=2181 numberofports=1,该命令将保留端口2181,因此,当您引导回到正常的Windows模式时,没有应用程序会盗用该端口。

启动进入常规窗口并启动Zookeeper。有了这个,就不会有绑定问题!