레이블이 WebSphere인 게시물을 표시합니다. 모든 게시물 표시
레이블이 WebSphere인 게시물을 표시합니다. 모든 게시물 표시

WebSphere에서 한글이 깨질 경우 확인 사항

한글설정

WebSphere에서 한글 깨질때 확인 사항



  • Test OS : CentOS 7.2
  • Test Version : WebSphere v.8.5

한글 언어 설정

언어의 경우 우선적으로 소스에 인코딩되어 있는 설정을 인식

  • JSP 소스 첫줄
<%@page language="java" contentType="text/html;charset=euckr" %>  
<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
  • HTML META
<META http-equiv="Content-Type" content="text/html;charset=euc-kr">
<META http-equiv="Content-Type" content="text/html;charset=UTF-8">
  • WebSphere JVM 옵션

    경로 : Application Server > {server name} > 서버인프라 >> 프로세스 정의 > 추가특성 >> JVM > 추가특성 >> 사용자 정의

    설정 : WebSphere Application Server의 JVM Custom property에 설정
client.encoding.override = EUC-KR
file.encoding = EUC-KR

client.encoding.override = UTF-8
file.encoding = UTF-8

Application Source에서 한글 처리가 가능 해야 함







JVM HEAPDUMP & JAVACORE 옵션 설정

JVM HEAPDUMP & JAVACORE 옵션 설정

Application servers > Application_server > Process Definition > Custom Properties 
Application servers > Server Name > Process definition > Java Virtual Machine > Custom properties

Name Value

IBM_HEAPDUMP true  &  false
IBM_HEAPDUMPDIR /apps/logs
IBM_HEAPDUMP_OUTOFMEMORY true  &  false
IBM_HEAP_DUMP true  &  false

IBM_JAVACOREDIR /apps/logs
IBM_JAVADUMP_OUTOFMEMORY true  &  false
IBM_JAVA_HEAPDUMP_TEXT true  &  false
JAVA_DUMP_OPTS ONANYSIGNAL(JAVADUMP[5],HEAPDUMP[5])


Out Of Memory Error 발생시 Dump 생성 위치 변경하기

[출처] [WebSphere] Out Of Memory Error 발생시 Dump 생성 위치 변경하기|작성자 jaejeongk
IBM JDK 를 사용하는 환경에서 Out Of Memory Error가 발생하는 경우 WebSphere Application Server는 아래 위치에 javacore와 heapdump를 생성한다.
For WebSphere Application Server V6.0, V6.1, and V7.0:
        AIX or Linux: profile_root/logs/server_name
        Windows: profile_root\logs\server_name

For WebSphere Application Server V5.1:
        AIX or Linux: install_root/logs/server_name
        Windows: install_root\logs\server_name


MustGather: Out of Memory errors with WebSphere Application Server on AIX, Linux, or Windows
filesystem 관리 등의 이유로 생성 위치를 변경하고 싶다면 아래와 같이 환경 설정에 아래와 유사하게 설정한다면 생성 위치를 변경할 수 있다.
    IBM_COREDIR
        AIX or Linux: /waslog
        Windows: D:\waslogs

    IBM_HEAPDUMPDIR
        AIX or Linux: /waslog
        Windows: D:\waslogs

    IBM_JAVACOREDIR
        AIX or Linux: /waslog
        Windows: D:\waslogs


참고 사이트
http://www.ibm.com/developerworks/aix/library/au-javaonaix_memory.html
Setting up the environment
To properly set up the environment that you'll need:
  1. Set the user process limits to unlimited by running the following command as the root user:
    chuser fsize=-1 data=-1 core=-1 user_id_running_application

    where user_id_running_application is the name of the user running the Java application. For example, chuser fsize=-1 data=-1 core=-1 stack=-1 root
    This will change the file size (fsize), core file size (core), memory size (data), and stack (stack) of the user to unlimited. Be aware that there can be risks associated when using these settings, so once information has been collected, the original settings should be re-enabled. Once the changes have been made, remove references to the ulimit command in login or user profiles, or any startup scripts. You must re-login as the user prior to starting the application. Also, any application started from the /etc/inittab file may require a system reboot, because the changes might need a chance to affect the init process. Be aware that making these changes does allow the user for which the changes were made to potentially run a process that could consume system resources.
    Verify the change by running the following command prior to starting the Java application:
    ulimit -a
  2. Separate the Java heap from the native heap. Using the information in High-level overview, determine if the Java heap is malloc'ed or mmap'ed. If the Java heap is malloc'ed, then set the following environment variables to force the Java heap to be mmap'ed. For the LDR_CNTRL=MAXDATA setting, replace N with the number of segments to be used for the native heap. A good estimation is to divide the maximum size of the Java heap by 256MB and round up to the nearest whole number, then subtract that number from 8.
    For example, if -Xmx is set to 512 MB, then the value of N would be: 8 - 512MB/256MB = 8 - 2 = 6.
    export IBM_JAVA_MMAP_JAVA_HEAP=true
    export LDR_CNTRL=MAXDATA=0xN0000000
  3. Set the Java environment variables for generating heap dumps. The following environment variables will allow the JVM to generate a list of all the objects in the Java heap. This feature is specific to the IBM JVM.
    export IBM_HEAP_DUMP=true
    export IBM_HEAPDUMP=true
    export IBM_HEAPDUMP_OUTOFMEMORY=true
    export IBM_JAVACORE_OUTOFMEMORY=true

    The dump file generated can be post-processed using the HeapRoots tool, available at no cost at IBM AlphaWorks.
    Starting with SDK 131 SR6, 141 SR2 and 142, these variables will automatically be set by the JVM, which can result in several heap dump files (heapdump##.txt) and Javacore files (javacore##.txt) being generated when the Java heap becomes exhausted. This can be disabled by setting the environment variables:
    export IBM_HEAPDUMP_OUTOFMEMORY=false
    export IBM_JAVACORE_OUTOFMEMORY=false

    Starting with Java 14, IBM has implemented a heap dump format that differs from the previously generated text based heap dumps. This new heap dump format can be identified by the phd file extensions instead of the txt file extension. So that the HeapRoots tool, available for free on IBM's AlphaWorks download site, can be used to analyze these files, it is important that the following environment variable always be set when troubleshooting java heap memory issues:
    export  IBM_JAVA_HEAPDUMP_TEXT=true
  4. Generate GC output. When starting the Java process, include the command line option:
     -verbose:gc

    prior to any command line parameters. Also, the standard error from the process needs to be redirected into a file. For example, for a standalone Java process, you would run something similar to:
     java -verbose:gc ... 2> java.err

    For some application environments, the standard error may automatically be saved to log files for that environment. Just make sure this is enabled.











manageprofiles.bat(sh) 명령

manageprofiles.bat(sh) 명령
[WAS_HOME]/AppServer/bin
app_server_root\bin\manageprofiles.bat -augment -help
-create 
프로파일을 작성합니다.
프로파일 작성에 대한 특정 정보에 대해서는 manageprofiles -create -templatePathfully_qualified_file_path_to_template -help를 지정합니다. 사용 가능한 템플리트는 다음과 같습니다.
  • management - 관리. -serverType 매개변수와 함께 사용하여 관리 프로파일 유형을 표시하십시오.
  • 기본값 - Application Server
manageprofiles.bat(sh)
-create 
-profileName Wow_Profile 
-profilePath profile_root
-templatePath app_server_root\profileTemplates\default 
-nodeName Wow_node 
-cellName Wow_cell 
-hostName lorriemb 
-portsFile \temp\ports\portdef.props 
-validatePorts
-backupProfile
프로파일 레지스트리 파일에서 프로파일 폴더 및 프로파일 메타데이터의 파일 시스템 백업을 수행합니다. 백업할 프로파일을 사용하는 모든 서버는 중지한 다음 -backupProfile 옵션을 사용하여 manageprofiles명령을 호출해야 합니다. -backupProfile 매개변수는 -backupFile-profileName 매개변수와 함께 사용해야 합니다. 예를 들면, 다음과 같습니다.
manageprofiles(.bat)(.sh) -backupProfile -profileName profile_name -backupFile backupFile_name

-backupProfile 옵션을 사용하여 프로파일을 백업하는 경우, 먼저 복원하려는 프로파일에 대하여 실행 중인 프로세스나 서버를 중지해야 합니다.

-restoreProfile 
프로파일 백업을 복원합니다. -backupFile 매개변수와 함께 사용되어야 합니다. 예를 들어, 다음과 같습니다.
manageprofiles(.bat)(.sh) -restoreProfile -backupFile file_name

프로파일을 복원하려면 다음 단계를 수행하십시오.

  1. 복원하려는 프로파일에 대하여 실행 중인 프로세스나 서버를 중지하십시오.
  2. 파일 시스템에서 프로파일에 대한 디렉토리를 수동으로 삭제하십시오.
  3. manageprofiles 명령의 -validateAndUpdateRegistry 옵션을 실행하십시오.
  4. manageprofiles 명령의 -restoreProfile 옵션을 사용하여 프로파일을 복원하십시오


-delete 
프로파일을 삭제합니다.

프로파일을 삭제하는 경우 디렉토리를 수동으로 삭제하지 않고도 프로파일을 다시 작성할 수 있도록 프로파일 디렉토리가 삭제됩니다.
프로파일 레지스트리에서 기능 보강 템플리트가 등록된 프로파일을 삭제하면 보강된 기능 해제 조치가 자동으로 수행됩니다.

-deleteAll 
모든 등록된 프로파일을 삭제합니다.

프로파일을 삭제하는 경우 프로파일을 다시 작성할 때 오래된 정보를 관리하지 않아도 되도록 프로파일 디렉토리가 삭제됩니다.
프로파일 레지스트리에서 기능 보강 템플리트가 등록된 프로파일을 삭제하면 보강된 기능 해제 조치가 자동으로 수행됩니다.

 


## Profiles 만들기(사용 예)


## Deploy Mamager profile


명령 : /IBM/WAS/AppServer/bin/manageprofiles.sh -create \
        -templatePath /IBM/WAS/AppServer/profileTemplates/dmgr \
        -profilePath /IBM/WAS/AppServer/profiles/Dmgr01 \
        -profileName Dmgr01 \
## optional
        -cellName was_Cell01 \
        -nodeName was_Manager01 \
        -hostname hostname


./manageprofiles.sh -create -profileName Dmgr01 -templatePath /IBM/WAS/AppServer/profileTemplates/dmgr -profilePath /IBM/WAS/AppServer/profiles/Dmgr01 -hostName hostname

## Application Server profile


명령 : /IBM/WAS/AppServer/bin/manageprofiles.sh -create \
        -templatePath /IBM/WAS/AppServer/profileTemplates/default \
        -profilePath /IBM/WAS/AppServer/profiles/AppSrv2 \
        -profileName AppSrv2 \
## optional
        -cellName was_Cell02 \
        -nodeName was_Node01 \
        -hostname hostname


./manageprofiles.sh -create -profileName AppSrv01 -profilePath /IBM/WAS/AppServer/profiles/AppSrv01 -templatePath /IBM/WAS/AppServer/profileTemplates/default -hostName hostname

./manageprofiles.sh -create -profileName AppSrv02 -profilePath /IBM/WAS/AppServer/profiles/AppSrv02 -templatePath /IBM/WAS/AppServer/profileTemplates/default -hostName hostname

## Profile delete command


위치: /usr/IBM/WebSphere/AppServer/bin
명령: manageprofiles.sh -delete -profilesName AppSrv1
 
참고 사이트 :
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-express-iseries&topic=rxml_manageprofiles























addNode 명령

addNode 명령
*해당 명령어는 Profile 추가 생성 후 해당 Profile을 dmgr에 연계 하기 위한 명령어 이다.
addNode dmgr_host [dmgr_port] [-profileName profilename]

[-conntype type]

[-excludesecuritydomains true | false]

[-includeapps]

[-startingport portnumber]

[-portprops qualified_filename]

[-nodeagentshortname name]

[-nodegroupname name]

[-includebuses]

[-registerservice]

[-serviceusername name]

[-servicepassword password]

[-coregroupname name]

[-noagent]

[-statusport 1231]

[-quiet]

[-nowait]

[-logfile filename]

[-replacelog]

[-trace]

[-username uid]

[-password pwd]

[-localusername localuid]

[-localpassword localpwd]

[-help]

##작업 순서
  1. addNode작업을 수행하기 위해서는 dmgrNoed가 구동 되어 있어야 한다.
  2. addNode할 해당 서버의 bin폴더로 이동
  3. ./addNod.bat(sh) [host_name] [SOAP Connector Port] 해당 명령어 실행 (addNode.sh 210.1.1.2 8879)
  4. 서버 상태 확인
  5. ./serverStatus.sh -all



pluginMerge tool 이용한 plugin Merge 방법

pluginMerge tool 이용한 plugin Merge 방법
Image(13) Image(14) Image(15) Image(16) Image(8)
install_root/bin/pluginMerge.sh plugin_configuration_file1 plugin_configuration_file2 resulting_plugin_configuration_file

Image(17)
install_root/bin/pluginCfgMerge.sh plugin_configuration_file1 plugin_configuration_file2 resulting_plugin_configuration_file

Image(18)
install_root\bin\pluginMerge.bat plugin_configuration_file1 plugin_configuration_file2 resulting_plugin_configuration_file
install_root\bin\pluginCfgMerge.bat plugin_configuration_file1 plugin_configuration_file2 resulting_plugin_configuration_file

## 작업 순서

  1. Plugin 파일을 수정 후 새로 생성 한다.

  2. Merge할 플러그인 파일을 한 디렉토리에 넣어 둔다.

  3. Plugin-cfg.xml 파일 이름 변경 (Plugin-cfg.xml –> Plugin-cfg01.xml)

  4. 예) ./pluginCfgMerge.sh /apps/wes/IBM/plugin-cfg01.xml /apps/wes/IBM/plugin-cfg02.xml /apps/wes/IBM/plugin-cfg.xml

  5. 생성한 plugin 파일을 적용한 해당 WebServer의 Plugin-cfg.xml 파일과 교체 한다.

*작업 전 plugin 파일 backup 할 것 ( Linux  #cp Plugin-cfg.xml Plugin-cfg.xml.20121126)
*plugin 파일을 수작업으로 작업할 경우 아래의 사항도 추가적으로 작업을 해주어야 한다.

웹 서버 > webserver1 > 플러그인 특성


기본 설정 값 >>
플러그인 특성11
plugin 작업 후 >>
플러그인 자동생성 전파
플러그인 구성 파일 자동 생성 >> 체크 해제
플러그인 구성 파일 자동 전파 >> 체크 해제

* 플러그인 파일 자동 생성, 전파의 옵션이 true일 경우 수동으로 설정된 부분은 저장이 안되기 때문에 해당 옵션을 false로 바꿔주어야 한다.










WebSphere profiles 삭제 및 생성

Profiles Create and Delete


Test Environment

  • Test OS : Windows 10
  • Test Version : WebSphere v8.0

manageprofiles Options

Options

   함수:
      프로파일을 작성, 표시, 변경 또는 삭제합니다.
   구문:
      manageprofiles -<mode> -<argument> <argument parameter> ...
   사용 가능한 모드는 다음과 같습니다.
      create
      augment
      delete
      unaugment
      unaugmentAll
      deleteAll
      listProfiles
      listAugments
      backupProfile
      restoreProfile
      getName
      getPath
      validateRegistry
      validateAndUpdateRegistry
      getDefaultName
      setDefaultName
      response
      help

Create command

Options

   함수:
      새 프로파일을 작성합니다.
   구문:
      manageprofiles -create -<argument> <argument parameter> ...
   인수:
      다음 명령행 인수는 이 모드의 경우 필수입니다.
         -templatePath <argument parameter>: 프로파일 템플리트의 완전한 경로 이름은 파일 시스템에 있습니다.
         -profileName <argument parameter>: 프로파일의 이름입니다.
         -profilePath <argument parameter>: 파일 시스템에서 프로파일의 예상 위치.
      다음 명령행 인수는 선택적이며 기본값이 없습니다.
         -isDefault <argument parameter>: 이 프로파일을 프로파일 매개변수를 사용하지 않는 명령의 기본 대상으로 만드십시오.
         -omitAction <argument parameter>: 선택 기능을 생략하십시오.

Dmgr
manageprofiles.bat -create -profileName Dmgr01 -templatePath C:\nd61\WebSphere\AppServer\profileTemplates\dmgr -profilePath C:\nd61\WebSphere\AppServer\profiles\Dmgr01
AppSrv
manageprofiles.bat -create -profileName AppSrv01 -templatePath C:\nd61\WebSphere\AppServer\profileTemplates\managed -profilePath C:\nd61\WebSphere\AppServer\profiles\AppSrv01

Delete command

Options

   함수:
      프로파일을 삭제합니다.
   구문:
      manageprofiles -delete -<argument> <argument parameter> ...
   인수:
      다음 명령행 인수는 이 모드의 경우 필수입니다.
         -profileName <argument parameter>: 프로파일의 이름입니다.

delete
./manageprofiles.sh -delete -profileName Dmgr01
./manageprofiles.sh -delete -profileName AppSrv01
deleteAll
./manageprofiles.sh -deleteAll

Backup or Restore command

Options

  함수:
     프로파일을 백업합니다.
  구문:
     manageprofiles -backupProfile -<argument> <argument parameter> ...
  인수:
     다음 명령행 인수는 이 모드의 경우 필수입니다.
        -profileName <argument parameter>: 프로파일의 이름입니다.
        -backupFile <argument parameter>: 출력 Zip 파일의 위치입니다.
 
   함수:
      백업 프로파일을 복원합니다.
   구문:
      manageprofiles -restoreProfile -<argument> <argument parameter> ...
   인수:
      다음 명령행 인수는 이 모드의 경우 필수입니다.
         -backupFile <argument parameter>: 출력 Zip 파일의 위치입니다.

profile backup sample
manageprofiles -backupProfile -profileName Dmgr01 -backupFile c:\20080509.zip

profile restore sample
manageprofiles -restoreProfile -profileName Dmgr01 -backupFile c:\20080616.zip

이 블로그 검색

Popular Posts

WEB&&WAS

OS

Reviews