Comments (7)
In order to add you info, what we get through logs is the following:
[WARNING] 214/091626 (1) : Server redis/redis_01 is DOWN, reason: Layer7 timeout, info: " at step 4 of tcp-check (expect string 'role:master')", check duration: 1001ms. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[WARNING] 214/091626 (1) : Server redis/redis_02 is DOWN, reason: Layer7 timeout, info: " at step 4 of tcp-check (expect string 'role:master')", check duration: 1001ms. 1 active and 0 backup servers left. 1 sessions active, 0 requeued, 0 remaining in queue.
ps. The redis_03 is the actual master.
Thanks!
from haproxy.
Can you explain a bit more your infrastructure? Such as number of Docker hosts, private/public networks ....
from haproxy.
All the dockers are running inside the same VM's. Docker is only used on the VM_X (drawn below). The PHP-FPM connects to the HAProxy in order to connect to the redis master.
We've got:
VM_X
+---------------------------------------------+ VM_Y[1|2|3]
| +---------+ +-----------+ +---------+ | +---------------+
| | Varnish | -> | Nginx+PHP | -> | HAProxy | | -> | Redis Cluster |
| +---------+ +-----------+ +---------+ | +---------------+
+---------------------------------------------+
What we've found out, is that the dockers maintain the connections open, and, because of there are "different" machines, does not find out the HAProxy has been restarted.
Is there any option to make the dockers restart on cascade?
Is there any way to make the dockers know that other one has been restarted?
Thanks!
from haproxy.
So the HAProxy container is restarted, getting a new IP, and the PHP container has a --link my-haproxy:custom-haproxy
to it? Currently there is not a simple way to cascade restarts, but, as long as it is the same container (ie just a docker stop
and start
), the PHP container would get an updated entry in /etc/hosts
with the new IP. So now the PHP container can hit custom-haproxy
or whatever the link name is.
I am not sure I am even debugging in the right area, but maybe this helps 😕.
from haproxy.
Hi!
Yes, I've got the containers linked as you've said.
What I'm trying to do is a script that, via docker api, checks the updated time and, based on setted dependencies, restart the dockers.
I don't know if there's an easier way of doing this.
Apart from this, what is strange, is that when the haproxy is restarted, he php can get to redis, but other than the master node. I haven't been able to found out why by now...
Thank you for all your efforts!
from haproxy.
with docker >=1.9 there is an easier way. Put all containers with 'docker network ...' in a local network, too, so they can find each other always with their names. If you replace a container, just give it the same name and you don't need to replace cascading containers.
from haproxy.
I agree -- I think the new Docker Networks feature should help mitigate this particular issue. Regardless, this appears to be an issue specific to Docker's routing, not something inherent to the image. If that's not the case, I think a new issue with more details explaining what the image is doing wrong and hopefully clues for how we can fix it would be appreciated! 👍
from haproxy.
Related Issues (20)
- I'm using this: HOT 2
- Release haproxy image with lua version >= 5.4.2 HOT 2
- High CPU usage with 2.6.3 (latest) docker image HOT 4
- Cannot open configuration file /usr/local/etc/haproxy/haproxy.cfg: No such file or directory HOT 6
- Memory exhaustion using haproxy image HOT 3
- OOM killed using haproxy image HOT 5
- core dumps not being stored HOT 7
- Use /var/run/docker.sock as backend server HOT 2
- Why build from source code? HOT 2
- [ALERT] (1) : [haproxy.main()] Cannot create pidfile /var/run/haproxy.pid HOT 2
- If you have a new enough kernel (`4.11`), then adding `--sysctl net.ipv4.ip_unprivileged_port_start=0` to the `docker run` should allow it to use "privileged" ports (https://github.com/moby/moby/issues/8460). HOT 1
- CVE-2023-25725 HOT 6
- How to deal with "Failed to drop supplementary groups"? HOT 2
- Vulnerable component detection issue HOT 3
- "ltime" converter does not reflect container timezone HOT 4
- Haproxy not reloading config in docker HOT 1
- Crtitical/high vulnerabilities in all haproxy:bullseye images HOT 3
- HAProxy crashing on start, thread 2 is about to kill the process. HOT 11
- Images contain `*-dev` packages that are used to build HAProxy but which are useless at runtime
- Use multi-stage build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haproxy.