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

WAS | WebSphere when native_stdout file capacity continues to increase

WebSphere when native_stdout file capacity continues to increase


OS : CentOS 7 3.10.0-957.el7.x86_64

issue

JVM-"Java"-Logs(SystemOut, SystemErr)의 경우 WebSphere에는 로그 순환을 허용하는 내장 메커니즘이 있다(시간 또는 크기 기반 접근법 또는 두 가지 접근법의 혼합). JVM-"프로세스"-Logs(native_stderr, native_stdout)의 경우 WebSphere에는 이러한 내장 메커니즘이 없다.

특히 native_stderr 파일을 로그 로테이션을 전하고자 하는 주된 이유는 일반적으로 가비지 콜렉션의 verbosegc(Verbose Garbassy Collection) 항목이 포함되기 때문이며, 이 파일은 수행된 모든 가비지 콜렉션(GC) 사이클과 관련 통계(예: GC 실행 전/후 메모리 양)의 레코드 저장소다. 이러한 verbosegc 레코드는 시간이 지남에 따라 크게 증가하므로 native_stderr파일은 상당히 커질수 있다.

  • 상세한 가비지 콜렉션 옵션 On

Solution plan

JVM의 -Xverbosegclog 옵션을 활용해서 GC 로그를 별도로 생성 하는 방식으로 우회해서 사용할 수 있다.

  • 상세한 가비지 콜렉션 옵션 Off
  • JVM -Xverbosegclog 설정 구문
    -Xverbosegclog[:<filename>[,<x>,<y>]]

where <file> specifies a base filename, <X> is the number of files being used and <Y> is the number of GC cycles contained in one file (before rollover).

-verbose:gc
-Xloggc:${SERVER_LOG_ROOT}\verbosegc.log
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=10
-XX:GCLogFileSize=10M
-XX:+PrintGCDateStamps
-XX:+PrintGCDetails

예)

-Xverbosegclog:/app/was/gclogs/websphere/server1/gc.%Y%m%d.%H%M%S.%pid.txt

WAS | WebSphere 전체 Log4j 보안 취약점 관련 내용 정리

WebSphere 전체 Log4j 보안 취약점 관련 내용 정리

Security Bulletin: Multiple vulnerabilities in Apache log4j affect the IBM WebSphere Application Server and IBM WebSphere Application Server Liberty (CVE-2021-4104, CVE-2021-45046)


Affected Products and Versions

Affected Product(s) Version(s)
WebSphere Application Server Liberty Continuous delivery
WebSphere Application Server 9.0
WebSphere Application Server 8.5
WebSphere Application Server 8.0
WebSphere Application Server 7.0

관련 취약점 내용

아래의 이슈 사항을 확인 해보면 되지만 간략하게 정리 했습니다. 전체 플랫폼의 이슈되는 APP는 UDDI.ear 이면 기본적으로 구성을 위해 별도의 설치가 필요합니다.(미 사용중이라 영향도 없음)

결국 9.x kc.war 문제가 되며 해당 APP 경우 관리콘솔 도움말에 사용중 인 것으로 보이며, 문제가 되는 클래스 제거하거나 라이브러리를 제거 하는 식으로 임시 조치를 취하고 있습니다.

1. WebSphere Application Server traditional release 9.0 only:

Remove <WAS_HOME>/systemApps/isclite.ear/kc.war/WEB-INF/lib/log4j*.jar from any system running the WebSphere admin console and restart the application server.
Note: If any future service (prior to 8.5.5.21 or or 9.0.5.11) is applied to the install the log4j files will be restored without warning.
If the kc.war application has been installed then uninstall it. For instructions on how to determine if kc.war is installed see question Q9 in our Log4Shell (CVE-2021-44228) FAQ.
Remove <WAS_HOME>/installableApps/kc.war

2. All WebSphere Application Server traditional releases:

Users of the UDDI Registry Application: Remove log4j*.jar from within the <WAS_HOME>/installableApps/uddi.ear
archive and update (redeploy) any installed (deployed) copies of the UDDI Registry application.
Users who do not use the UDDI Registry Application should remove <WAS_HOME>/installableApps/uddi.ear

IBM 보고된 내용 링크
https://www.ibm.com/support/pages/node/6526750

3. Log4j 1.x 추가 사항

웹스피어의 경우 이경우가 UDDI.ear 따로 해당 기능을 사용하지 않으면 추가적인 조치가 필요 없음)

Is Log4j 1.x vulnerable

There is still a lot of information coming out surrounding Log4Shell. At the time this blog was published, Apache said that Log4j 1.2 is vulnerable in a similar way when Log4j is configured to use JMSAppender, which is not part of the default configuration, but is not specifically vulnerable to CVE-2021-44228. This vulnerability in Log4j 1.2 has been assigned CVE-2021-4104.

Is there a patch available for Log4j 1.2?

No, Log4j branch 1.x has reached end of life (EOL) status, and therefore does not receive security updates. Users are instructed to upgrade to Log4j 2.12.2 (for Java 7) or 2.16.0 or greater.

How do I address CVE-2021-4104?

There are a few mitigation options that can be used to prevent exploitation of CVE-2021-4104.

  • Do not use the JMSAppender in the Log4j configuration
  • Remove the JMSAppender class file (org/apache/log4j/net/JMSAppender.class)
  • Limit OS user access to prevent an attacker from being able to modify the Log4j configuration

CMD - 개행 문자 일괄 제거 방법

파일 업로드후 개행 문자 제거 방법


Test environment

OS : AIX

Issue

windows 에서 작업후 파일 업로드하고 vi로 열면 아래와 같이 개행 문자가 보임.

vi로 열면 아래와 같이 개행 문자가 보임

#!/bin/sh^M
#./startServer.sh server_name^M
#./stopServer.sh server_name -username username -password password^M
  • Perl 명령어를 통해 개행 문자 제거

    perl -pi -e 's/^M//g' {file_name}
test1 root [/was8/bin]#perl -pi -e 's/^M//g' stopWasAll.sh
perl -pi -e 's/\015//g' startWeb.sh
perl -pi -e 's/\015//g' stopWeb.sh

vi로 열어 보면 이제 개행 문자가 사라진 모습을 확인 할 수 있다.

test1 root [/was8/bin]#vi stopW*.sh
#!/bin/sh
#./startServer.sh server_name
#./stopServer.sh server_name -username username -password password
#PropFilePasswordEncoder.sh
#export LANG=en_us.utf8

Issue - JBoss 7.x 데이터 소스 연결 테스트 시 localhost 찾는 에러 해결 방안

The following exception is raised when obtaining a connection from a non-XA Microsoft SQL Server datasource:

redhat


Test Environment

  • Test Version : JBoss EAP 7.2

Issue

... Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall."

  • When using a datasource-class, the connection-url property is ignored and no JDBC url is supplied, hence the exception.
  • non-XA pool 에서 datasource-class를 사용할 경우 connection-url property가 무시되어 해당 Exception 이 발생한다고합니다.

Resolution

  • standalone.xml 에 <datasource-class> 설정 라인 삭제 후 jboss 재기동

     <datasource jndi-name="java:/mssql" pool-name="mssqljdbc" statistics-enabled="true">
            <connection-url>jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ucpost</connection-url>
            <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
            <datasource-class>com.microsoft.sqlserver.jdbc.SQLServerDataSource</datasource-class> ==> 해당 부분 삭제

cause

  • The issue may be due to specification of a datasource-class when defining a non-XA pool.
  • The use of an implementation of javax.sql.DataSource requires significantly different configuration from the standard java.sql.Driver mechanism which is the default for JDBC 4 compliant drivers when creating non-XA connections.
  • When using a datasource-class, the connection-url property is ignored and no JDBC url is supplied, hence the exception.

Issue - Webservice module crash error during JBoss migration

Webservice module crash error during JBoss migration

redhat


Test Environment

  • Test OS : CentOS 7.2
  • Test Version : JBoss EAP 6.4
  • Test Version : JBoss EAP 7.2

How to JBoss EAP 7.x WebService crash

  • 제이보스 EOS에 따른 업그레이드 작업중 웹서비스 이용시 발생하는 충돌에 따른 대처 방안 입니다.

Issue

  • 근본 이슈는 EAP7 버전의 cxf 버전과 애플리케이션 자체로 구현한 Spring-cxf 사이의 호환 이슈
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"sso.war\".PARSE" => "WFLYSRV0153: Failed to process phase PARSE of deployment \"sso.war\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYWS0059: Apache CXF library (cxf-api-2.7.8.jar) detected in ws endpoint deployment; either provide a proper deployment replacing embedded libraries with container module dependencies or disable the webservices subsystem for the current deployment adding a proper jboss-deployment-structure.xml descriptor to it. The former approach is recommended, as the latter approach causes most of the webservices Java EE and any JBossWS specific functionality to be disabled."}}

Resolution

EAP 7.x webserverice 비활성화를 통해 내부 Spring module 과 org.apache.cxf modules의 로딩을 위해서 애플리케이션 modules 내부적으로 dependency을 설정

<?xml version="1.0" encoding="UTF-8"?>                                                                                                     <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">           
   <deployment>                                                                   
        <exclude-subsystems>                                                      
             <subsystem name="webservices" />                                     
             <subsystem name="jaxrs" />                                           
        </exclude-subsystems>                                                     
        <dependencies>
           <module name="javax.xml.ws.api"/>   
           <module name="javax.jws.api"/>
        </dependencies>
   </deployment>
</jboss-deployment-structure>

Issue - How to register with JBoss EAP 7.2 Windows Service

How to register with JBoss EAP 7.2 Windows Service

redhat


Test Environment

  • Test OS : Windows NT
  • Test Version : JBoss EAP 7.2

참고

https://access.redhat.com/solutions/3015541

사전 준비

사전 준비물 다운로드

  • Download JBoss EAP 7 release (either jar installer or zip installer) from Red Hat customer portal Software Downloads page.
  • Download any JBoss EAP 7.x.y cumulative patch that you want to install on top of EAP 7.x from this Patches page.
  • Download Apache Jsvc from this Apache Jsvc download page.

시스템 환경 변수 등록

  • Check article Supported Configurations and make sure supported / tested infrastructure (Windows OS, and Java versions, etc.) are used.
    As instructed in Installation Guide, JAVA_HOME and NOPAUSE=1 system environment variables need to be present.

서비스 등록 명령

service.bat install /name "JBoss7-Server01" /controller "localhost:9990" /config "standalone-ha.xml" /jbossuser "admin" /jbosspass "admin1@34" /logpath "E:\app\Redhat\waslog\testsvr01"

** password 특수문자 인식이 안되는 경우 발생 **

같은 NT 장비에 추가적인 서버을 등록을 위해서는 아래와 같은 작업 수행
서비스 등록전에 port-offset 값 standalone.xml 파일에서 수정 (bat에 넣어줄 경우 service.bat에서 인식이 제대로 안됨 )

    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:100}">
rem jbcs-jsvc 파일 경로 수정 필요

set PRUNSRV=
if exist "%JBOSS_HOME%\..\test01-jbcs-jsvc-1.1\sbin\prunsrv.exe" (
  set PRUNSRV="%JBOSS_HOME%\..\test01-jbcs-jsvc-1.1\sbin\prunsrv.exe"
) else if exist "%JBOSS_HOME%\bin\prunsrv.exe" (
  set PRUNSRV="%JBOSS_HOME%\bin\prunsrv.exe"
) else (
  echo Please install native utilities into expected location %JBOSS_HOME%\..\test01-jbcs-jsvc-1.1
  goto cmdEnd
)

서비스 추가 등록

service.bat install /name "JBoss7-Server02" /controller "localhost:10090" /config "standalone-ha.xml" /jbossuser "admin" /jbosspass "admin1@34" /logpath "E:\app\Redhat\waslog\testsvr02"

서비스 등록 해제

service.bat uninstall /name "JBoss7-Server11"


JBoss - How to change the default value of JSESSIONID in EAP7

How to change the default value of JSESSIONID in EAP7

redhat


Test Environment

  • Test OS : CentOS 7.2
  • Test Version : JBoss EAP 6.4
  • Test Version : JBoss EAP 7.2

How to change the default value of JSESSIONID in EAP7

JBoss EAP JSESSIONID 기본값 변경 확인 사항

Issue

JBoss EAP 6.x
In Standalone mode default JSESSIONID is appending machine host name after cookie value

eap6.x

JBoss EAP 7.x
In 7.x mode default JSESSIONID is appending EAP host name and servergroup name after cookie value

eap7.x

Resolution

기존의 standalone 모드의 경우 JSESSIONID만 사용되나 EAP7.X 의 경우 undertow의 io.undertow.server.JvmRouteHandler 가 session id 뒤에 JVM route 값(.instance-id)를 붙이도록 동작하며 instance-id 값은 null 또는 disable 될 수 없으며, 기본 길이 값도 변경이 되어 관련 해서 애플리케이션 조치가 필요.

VS Code-한글-인코딩-깨짐-현상

Welcome file

VSCode 한글 인코딩 깨짐 현상


Test Environment

  • Test OS : Windows 10
  • Test SW : Visual Studio Code

VSCode 사용시 한글 깨짐 현상 해결 방안

에러

encoding

  • 설정 위치 :

    file > Preferences > Settings > Text Editor > File

    해당 값 체크 Auto Guess Encoding

settings

encoding

  • VSCode 재기동

적용 후 모습

encoding_




airpods pro 음량 문제 해결 방법

ㅡㅇ

airpods pro 음량 문제 해결 방법


product name : airpods pro

test product name : galaxy-note10+


에어팟 프로 사용시 소리가 작아서 문제가 발생.

airpods pro

에어팟 프로가 나오자 마자 구입 했지만 이상하게 이용하다 보면 음량이 최저로 변경대는 현상이 발생해서 테스트 하다 적용된 방법을 알려드립니다.

  1. 미디어 음량 동기화 설정
  • 옵션 경로 : 설정 > 연결 > 블루투스 > 고급 > 미디어 음량 동기화

미디어 음량 동기화 설정이 되어야 다른 블루투스 같이 미디어 볼륨으로 조절이 가능

  • 미디어 음량 동기화는 에어팟 프로을 블루투스 연결된 상태에서 확인

볼륨

  1. 미디어 음량 동기화가 설정이 안될 경우
  • 이런 경우 기존에 에어팟을 사용한 사람들에게서 발생할거 같습니다. 기존 에어팟 유저의 경우 개발자 옵션에서 절대 볼륨 사용 안함을 체크해서 사용한 사람들이 많을 텐데 이게 에어팟 프로부터 변경된건지 폰의 차이가 있는건지 해당 설정이 되어 있으면 미디어 음량 동기화 설정이 변경이 안됩니다. 해당 설정을 off 해주고 미디어 음량 동기화 설정을 다시 하면 정상적으로 소리 조절이 가능 합니다.

Video Label

설정 부분 확인시 에어팟이 연결된 상태에서 확인




이 블로그 검색

Popular Posts

WEB&&WAS

OS

Reviews