502 Bad GateWay 에러 The proxy server received an invalid response from an upstream server.
당시사항 : 특정 URL 파라미터가 많으면 위와같은 502 에러가나오고 URL파라미터가 적으면 200 정상호출이되는 현상
Tomcat serverx.ml 파일의 AJP Connector 옵션의 packetSize가 '65536'으로 MAX값으로 세팅되어있엇고.
Apache 웹 서버의 workers.proprerties 파일의 worker.template.max_packet_size=65536 가 아래와 같이 주석처리가 되어 있었다.
계속해서 502 Bad GateWay 오류가 발생하였다.
cat workers.properties
#worker.template.max_packet_size=65536
해당 내용을 주석 해제 후 packetSize를 설정해주니 정상적으로 동작하였다.
=> apache>workers.properties>worker.template.max_packet_size와 tomcat>server.sml>connector(AJP)의 packetSize 속성 값은 동일.
만약 packetSize를 설정해주지 않을 경우 default 값인 8192로 동작하며 max packet size is 8 * 1024 bytes =8192 (8K)
request 값의 패킷 사이즈가 8192가 넘어갈 경우 패킷 사이즈 오류가 발생한다. 에러로그가 나오지 않아 확인어렵..
packetSize 값을 Apache의 workers.properties와 Tomcat의 server.xml파일에 packetSize를 MAX 값으로 동일하게 설정.
apache packetSize 정의 홈페이지
https://publib.boulder.ibm.com/httpserv/manual24/mod/mod_proxy_ajp.html#:~:text=According%20to%20much%20of%20the,is%20encoded%20in%20the%20header.
mod_proxy_ajp - Apache HTTP Server
Apache Module mod_proxy_ajp Summary This module requires the service of mod_proxy. It provides support for the Apache JServ Protocol version 1.3 (hereafter AJP13). Thus, in order to get the ability of handling AJP13 protocol, mod_proxy and mod_proxy_ajp ha
publib.boulder.ibm.com
'에러모음' 카테고리의 다른 글
| Java was started but returened exit code=13 (0) | 2022.08.06 |
|---|---|
| [Java] Error attaching to process: sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 25.332-b09. Target VM is 25.242-b08 에러 (0) | 2022.07.25 |
| yum 패키지 정리 (0) | 2022.07.12 |
| bash: netstat , ps,ll: command not found (0) | 2022.06.21 |
| x11 gui 사용에러 (0) | 2022.05.28 |