docker Mule-server curl: (56) Recv failure: Connection reset by peer

匿名 (未验证) 提交于 2019-12-03 02:20:02

问题:

This might just be my rookie knowledge of Docker, but I can't get the networking to work.

I'm trying to run a Mule-server via the pr3d4t0r/mule repository. I can run it, hot-swap applications but I can reach it.

I can run a local server without Docker, and it works flawlessly. But not when I try it with Docker.

When I try to do a simple curl command I get "curl: (56) Recv failure: Connection reset by peer"

curl http://localhost:8090/Sven 

I have tried exposing the ports via -P and separately via -p 8090:8090 but no luck.

When the docker is running it blocks the ports (I tried running Docker and the normal server at the same time but the normal one said the ports where already in use).

When I try another Image like jboss/wildfly and I use -p 8080:8080 there's no problem, it works perfectly.

The application in the mule-server will log and respond a simple "hello World", the output says that the application is deployed, but no messages or logging while I try to reach it.

Any suggestions?

回答1:

In my case it was actually the app that was configured incorrectly. It had localhost as host. It should have been 0.0.0.0 without this it was acting only on localhost aka the docker container but not from outside of it.

You should not need to use -net=host.

So check if there's a configuration



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!