JBoss - EAP7.x domain mode

JBoss - EAP7.x domain mode

redhat

Test Environment

  • OS : Windows NT
  • Version : JBoss EAP 7.2

add-user

  • 사용자 계정 추가
F:\app\Redhat\JBoss7.2\bin>add-user.bat

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): a

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : admin
User 'admin' already exists and is enabled, would you like to...
 a) Update the existing user password and roles
 b) Disable the existing user
 c) Type a new username
(a): a
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should be different from the username
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password :
Re-enter Password :
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]:
Updated user 'admin' to file 'F:\app\Redhat\JBoss7.2\standalone\configuration\mgmt-users.properties'
Updated user 'admin' to file 'F:\app\Redhat\JBoss7.2\domain\configuration\mgmt-users.properties'
Updated user 'admin' with groups  to file 'F:\app\Redhat\JBoss7.2\standalone\configuration\mgmt-groups.properties'
Updated user 'admin' with groups  to file 'F:\app\Redhat\JBoss7.2\domain\configuration\mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="YWRtaW4xMiMk" />

domain mode 사용시 <secret value="YWRtaW4xMiMk" /> 값을 저장

Summary

Every host running in a managed domain must have a unique host name. To ease administration and allow for the use of the same host configuration files on multiple hosts, the server uses the following precedence for determining the host name.

  1. If set, the host element name attribute in the host.xml configuration file.
  2. The value of the jboss.host.name system property.
  3. The value that follows the final period (".") character in the jboss.qualified.host.name system property, or the entire value if there is no final period (".") character.
  4. The value that follows the period (".") character in the HOSTNAME environment variable for POSIX-based operating systems, the COMPUTERNAME environment variable for Microsoft Windows, or the entire value if there is no final period (".") character.

This topic describes how set the name of the host in the configuration file, using either a system property or a hard-coded name.

  1. Edit the host-master.xml or host-slave.xml located in configuration

master

# host name 
<host xmlns="urn:jboss:domain:8.0" name="test-master"> 

slave

# host name
<host xmlns="urn:jboss:domain:8.0" name="slave-node01">

#slave의 jboss.management.http.port port 변경 (one box)
        <management-interfaces>
            <http-interface security-realm="ManagementRealm">
                <http-upgrade enabled="true"/>
                <socket interface="management" port="${jboss.management.http.port:19990}"/>
            </http-interface>
        </management-interfaces>

  1. Check the host-master.xml Domain controller
   <domain-controller>
      <local/>
   </domain-controller>
  1. Edit the host-slave.xml
   <server-identities>
      <secret value="YWRtaW4xMiMk" />
   </server-identities>

Start domain Windows

master
For example:

F:\app\Redhat\JBoss7.2\bin\domain.bat -Djboss.domain.base.dir="F:\app\Redhat\JBoss7.2\master" -b=192.168.0.6 -bmanagement=192.168.0.6 --host-config=host-master.xml 

slave
For example:

# none01
F:\app\Redhat\JBoss7.2\bin\domain.bat -Djboss.domain.base.dir="F:\app\Redhat\JBoss7.2\node01" -b=192.168.0.6 -bmanagement=192.168.0.6 --host-config=host-slave.xml --master-port=9990 --master-address=192.168.0.6 -Djboss.socket.binding.port-offset=1000 

# none02
F:\app\Redhat\JBoss7.2\bin\domain.bat -Djboss.domain.base.dir="F:\app\Redhat\JBoss7.2\node02" -b=192.168.0.6 -bmanagement=192.168.0.6 --host-config=host-slave.xml --master-port=9990 --master-address=192.168.0.6 -Djboss.socket.binding.port-offset=2000 

JBoss EAP 7.2 documentation Runtime Arguments

구성 화면

domain cosole

sample - A practical script for shutting start or stop a server

options:

/host=HOST_NAME/server-config=SERVER_NAME:stop

/host=HOST_NAME/server-config=SERVER_NAME:start

For example:

# stop
F:\app\Redhat\JBoss7.2\bin>jboss-cli.bat --connect controller=192.168.0.6:9990 /host=slave-node01/server-config=test01:stop
{
    "outcome" => "success",
    "result" => "STOPPING"
}

# start
F:\app\Redhat\JBoss7.2\bin>jboss-cli.bat --connect controller=192.168.0.6:9990 /host=slave-node01/server-config=test01:start
{
    "outcome" => "success",
    "result" => "STARTING"
}

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

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




Issue - JBoss Exception in thread “main” java.lang.UnsupportedClassVersionError

1

JBoss Exception in thread “main” java.lang.UnsupportedClassVersionError:

redhat


Test Environment

  • Test OS : CentOS 7.2
  • Test Version : JBoss 7.x

JBoss install Error

  • 문제 현상

    error
 JBoss 설치시 위와 같은 버전 에러 발생시 현재 서버의 설정된 JDK 버전과 JBoss 에서 지원하는 버전이 맞지 않아 발생하는 현상.
  • 해결 방안
지원이 가능한 Java 버전을 설치 후 진행
JBoss EAP 7.x에 대한 supported 지원은 아래의 링크를 확인

관련 링크 : https://access.redhat.com/articles/2026253#[2]

The number following `Unsupported major.minor version` indicates the Java version which was used to compile the class. See [The ClassFile Structure](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1), which describes the class file format of the Java Virtual Machine.

Major Version Class File Format
Java SE 13 57 (0x39 hex)
Java SE 12 56 (0x38 hex)
Java SE 11 55 (0x37 hex)
Java SE 10 54 (0x36 hex)
Java SE 9 53 (0x35 hex)
Java SE 8 52 (0x34 hex)
Java SE 7 51 (0x33 hex)



windows doskey 명령어로 매크로 기능 이용하기

Welcome file


Windows cmd doskey 명령어로 매크로 기능 이용하기


Test Environment

  • Test OS : Windows 10

windows에서 CMD로 명령어를 수행하다 보면 Liunx에서 사용하던 명령어때문에 항상 헷갈려하는 명령어가

바로 dir = ls 명령어이다.

바로 이부분때문에 찾아본 명령어가 바로 doskey 명령어로 alias처럼 쓰는 방법에 대해 정리 하였다.

우선 사용할 명령어 정의

alias.cmd

@echo off

:: commands
doskey alias   = doskey $*
doskey cat     = type $*
doskey clear   = cls
doskey grep    = find $*
doskey history = doskey /history
doskey man     = help $*
::
doskey kill    = taskkill /PID $*
doskey ls      = dir $*
doskey ll      = dir $*
::
doskey cp      = copy $*
doskey cpr     = xcopy $*
doskey mv      = move $*
doskey rm      = del $*
doskey rmr     = deltree $*
::
doskey ps      = tasklist $*
doskey pwd     = cd
::
doskey sudo    = runas /user:administrator $*

레지스트에 등록하기

regedit

경로 : 컴퓨터\HKEY_CURRENT_USER\Software\Microsoft\Command Processor

이름 : Autorun

데이터 : E:\software\google\2_Shellscript\alias.cmd



적용 화면




Linux a frequently used command

리눅스명령어


Linux a frequently used command


  • Test OS : RedHat 7.2, CentOs 7

  • 수정된 config 파일
#n일 이상 된 xml 파일 찾기  
find . -type f -name "*.xml" -mtime -7 -print
  • 파일 삭제하기
find /app/logs/web/httpd -name "*.log" | sort  
#7일 초과한 파일 삭제하기
find /log/server1 -name "*.log" -mtime +7 -delete  
find /log/server1 -name "*.log" -mtime +7 -exec rm {} \;  
#30일 이상 된 로그 파일만 삭제  
find /log/server1 -type f -name "*.log" -ctime +30 -exec rm -rf {} \;  
  • 특정 사이즈 이상 보기
find . -size +3000000k -exec ls -lh {} \+  
  • 옛 파일부터 보기
ls --time-style="+%Y-%m-%d %H:%M:%S" -altr | grep ^- | more  
  • webserver 동시접속자 체크
netstat -nap | grep 80 | grep ESTABLISHED | wc -l
netstat -nap | grep 8080 | grep ESTABLISHED | wc -l
  • DB 연결풀 정보 확인
netstat -anp|grep {port_number}
netstat -anp|grep {port_number} | sort -nk 7
netstat -anp|grep {port_number} | sort -nk 7 | wc -l
ps -ef|grep {process_ID}
  • 메모리 체크
TOTAL=`free | grep ^Mem | awk '{print $2}'`
USED1=`free | grep ^Mem | awk '{print $3}'`
USED2=`free | grep ^-/+ | awk '{print $3}'`
NOMINAL=$((100*USED1/TOTAL))
ACTUAL=$((100*USED2/TOTAL))
echo NOMINAL=${NOMINAL}% ACTUAL=${ACTUAL}%

#RedHat 
TOTAL=`free | grep ^Mem | awk '{print $2}'`
USED1=`free | grep ^Mem | awk '{print $3}'`
USED2=`free | grep ^Mem | awk '{print $5}'`
NOMINAL=$((100*USED1/TOTAL))
ACTUAL=$((100*USED2/TOTAL))
echo NOMINAL=${NOMINAL}% ACTUAL=${ACTUAL}%

awk '/^Mem/ {printf("%u%%", 100*$3/$2);}' <(free -m)
awk '/^Mem/ {printf("%u%%", 100*$5/$1);}' <(free -m) 



이 블로그 검색

Popular Posts

WEB&&WAS

OS

Reviews