# HTTP 404 received when changing pool

**URL:** <https://community.f5.com/t/http-404-received-when-changing-pool/75340>\
**Category:** Technical Forums\
**Tags:** application-delivery\
**Created:** [October 29, 2024, 8:38am UTC](https://community.f5.com/t/http-404-received-when-changing-pool/75340 "2024-10-29T08:38:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrdragosh](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@mrdragosh](https://community.f5.com/u/mrdragosh)\
**Post date:** [October 29, 2024, 8:38am UTC](https://community.f5.com/t/http-404-received-when-changing-pool/75340/1 "2024-10-29T08:38:39Z")

</div>

Hello, I have a setup with a VIP with an APM policy (LDAP auth) that serves two app (A and B).

The default pool (for app A) is set on VS level.

We also have an irule on VS with the pool and some http host rewrite.

> switch -glob [string tolower [HTTP::uri]] {&nbsp; &nbsp; &nbsp; &nbsp; “/customerhub/\*” {  
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pool P\_Customer
> 
> }

The issue is that for app B, the first request is always a HTTP 404. After I get the cookies it works fine (following requests).

If I switch the default pool to P\_Customer and remove the irule above, it works fine, without 404!

Is it an issue with the MRHsession and the pool command in irule? How to pass it?

---

<div class="post-metadata">

**Author:** ![mrdragosh](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@mrdragosh](https://community.f5.com/u/mrdragosh)\
**Post date:** [October 29, 2024, 1:28pm UTC](https://community.f5.com/t/http-404-received-when-changing-pool/75340/2 "2024-10-29T13:28:48Z")

</div>

One update,

it seems that first request gets send to pool A even if it should go to B.

Following requests go to B as supposed, but first gets 404.

Clearing the cookies re-triggers the issue. Any idea?

---

<div class="post-metadata">

**Author:** ![zamroni777](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/zamroni777/32/1473_2.png) [@zamroni777](https://community.f5.com/u/zamroni777)\
**Post date:** [October 29, 2024, 1:39pm UTC](https://community.f5.com/t/http-404-received-when-changing-pool/75340/3 "2024-10-29T13:39:38Z")

</div>

you should configure proper health monitor for the pool, e.g. with proper url path to be checked, not just the simple “/”.  
so, f5 will know whether the pool member can handle the request or not, hence will not send client request to non capable pool members.

---

<div class="post-metadata">

**Author:** ![Aswin\_mk](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/aswin_mk/32/5701_2.png) [@Aswin\_mk](https://community.f5.com/u/Aswin_mk)\
**Post date:** [October 29, 2024, 2:54pm UTC](https://community.f5.com/t/http-404-received-when-changing-pool/75340/4 "2024-10-29T14:54:16Z")

</div>

Hello,

I hope all of your transaction have “/customerhub/” in URL path.

Also please check front and backend packet capture logs in F5. use below command for get complete capture(front and back)

tcpdump -nni 0.0:nnnp -s 0 host “VIPIP” -w /var/log/example.pcap. you can check if the server is rejecting first packet or not

I dont think its any health check issue as your pool showing as up every time( i hope no issues) .

BR

Aswin

---

<div class="post-metadata">

**Author:** ![mrdragosh](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@mrdragosh](https://community.f5.com/u/mrdragosh)\
**Post date:** [October 29, 2024, 3:56pm UTC](https://community.f5.com/t/http-404-received-when-changing-pool/75340/5 "2024-10-29T15:56:34Z")

</div>

Ok, I solved the issue. Apparently the APM was sending the redirect to the default pool. I added an irule to direct the traffic based on URI to the pool appB on ACCESS\_ACL\_ALLOWED.

Now works fine.
