Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Disable member from apache load balancer |
|
Author |
|
satyanvesh
Joined: 17 Feb 2021 Posts: 2 Location: India, Hyderabad
|
Posted: Wed 17 Feb '21 10:36 Post subject: Disable member from apache load balancer |
|
|
Hi
I am using apache load balancer Registered two member. I can see the load balancer manager members.
When I trying to disable a member from CURL, I am unable to disable but when I am trying to disable from GUI I am able to.
Below is my curl command:
Code: | curl -s -XPOST "http://${server}:${port}/${manager}?" -d b="${balancer}" -d w="${worker}" -d nonce="${nonce}" -d status_D=1 -d lf=1 -d status_I=0 -d status_H=0 -d ls=0 -d wr= -d rr=
curl -s -XPOST "http://${server}:${port}/${manager}?" -d b="${balancer}" -d w="${worker}" -d nonce="${nonce}" -d dw=Disable |
Below is my load balancer configuration
Code: | ProxyRequests off
<Proxy balancer://apachelb22>
BalancerMember http://103.26.112.105:8081
BalancerMember http://152.87.14.10:8082
ProxySet lbmethod=byrequests
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
</Location>
ProxyPass /balancer-manager !
ProxyPass / balancer://apachelb22/
ProxyPassReverse / balancer://apachelb22/
|
When I tried to disable using curl command I am getting below error
Code: | [error] [client 127.0.0.1] File does not exist: /var/www/html/balancer-manager
|
My apache version is Apache/2.2.34
Please let me know where I am going wrong
Regards
Satyanvesh |
|
Back to top |
|
satyanvesh
Joined: 17 Feb 2021 Posts: 2 Location: India, Hyderabad
|
Posted: Thu 18 Feb '21 20:44 Post subject: |
|
|
Used below curl command to disable the member from balancer
Code: | $CURL -s -o /dev/null "${target}?b=${balancer}&w=${worker}&nonce=${nonce}&status_D=1&lf=1&ls=0&wr=&rr=" |
|
|
Back to top |
|
tangent Moderator
Joined: 16 Aug 2020 Posts: 348 Location: UK
|
Posted: Thu 18 Feb '21 23:15 Post subject: |
|
|
You say you're using Apache 2.2 rather than 2.4 series.
The more recent 2.4 series releases added a referer header check in addition to the nonce check, to further help against cross-site access to the balancer manager, but that change evidently wasn't propagated to 2.2.34.
Looking at the 2.2.34 source code for mod_proxy_balancer.c, it's light on logging error messages compared to the 2.4 variant, so it's difficult to know what to suggest is wrong with your CURL POST process, assuming you've scripted the dynamic nonce correctly.
One possibility would be to capture the network traffic with Wireshark, to compare the difference between the balancer manager GUI and CURL transactions. This will be more challenging if your site is secure, but still doable. |
|
Back to top |
|
|
|
|
|
|