APACHE, OHS 400 웹로직 연동후 특정 작업에 400 error

by 조쉬 posted Dec 30, 2016
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄

웹로직과 아파치 혹은 OHS 연동 후 페이지가 정상적으로 보이나 특정 작업을 하는 페이지는 400에러가 발생

웹로직 아파치 연동시 400에러 발생

아파치에서 POST 시 400에러 발생 혹은

아파치 웹로직 연동 POST 400에러 등 여러가지 방법으로 말할 수 있겠다


400에러의 세부내용은 dumpio를 통해서 찍어보면

Failure of Web Server bridge: Internal processing error 가 선명하게 찍힌다




원인

위와 같은 증상을 호소하는 사람들의 공통점은 대량의 내용을 POST로 웹로직에 전달하였다

JSON으로 대량의 데이터를 보내거나 hwpml 등 여러상황에서 발생 했다

단서를 얻은것은 JSON으로 소량의 데이터 전송시 성공하나 대량으로 전송시 400에러가 발생함..


해결법

/tmp/_wl_proxy 폴더의 퍼미션을 확인하자 감이 오는가??

딩동댕


 

Location of POST Data Files

When the FileCaching parameter is set to ON, and the size of the POST data in a request is greater than 2048 bytes, the POST data is first read into a temporary file on disk and then forwarded to the WebLogic Server in chunks of 8192 bytes. This preserves the POST data during failover.

The temporary POST file is located under /tmp/_wl_proxy for UNIX. For Windows it is located as follows (if WLTempDir is not specified):

  1. Environment variable TMP

  2. Environment variable TEMP

  3. C:\Temp

/tmp/_wl_proxy is a fixed directory and is owned by the HTTP Server user. When there are multiple HTTP Servers installed by different users, some HTTP Servers might not be able to write to this directory. This condition results in an error.

To correct this condition, use the WLTempDir parameter to specify a different location for the _wl_proxy directory for POST data files.

https://docs.oracle.com/cd/E21764_01/web.1111/e16435/plugin_params.htm#PLGWL480


post가 2048 bytes가 넘으면 temp 공간에 두고 보내는데 왜? 혹시 모를 failover에 대비하게 위해서 

해당경로 _wl_proxy의 경로가 아파치 혹은 OHS유저가 사용할 수 없는 권한 또는 오너쉽이라면 POST 사이즈가 클때 400 에러가 발생한다

그리고 두개 이상의 웹제품군이 설치되어있는 서버에는 WLTempDir 파라메터를 이용하여 경로를 지정해주면 오류가 발생하지 않을것 같다


WLTempDir /location  <<-- 이렇게


내 생각은 MTU 사이즈가 보통 약 1400이니 한패킷에 다 담기지 않는 데이터를 web에서 처리를 할때 _wl_proxy를 사용하여 조립하고나서 웹로직에 전달 하는 거라고 판단 했으나 오라클 공식 문서를 보니 아니였다... 비슷했으니 뭐;;;


중요한건 데이터가 크면 디스크에 두고 웹로직으로 전송한다


혹 비슷한 오류가 발생하면 위의 항목을 확인하도록 하자