석그
기억하지말고기록하기
석그
전체 방문자
오늘
어제
  • 분류 전체보기 (75)
    • Docker (2)
    • WEB (10)
      • apache (5)
      • nginx (2)
      • 인증서 (1)
    • WAS (10)
      • wildfly (9)
      • jboss (0)
      • tomcat (0)
    • DevOps (7)
      • Jenkins (2)
      • Influx (2)
      • Ansible (1)
      • gitlab (1)
      • squid (1)
    • ELK (4)
      • elasticsearch (2)
      • Kibana (0)
      • Logstash (2)
    • 리눅스 명령어 (6)
    • GIT (0)
    • 알고리즘 (0)
    • 쉘스크립트 (8)
    • Centos7 (5)
    • TEST (6)
    • Scouter (0)
    • 에러모음 (9)
    • 기타 (4)
      • tool (4)
    • grafana (2)
    • VirtualBox (0)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • 문법확인
  • 깃허브
  • 로그크기
  • scouter
  • 파일변수처리
  • cli스크립트
  • 쉘문법
  • 싱글인증서
  • jboss-cli.sh
  • ansible
  • 서버공유
  • jkmount
  • apache
  • fallocate
  • shellcheck
  • 인증서패스워드
  • 도커
  • Customizable Alert
  • 변수처리
  • docker 커밋
  • Bad GateWay
  • 젠킨스
  • 와일드카드인증서
  • 도커 로드
  • 쉘패키지
  • 도커이미지저장
  • 멀티인증서
  • 도커 커밋
  • 플레이북
  • 뒤에서 값자르기

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
석그

기억하지말고기록하기

에러모음

502 Bad GateWay 에러 The proxy server received an invalid response from an upstream server.

2022. 7. 13. 19:19

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
    '에러모음' 카테고리의 다른 글
    • Java was started but returened exit code=13
    • [Java] Error attaching to process: sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 25.332-b09. Target VM is 25.242-b08 에러
    • yum 패키지 정리
    • bash: netstat , ps,ll: command not found
    석그
    석그

    티스토리툴바