surevine / openfire-docker-compose

Run multiple Openfire servers & DBs in Docker for local testing
9 stars 6 forks source link

Unable to restart immediately #30

Open guusdk opened 3 years ago

guusdk commented 3 years ago

About 75% of the time where I want to stop an environment, to redeploy it with another build, the start.sh script fails with:

ERROR: for lb  Cannot start service lb: driver failed programming external connectivity on endpoint openfire-docker-compose_lb_1 (41e778f93e620e6df1b3cf52dd64e1f6e1421ee3fba4c9b9e1b2846474629520): Error starting userland proxy: listen tcp 0.0.0.0:57070: bind: address already in use

Port 57070 is most frequently reported, although I occasionally see another port.

This seems to correspond with a socket that's in TIME_WAIT state, as netstat reports:

tcp        0      0 127.0.0.1:57070         127.0.0.1:1024          TIME_WAIT   - 

Eventually, the problem disappears (after the socket expiry passes).