简体   繁体   English

码头工人微服务err_connection_refused

[英]docker microservice err_connection_refused

I'm trying to test a microservice running from docker. 我正在尝试测试从docker运行的微服务。

Without docker I can access it on http://localhost:9999/ 没有docker,我可以在http://localhost:9999/上访问它

When I build the image, run it and try the same address http://localhost:9999/ I get err_connection_refused 构建映像时,运行它并尝试使用相同的地址http://localhost:9999/我得到err_connection_refused

In my dockerfile I 在我的dockerfile中

EXPOSE 9999

And when running the image I map ports 当运行图像时,我会映射端口

docker run -i -t 6bcb62617b00 -p 9999:9999

But this dosn't help. 但这无济于事。

`Docker-machine` ls returns `tcp://192.168.99.100:2376`

I am using docker quickstart terminal for testing. 我正在使用docker quickstart终端进行测试。 This is the message I get when running the image Tomcat started on port(s): 9999 这是我Tomcat started on port(s): 9999运行图像Tomcat started on port(s): 9999时收到的消息

docker ps 码头工人ps 在此处输入图片说明

Seems like it had something to do with the way I run it. 似乎它与我的运行方式有关。 Here 这里

docker run -d --network=name -p 9999:9999 beeline/dim_source_taxon

Instead of image id I use repository to start microservice and when I try 我使用存储库来启动微服务,而我尝试时使用的不是图像ID

docker ps

I get 我懂了 在此处输入图片说明

Also, instead of localhost I have to use the host provided by comand docker-machine ls 另外,除了localhost我还必须使用comand docker-machine ls提供的主机

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 春季ERR_CONNECTION_REFUSED - Spring ERR_CONNECTION_REFUSED Stackify 前缀 sfclient ERR_CONNECTION_REFUSED - Stackify Prefix sfclient ERR_CONNECTION_REFUSED Tomcat管理器ERR_CONNECTION_REFUSED - Tomcat manager ERR_CONNECTION_REFUSED Selenium/TestBench 失败:net::ERR_CONNECTION_REFUSED - Selenium/TestBench failure: net::ERR_CONNECTION_REFUSED Spring 引导应用程序:net::ERR_CONNECTION_REFUSED - Spring Boot application: net::ERR_CONNECTION_REFUSED org.openqa.selenium.WebDriverException:未知错误:.net::ERR_CONNECTION_REFUSED - org.openqa.selenium.WebDriverException: unknown error: net::ERR_CONNECTION_REFUSED 从OncePerRequestFilter(Java + Spring)抛出与net :: ERR_CONNECTION_REFUSED不同的错误 - Throw different error than net::ERR_CONNECTION_REFUSED from OncePerRequestFilter ( Java + Spring ) tomcat10主页无法通过键入localhost加载:8080错误:ERR_CONNECTION_REFUSED - tomcat10 home page can not load by typing localhost:8080 error: ERR_CONNECTION_REFUSED 在 IIS 服务器上运行的 Angular FE:对 http://localhost:8080/api 的 POST 请求生成 net::ERR_CONNECTION_REFUSED - Angular FE running on IIS server: POST request to http://localhost:8080/api generates net::ERR_CONNECTION_REFUSED 如果我在春季使登录页面使用'https',如何避免错误102(net :: ERR_CONNECTION_REFUSED)? - If I make my login page use 'https' in Spring, how do I avoid Error 102 (net::ERR_CONNECTION_REFUSED)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM