Hi @m shanmukha
Thank You for posting Q & A.
Troubleshooter: Bad gateway (502) errors in Azure Application Gateway
Troubleshooting bad gateway errors in Application Gateway
Please don’t forget to Accept the answer
and up-vote
wherever the information provided helps you, this can be beneficial to other community members.