【问题标题】:EventStore Docker Running but cannot access URL from host - port not workingEventStore Docker 正在运行,但无法从主机访问 URL - 端口不工作
【发布时间】:2020-10-27 19:43:35
【问题描述】:

我是第一次深入研究 Docker 容器的世界。 我的主机环境是 VM 上的 Windows 10 Enterprise。 我能够启动 docker 并使用 Linux 容器模式。 Docker 引擎:v19.03.8

从 Evenstore 容器开始 -

 [https://github.com/EventStore/eventstore-docker][1]

我已经创建了一个撰写文件

version: '3.8'

services:

  eventstore:
    container_name: productservice-eventstore
    image: eventstore/eventstore
    ports:
        - 2113:2113
        - 1113:1113
    environment:
      - EVENTSTORE_EXT_HTTP_PORT=2113
      - EVENTSTORE_EXT_TCP_PORT=1113 
      - EVENTSTORE_DEV=true

我正在开发中运行 Eventstore 以避免 TLS 要求

容器启动并显示为在 docker 仪表板中运行,但我无法使用访问 UI

http://localhost:2113/

enter code here
This site can’t be reachedlocalhost refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

从文档中我了解到 -P 2113:2113 会进行端口转发。 我什至将外部端口更改为 8085,但仍然无法使用。

我需要帮助从主机 VM 访问 Eventstore ui。

问题 2) 我们可以通过compose文件(环境变量)为EventStore容器分配一个外部IP地址,可以直接在主机中使用而不是映射。

如果您需要日志中的信息,请告诉我

****** 编辑 1*****

在我的回答中完成了撰写文件的更改后,我能够让 UI 在 Edge 中工作,但出现一些错误

A) 微软边缘

2)

B) 铬

来自 Power Shell:

productservice-eventstore | ========================================================================================================
productservice-eventstore | DEVELOPMENT MODE IS ON. THIS MODE IS *NOT* INTENDED FOR PRODUCTION USE.
productservice-eventstore | WHEN IN DEVELOPMENT MODE EVENT STORE WILL
productservice-eventstore |  - NOT WRITE ANY DATA TO DISK.
productservice-eventstore |  - USE A SELF SIGNED CERTIFICATE.
productservice-eventstore | ========================================================================================================
productservice-eventstore |
productservice-eventstore | [    1, 1,13:43:36.155,INF]
productservice-eventstore | INTERFACES
productservice-eventstore | External TCP (Protobuf)
productservice-eventstore |     Enabled : True
productservice-eventstore |     Port    : 1113
productservice-eventstore | HTTP (AtomPub)
productservice-eventstore |     Enabled : True
productservice-eventstore |     Port    : 2113

尝试使用 edge 或 chrome 从主机访问时

productservice-eventstore | [    1,33,14:12:31.955,ERR] Client certificate validation error: "The certificate provided by the client failed validation with the following error(s): RemoteCertificateChainErrors (PartialChain)

**问题 3 **

可以下载自签名证书并添加到客户端信任模式吗?

【问题讨论】:

    标签: docker-compose portforwarding eventstoredb


    【解决方案1】:

    所以我一直在尝试在 google 中搜索不同的方式,并在 Eventstore Github 中发现了一个问题,它为我提供了很好的方向

    https://github.com/EventStore/EventStore/issues/2547

    Davide Guida 有类似的问题,Pieter Germishuys 的回答帮助了我

    command: --dev --enable-external-tcp --ext-ip=0.0.0.0 --int-ip=0.0.0.0 --disable-external-tcp-tls
    

    具体来说

    --enable-external-tcp 
    

    终于让我好好休息了。

    由于需要证书,问题没有完全解决,我期望在开发模式下运行时不需要证书

    【讨论】:

    • 20.6.1(您可以在夜间构建中获得)在开发模式下禁用 SSL 和 TLS。
    猜你喜欢
    • 2015-01-12
    • 2023-04-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-03
    • 2016-04-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多