Print
카테고리: [ Web Application Server ]
조회수: 9684

1. Management

기본 Management 포트는 9990이다.

09:27:29,056 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
09:27:30,996 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
09:27:31,003 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

WildFly가 외부 인터넷 망에 위치하고 있다면 다른 포트로 변경할 것을 권고한다. 또한  한 호스트에 여러 WildFly를 실행하는 경우에도 다른 포트로 변경해야 한다. 다음은 standalone.xml 내에서 8480 포트로 변경하는 예이다.

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
        <socket-binding name="http" port="${jboss.http.port:8080}"/>
        <socket-binding name="https" port="${jboss.https.port:8443}"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

재기동 후 로그를 확인한다.

16:06:27,986 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:8480/management
16:06:27,992 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:848

http://[호스트]:8480으로 접근한다.

http://[호스트]위와 같이 페이지가 열리지만 “However you have not yet added any users to be able to access the admin console”, 즉 관리자 페이지를 위한 계정이 생성되어 있지 않아 사용이 불가능하다.

2. 관리 계정 생성

관리 계정 생성은 bin 디렉토리 내의 add-user.sh 파일을 이용한다.

$ ./add-user.sh
 
What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): [Enter]
 
Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : wildfly
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 : Password
WFLYDM0101: Password should have at least 1 digit.
Are you sure you want to use the password entered yes/no? yes
Re-enter Password : Password
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: [Enter]
About to add user 'wildfly' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'wildfly' to file '/app/wildfly/standalone/configuration/mgmt-users.properties'
Added user 'wildfly' to file '/app/wildfly/domain/configuration/mgmt-users.properties'
Added user 'wildfly' with groups  to file '/app/wildfly/standalone/configuration/mgmt-groups.properties'
Added user 'wildfly' with groups  to file '/app/wildfly/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? no

3. Management 페이지 접속

관리 페이지 접속 시 계정 인증을 해야 한다.

정상적으로 계정 인증을 하면 Management 페이지를 확인할 수 있다.


4. Management 페이지를 통한 모니터링


5. Management 페이지를 통한 DataSource 생성

커맨드 라인을 통해 DataSource를 생성할 수 있지만 Management를 통해 생성할 수도 있다.