Docker Mule-server curl: (56) Error Recv: connection reset from user

It may be just my Docker know-how, but I can't get the networks to work.

I am trying to start the Mule server through the pr3d4t0r / mule repository. I can run it, hot swappable applications, but I can achieve this.

I can start the local server without Docker and it works flawlessly. But not when I try it with Docker.

When I try to run a simple curl command, I get "curl: (56) Error Recv: Connection reset by peer"

curl http://localhost:8090/Sven 

I tried to expose the ports through -P and separately through -p 8090: 8090, but no luck.

When the docker works, it blocks ports (I tried to start Docker and a regular server at the same time, but the regular one said the ports are already in use).

When I try to use another image like jboss / wildfly and I use -p 8080: 8080, no problem, it works fine.

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

Any suggestions?

+8
source share
4 answers

In my case, it was an application that was configured incorrectly. He was a local host. It should have been 0.0.0.0 without this, it only acted on the local host, for example, in the docker container, but not because of it.

You do not need to use -net = host.

So check if there is a configuration

+25
source

In application.properties you need to set 0.0.0.0 ip, not 127.0.0.0.

+2
source

error

 "curl: (56) Recv failure: Connection reset by peer" 

means that no process in the docker image listens on a port. The -p option is port binding on the host system and image.

 -p <port in host os to be binded to>:<port in container> 

So check your image, maybe your application in the container is using a different port, and you need

 -p 8080:8090 
+1
source

if you have it, comment or delete it, server.address=localhost in your application.properties

0
source

Source: https://habr.com/ru/post/1205423/


All Articles