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

How to encrypt datasource password in JBoss EAP 7.x Case 2

How to encrypt datasource password in JBoss EAP 7.x Case 2


Test Environment

  • Test Version : JBoss EAP 7.2

Set Up a Password Vault

Case 2

Encrypt the data source password.
use below command to encrypt database password,

Case1

#!/bin/sh
echo "####################################"
echo database password changes Encoded
echo -e        " password : \c "
read PASSWORD
echo "####################################"

/SW/was/java1.8/bin/java -cp $JBOSS_HOME/modules/system/layers/base/org/picketbox/main/picketbox-5.0.3.Final-redhat-3.jar:$JBOSS_HOME/modules/system/layers/base/org/jboss/logging/main/jboss-logging-3.3.2.Final-redhat-00001.jar:$CLASSPATH org.picketbox.datasource.security.SecureIdentityLoginModule $PASSWORD 

  • Run View

    password1

Case2

#!/bin/sh

# config setting
export JAVA_HOME="/SW/was/java1.8"
export PATH="/SW/was/java1.8/bin":$PATH
JBOSS_HOME="/SW/was/JBoss7.2"
OVERLAY_DIRECTORY="$JBOSS_HOME/modules/system/layers/base/.overlays"

# password 
echo ""
read -p " password : " PASSWORD
echo ""

if [ -d "$OVERLAY_DIRECTORY" ]; then
    PATCH_SUBDIRECTORY=$(ls -dt $OVERLAY_DIRECTORY/* | grep "CP" | head -n 1)   
    echo patch subdirectory is: "$PATCH_SUBDIRECTORY"
    SEARCH_DIRECTORY="$PATCH_SUBDIRECTORY/org/picketbox/main"
else
    SEARCH_DIRECTORY="$JBOSS_HOME/modules/system/layers/base/org/picketbox/main"
fi

export CLASSPATH=$(find $(cd "$SEARCH_DIRECTORY"; pwd) -name "*.jar" -print | tr '\n' ':')$CLASSPATH

echo "####################################################"
java org.picketbox.datasource.security.SecureIdentityLoginModule "$PASSWORD"
echo "####################################################"
echo ""

  • Run View

    password2

Security Doamin

  • Add Security Doamin

    Secutity1
  • Add Authernticatgion Module

    Secutity2
  • Module Option(key=value)

    Secutity3

    Secutity4
  • Add Datasource > Security > Security Domain

    Secutity5
  • Test Connecation

    Secutity6
  • Standalone.xml or domain.xml 에서 직접 수정시 아래 내용 참고.
               <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                    <driver>h2</driver>
                    <security>
                        <security-domain>encryptedSecurityDB</security-domain>
                    </security>
                </datasource>
.
.
.
                <security-domain name="encryptedSecurityDB" cache-type="default">
                    <authentication>
                        <login-module name="encryptedSecurityDB" code="org.picketbox.datasource.security.SecureIdentityLoginModule" flag="required">
                            <module-option name="username" value="sa"/>
                            <module-option name="password" value="9fdd42c2a7390d3"/>
                            <module-option name="managedConnectionFactoryName" value="jboss.jca:service=LocalTxCM"/>
                        </login-module>
                    </authentication>
                </security-domain>


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 될 수 없으며, 기본 길이 값도 변경이 되어 관련 해서 애플리케이션 조치가 필요.

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)



JBoss - Start, Stop Shell

start-stop-shell-setting

start, stop shell setting

redhat


Test Environment

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

shell

TIP Change password to input method when it comes with security

. ./config/config1.sh
start(){
        PID=`ps -ef | grep jboss | grep "=$NODE_NAME " | awk '{print $2}'`
        if [ e$PID != "e" ]
                then
                echo "###############################################"
                echo "JBOSS PID = $NODE_NAME $PID                    "
                echo "JBoss SERVER - $NODE_NAME is already RUNNING..."
                echo "###############################################"
        exit;
        fi
        echo "#######################"
        echo "   Starting JBoss EAP  "
        echo "#######################"
             nohup $JBOSS_HOME/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.server.base.dir=$SERVER_HOME -bmanagement $SERVER_IP -b $SERVER_IP 1> /dev/null 2>&1 &

        sleep 5
        _up=`netstat -an | grep $CONTROLLER_PORT | grep -v grep | wc -l`
              if [[ "${_up}" != "0" ]]; then
                 echo "###############################################"
                 echo "JBoss Server is Up!! $NODE_NAME  And Running.!!"
                 echo "###############################################"
              else
                 echo "###############################################"
                 echo "JBoss Server is Down!! $NODE_NAME              "
                 echo "###############################################"
              fi;
}

stop(){
        echo "#######################"
        echo "    Stopping JBoss     "
        echo -e " password : \c "
        read PASSWORD
        echo "#######################"
        $JBOSS_HOME/bin/jboss-cli.sh -c --controller=$SERVER_IP:$CONTROLLER_PORT --connect command=:shutdown --user=$USER --password=$PASSWORD

#        $JBOSS_HOME/bin/jboss-cli.sh -c --controller=$SERVER_IP:$CONTROLLER_PORT --connect command=:shutdown --user=$USER --password=$PASSWD
}

status() {
                echo Checking JBoss Status..
                echo Wait for a while...
                        _up=`netstat -an | grep $CONTROLLER_PORT | grep -v grep | wc -l`
                        if [[ "${_up}" != "0" ]]; then
                                echo "###############################################"
                                echo "JBoss Server is Up!! $NODE_NAME  And Running.!!"
                                echo "###############################################"
                        else
                                echo "##################################"
                                echo "JBoss Server is Down!! $NODE_NAME "
                                echo "##################################"
                        fi;
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status
        ;;
  *)
        echo "Usage: jboss {start|stop|status}"
        exit 1
esac
exit 0

Config shell

Start reading the settings for the instance from the file below

#!/bin/sh
DATE=`date +%Y%m%d%H%M%S`

##### Configration File #####
#export CONFIG_FILE=standalone-full-ha.xml
export CONFIG_FILE=standalone-ha.xml
export JBOSS_HOME=/SW/was/JBoss
export USER=admin
export SERVER_HOME=/SW/was/JBoss/TEST/TESTServer11
export SERVER_IP=10.252.16.25
export LOG_PATH=/app/logs/was
export NODE_NAME=TESTServer11
export PORT_OFFSET=750
export JBOSS_USER=admin

##### Bind Address #####
#export BIND_ADDR=10.252.16.24
export MULTICAST_ADDR=230.1.0.1
export JMS_MULTICAST_ADDR=231.7.0.1
export MODCLUSTER_MULTICAST_ADDR=224.0.1.105
export MGMT_ADDR=10.252.16.25
export CONTROLLER_IP=$MGMT_ADDR
let CONTROLLER_PORT=9999+$PORT_OFFSET
export CONTROLLER_PORT

#export LAUNCH_JBOSS_IN_BACKGROUND=true
##### JBoss System module and User module directory #####
#export JBOSS_MODULEPATH=$JBOSS_HOME/modules:$JBOSS_HOME/modules.ext

# JVM Options : Server
export JAVA_OPTS="-server $JAVA_OPTS"

# JVM Options : Memory
export JAVA_OPTS=" $JAVA_OPTS -Xms1024m -Xmx2048m -XX:MaxPermSize=256m"
export JAVA_OPTS=" $JAVA_OPTS -XX:+PrintGCTimeStamps "
export JAVA_OPTS=" $JAVA_OPTS -XX:+PrintGCDetails "
export JAVA_OPTS=" $JAVA_OPTS -Xloggc:$LOG_PATH/log/gclog/gc_$DATE.log "
export JAVA_OPTS=" $JAVA_OPTS -XX:+UseParallelGC "
#export JAVA_OPTS=" $JAVA_OPTS -XX:+UseConcMarkSweepGC "
export JAVA_OPTS=" $JAVA_OPTS -XX:+ExplicitGCInvokesConcurrent "
export JAVA_OPTS=" $JAVA_OPTS -XX:-HeapDumpOnOutOfMemoryError "
export JAVA_OPTS=" $JAVA_OPTS -XX:HeapDumpPath=$LOG_PATH/heap/$NODE_NAME "

# Linux Large Page Setting
#export JAVA_OPTS=" $JAVA_OPTS  -XX:+UseLargePages "
#export JAVA_OPTS=" $JAVA_OPTS -verbose:gc"
export JAVA_OPTS=" $JAVA_OPTS -Djava.net.preferIPv4Stack=true"
export JAVA_OPTS=" $JAVA_OPTS -Dorg.jboss.resolver.warning=true"
export JAVA_OPTS=" $JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000 "
export JAVA_OPTS=" $JAVA_OPTS -Dsun.rmi.dgc.server.gcInterval=3600000"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.byteman"
export JAVA_OPTS=" $JAVA_OPTS -Djava.awt.headless=true"
export JAVA_OPTS=" $JAVA_OPTS -DjvmRoute=$NODE_NAME "
export JDBCDRIVER=oracle.jdbc.pool.OracleConnectionPoolDataSource
export TOKEN_NODE=01

#for darwin
export JAVA_OPTS=" $JAVA_OPTS -Djboss.server.log.dir=$LOG_PATH/$NODE_NAME"
#export JAVA_OPTS=" $JAVA_OPTS -Djboss.server.base.dir=$DOMAIN_BASE/$SERVER_NAME"
#export JAVA_OPTS=" $JAVA_OPTS -Djboss.server.log.dir=$JBOSS_LOG_DIR"
#export JAVA_OPTS=" $JAVA_OPTS -Djboss.external.deployments=$EXTERNAL_DEPLOYMENT"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.socket.binding.port-offset=$PORT_OFFSET"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.node.name=$NODE_NAME"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.bind.address.management=$MGMT_ADDR"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.bind.address=$BIND_ADDR"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.bind_addr=$MULTICAST_ADDR"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.default.jgroups.stack=tcp"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.default.multicast.address=$MULTICAST_ADDR"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.messaging.group.address=$JMS_MULTICAST_ADDR"
export JAVA_OPTS=" $JAVA_OPTS -Djboss.modcluster.multicast.address=$MODCLUSTER_MULTICAST_ADDR"
#export JAVA_OPTS=" $JAVA_OPTS -Dserver.mode=local"
# Use log4j in application
export JAVA_OPTS=" $JAVA_OPTS -Dorg.jboss.as.logging.per-deployment=false "
echo "Config OK"




JBOSS - context root 설정

cipher

JBoss context root settings


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

  1. jboss에서 context root을 /로 사용하고 싶은경우 두군데 수정
#jboss-web.xml에 context-root 잡아주기
#jboss-web.xml 파일 없으면 생성

*.war/WEB-INF
[root@localhost WEB-INF]# vi jboss-web.xml
vi jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>/</context-root>
</jboss-web>
  1. domain.xml 파일의 enable-welcome-root true -> false 로 변경
domain.xml && standalone.xml
../configuration/domain.xml
vi domain.xml
#domain의 경우 범위 확인 필요 (default, ha, full, full-ha)
.
<subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
.



이 블로그 검색

Popular Posts

WEB&&WAS

OS

Reviews