!doctype>
[Issue] Session Cluster에서 JSESSIONID 충돌로 인한 브라우저에서 세션값을 읽어버리는 현상
Session Cluster에서 JSESSIONID 충돌로 인한 브라우저에서 세션값을 읽어버리는 현상
migrating to WebSphere Application Server V5.1.x or V6.x to V7.x in the background
migrating to WebSphere Application Server V5.1.x or V6.x to V7.x in the background
IBM HTTPServer rotatelogs log setting
HTTPServer 로그 로테이션 설정
Test Environment
- Test OS : CentOS 7.2
- Test Version : IBM HTTPServer v8.5 (apache)
- 아파치 로그 설정(로테이션 설정)
위치 : /IBM/HTTPServer/conf
수정 : httpd.conf
# ErrorLog logs/error_log
ErrorLog "|/IBM/HTTPServer/bin/rotatelogs /IBM/HTTPServer/logs/error_%Y%m%d.log 86400"
# CustomLog logs/access_log common
CustomLog "|/IBM/HTTPServer/bin/rotatelogs /IBM/HTTPServer/logs/access_%Y%m%d.log 86400" common
- 참고 형식 문자열
%A (지역화된) 완전한 요일 이름
%a (지역화된) 3-문자 요일 이름
%B (지역화된) 완전한 달 이름
%b (지역화된) 3-문자 달 이름
%c (지역화된) 날짜와 시간
%d 2-자리 일
%H 2-자리 시간 (24 시간 시계)
%I 2-자리 시간 (12 시간 시계)
%j 3-자리 날짜수
%M 2-자리 분
%m 2-자리 달
%p (지역화된) 12 시간 시계의 am/pm
%S 2-자리 초
%U 2-자리 주일수 (주의 첫번재 날은 일요일)
%W 2-자리 주일수 (주의 첫번재 날은 월요일)
%w 1-자리 요일수 (주의 첫번째 날은 일요일)
%X (지역화된) 시간
%x (지역화된) 날짜
%Y 4-자리 연도
%y 2-자리 연도
%Z 시간대 이름
%% 문자그대로 `%’
SSL setting
SSL Setting
- Test OS : CentOS 7.2
- Test Version : IBM HTTPServer v8.5, WebSphere v8.5
- httpd.conf 수정 부분
위치 : F:\IBM\HTTPServer\conf
파일 : \httpd.conf
수정 : SSL 설정 부분의 주석 해제
### SSL Module Start ###
NameVirtualHost 211.1.1.1:80
NameVirtualHost 211.1.1.1:443
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
Listen 443
<VirtualHost ad1.test.com:80>
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "C:/IBM/HTTPServer/htdocs"
ServerName ad1.test.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
<VirtualHost ad1.test.com:443>
SSLEnable
SSLClientAuth none
DocumentRoot "C:/IBM/HTTPServer/htdocs"
ServerName ad1.test.com
</VirtualHost>
SSLDisable
Keyfile "C:/IBM/kera.kdb"
# End of example SSL configuration
IBM HTTPServer의 경우 버전에 따라 취약한 프로토콜은 Disable 된다.
- ikeyman을 이용한 인증서 발급
- 발급된 인증서가 있는 경우 해당 인증서 사용
- 콘솔상에서 가상호스트 추가 작업
- 관리콘솔 접속 해당 위치의 추가된 포트 정보 등록
위치: 가상 호스트 > default_host > 호스트 별명
내용: 443 Port 를 기존 가상호스트 에 등록
- WebServer Restart
apachectl -t 옵션으로 conf내의 오류사항을 체크하고 기동
WebSphere에서 OS hostname 변경시 작업 사항
hosname이 변경될 경우 해당 Node의 serverindex.xml파일을 전부 변경 해주어야 한다.
* serverindex.xml 파일의 hostname수정
ND의 경우 [WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes
Base의 경우[WAS_HOME]/profiles/[App Profile]/config/cells/[Cell_Name]/nodes(Base의 경우 해당 AppSrv만 수정)
*ND의 경우에는 dmgr과 노드 연합을 이루고 있는 각각의 노드의 모든 serverindex.xml 수정
*serverindex.xml 파일의 기존 hostname 이 남아 있는 경우에는 구동하더라고 시작 안됨
*hostname 변경시 serverindex.xml 파일만 수정 해도 구동이 가능
find ./AppServer -type f | xargs grep -l 'target' > f.txt
그 중 IBM에서 소개하고 있는 여러가지 방법은 아래 link를 참고하면 많은 도움이 될듯하다.
The WebSphere Contrarian: Changing host names and migrating profiles in WebSphere Application Server
AdminTask 오브젝트에 대한 NodeConfigCommands 명령 그룹
추가적으로 fixpack v6.1.0.25 이상 update 권고...
PK83773: THE ADMINTASK.CHANGEHOSTNAME COMMAND INCORRECTLY MODIFIES THE MULTICAST ENDPOINTS IN SERVERINDEX.XML
fixpack v7.0.0.13 이상 update 권고.
PM13373: UNABLE TO GENERATE CERTS USING REGENDEFAULTCERT OPTION USING WSADMIN ADMINTASK.CHANGEHOSTNAME COMMAND
결론적인내용은다음과 같다.
위치: {Profile_Root}/{Profiles_name}/bin
# ./wsadmin.sh -conntype NONE -lang jython
wsadmin> AdminTask.changeHostName(‘[-nodeName <node_name> -hostName <new_host_name>]‘)
wsadmin> AdminConfig.save()
wsadmin> quit
ND edition은 #./syncNode.sh 로 처리하는 센스.
[출처] [WebSphere] hostname 변경하기|작성자 jaejeongk
[Node Name 변경]===================================================
Dmgr start
변경하고자 하는 해당 profile > bin 디렉토리 아래에서 renameNode.bat(sh) 실행(실행시 해당 node 아래 있는 프로세스 중지)
사용 예)[WAS_HOME]/profiles/[App Profile]/bin>renameNode.bat [dmgr hostname] [dmgr SOAP_CONNECTOR_ADDRESS port] [new_node_name] -username admin -password admin (보안 설정이 되어 있는 경우 해당 user와 password 입력)
[Cell Naem 변경]====================================================
* 셀이름 변경 - 아래 명시된 파일에서 기존 셀 이름으로 되어 있는 것을 찾아서 수정한다.
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells 아래 있는, 셀 이름으로 된 디렉토리 이름 수정
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/cell.xml
[WAS_HOME]/profiles/[Dmgr Profile]/bin/setupCmdLine.bat
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/security.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/variables.xml
아래 두개는 웹 어드민 콘솔 관련 어플리케이션이다.
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/applications/isclite.ear/deployments/isclite/deployment.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/applications/isclite.ear/deployments/isclite/isclite.war/WEB-INF/components.xml
* 각 노드(프로파일)에 있는 위의 파일들(isclite.ear 아래 있는 것들 제외-이것은 어드민 콘솔 관련 어플리케이션이라서 다른 노드에는 없다) 수정
[dmgr Node name 변경]================================================
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes 아래 있는 디렉토리 이름 수정
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes/VicCellManager03/node.xml
[WAS_HOME]/profiles/[Dmgr Profile]/bin/setupCmdLine.bat
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/security.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/applications/isclite.ear/deployments/isclite/deployment.xml
[CoreGroup & NodeGroup name 변경]========================================
*코어 그룹과 노드 그룹은 기본적으로 DefaultCoreGroup, DefaultNodeGroup 이름으로 생성이 되는데, 사용자가 추가적으로 생성해 준 것이 있다면 이에 따른 파일들도 수정해 줘야 한다.
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/coregroups/DefaultCoreGroup/coregroup.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodegroups/DefaultNodeGroup/nodegroup.xml
[etc name 변경]======================================================
[WAS_HOME]/profiles/[Dmgr Profile]/config/templates 아래 있는 파일들 중 기존의 노드 이름이 되어 있는 파일
(이 파일들은 수정하지 않아도 운영사에 지장이 없어 보인다)
*각 노드(프로파일)에 있는 아래 내용 수정
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes 아래 있는 디렉토리 이름 수정
[WAS_HOME]/profiles/[App Profile]/config/cells/[Cell_Name]/security.xml
=================================================================
*해당 작업 수행 후 플러그인 파일 생성 후 재 배포 실시
[HTTPServer_HOME]/bin apachectl.sh restart
*windows 의 경우 해당 서비스 재 시작
* serverindex.xml 파일의 hostname수정
ND의 경우 [WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes
Base의 경우[WAS_HOME]/profiles/[App Profile]/config/cells/[Cell_Name]/nodes(Base의 경우 해당 AppSrv만 수정)
*ND의 경우에는 dmgr과 노드 연합을 이루고 있는 각각의 노드의 모든 serverindex.xml 수정
*serverindex.xml 파일의 기존 hostname 이 남아 있는 경우에는 구동하더라고 시작 안됨
*hostname 변경시 serverindex.xml 파일만 수정 해도 구동이 가능
shell script 이용해서 'target'(old_host_name) 을 $1 (new_host_name) 으로 변경
find ./AppServer -type f | xargs grep -l 'target' > f.txt
for file in `cat f.txt`
do
cat $file | sed "s/target/$1/g" > f1.txt
mv f1.txt $file
done
그 중 IBM에서 소개하고 있는 여러가지 방법은 아래 link를 참고하면 많은 도움이 될듯하다. The WebSphere Contrarian: Changing host names and migrating profiles in WebSphere Application Server
AdminTask 오브젝트에 대한 NodeConfigCommands 명령 그룹
추가적으로 fixpack v6.1.0.25 이상 update 권고...
PK83773: THE ADMINTASK.CHANGEHOSTNAME COMMAND INCORRECTLY MODIFIES THE MULTICAST ENDPOINTS IN SERVERINDEX.XML
fixpack v7.0.0.13 이상 update 권고.
PM13373: UNABLE TO GENERATE CERTS USING REGENDEFAULTCERT OPTION USING WSADMIN ADMINTASK.CHANGEHOSTNAME COMMAND
결론적인내용은다음과 같다.
위치: {Profile_Root}/{Profiles_name}/bin
# ./wsadmin.sh -conntype NONE -lang jython
wsadmin> AdminTask.changeHostName(‘[-nodeName <node_name> -hostName <new_host_name>]‘)
wsadmin> AdminConfig.save()
wsadmin> quit
ND edition은 #./syncNode.sh 로 처리하는 센스.
[출처] [WebSphere] hostname 변경하기|작성자 jaejeongk
[Node Name 변경]===================================================
Dmgr start
변경하고자 하는 해당 profile > bin 디렉토리 아래에서 renameNode.bat(sh) 실행(실행시 해당 node 아래 있는 프로세스 중지)
사용 예)[WAS_HOME]/profiles/[App Profile]/bin>renameNode.bat [dmgr hostname] [dmgr SOAP_CONNECTOR_ADDRESS port] [new_node_name] -username admin -password admin (보안 설정이 되어 있는 경우 해당 user와 password 입력)
[Cell Naem 변경]====================================================
* 셀이름 변경 - 아래 명시된 파일에서 기존 셀 이름으로 되어 있는 것을 찾아서 수정한다.
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells 아래 있는, 셀 이름으로 된 디렉토리 이름 수정
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/cell.xml
[WAS_HOME]/profiles/[Dmgr Profile]/bin/setupCmdLine.bat
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/security.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/variables.xml
아래 두개는 웹 어드민 콘솔 관련 어플리케이션이다.
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/applications/isclite.ear/deployments/isclite/deployment.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/applications/isclite.ear/deployments/isclite/isclite.war/WEB-INF/components.xml
* 각 노드(프로파일)에 있는 위의 파일들(isclite.ear 아래 있는 것들 제외-이것은 어드민 콘솔 관련 어플리케이션이라서 다른 노드에는 없다) 수정
[dmgr Node name 변경]================================================
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes 아래 있는 디렉토리 이름 수정
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes/VicCellManager03/node.xml
[WAS_HOME]/profiles/[Dmgr Profile]/bin/setupCmdLine.bat
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/security.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/applications/isclite.ear/deployments/isclite/deployment.xml
[CoreGroup & NodeGroup name 변경]========================================
*코어 그룹과 노드 그룹은 기본적으로 DefaultCoreGroup, DefaultNodeGroup 이름으로 생성이 되는데, 사용자가 추가적으로 생성해 준 것이 있다면 이에 따른 파일들도 수정해 줘야 한다.
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/coregroups/DefaultCoreGroup/coregroup.xml
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodegroups/DefaultNodeGroup/nodegroup.xml
[etc name 변경]======================================================
[WAS_HOME]/profiles/[Dmgr Profile]/config/templates 아래 있는 파일들 중 기존의 노드 이름이 되어 있는 파일
(이 파일들은 수정하지 않아도 운영사에 지장이 없어 보인다)
*각 노드(프로파일)에 있는 아래 내용 수정
[WAS_HOME]/profiles/[Dmgr Profile]/config/cells/[Cell_Name]/nodes 아래 있는 디렉토리 이름 수정
[WAS_HOME]/profiles/[App Profile]/config/cells/[Cell_Name]/security.xml
=================================================================
*해당 작업 수행 후 플러그인 파일 생성 후 재 배포 실시
[HTTPServer_HOME]/bin apachectl.sh restart
*windows 의 경우 해당 서비스 재 시작