Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ JBoss7 configuration - Supports IPv4 and IPv6 dual-stack environment     - Set up MySQL master and slave servers under Ubuntu 14.04 (Server)

- secureCRT remote login Linux must first open the connection protocol (Linux)

- After SSH change the default port, how to use Git (Linux)

- Analysis of Java reflection mechanism (Programming)

- Use Mop monitor stock prices at the Linux command line (Linux)

- Linux cd command Detailed (Linux)

- Install and use automated tools Ansible in CentOS 7 (Linux)

- CentOS 7 install Hadoop-cdh-2.5 on Mesos (Server)

- Let Ubuntu 14.04 Save screen luminance value (Linux)

- GAMIT baseline solution using batch were counted (Linux)

- MySQL Tutorial: Using tpcc-mysql pressure measurement (Database)

- Fedora 20 users install the Mate 1.8 desktop (Linux)

- Copy Recovery using RMAN repository development environment (Database)

- About Linux operating system security (Linux)

- CentOS5 installation Nodejs (Linux)

- pdf.js Tutorial (Linux)

- To share Internet access through NAT mode under Virtual Linux VMware Workstation (Linux)

- Github with .gitignore ignore specified file (Linux)

- CentOS 6.5 can not connect to the network under VMware (Linux)

- Depth study and understanding for individual users suicide DDoS attacks (Linux)

 
         
  JBoss7 configuration - Supports IPv4 and IPv6 dual-stack environment
     
  Add Date : 2017-06-24      
         
       
         
  Because the lab needs of the project will be deployed in the EJB 3.0 JBoss AS 7.1.1.Final in, and required to support IPv4 and IPv6. But the default configuration does not support IPv6, then consult JBoss Community Documentation, namely official documents, find the relevant description in section 5.4.1 Interfaces and ports, after studies JBoss making configuration changes, so that the JBoss EJB 3.0 program can under IPv4 and IPv6 dual-stack environment normal operation, including the client to obtain remote remote interface object under the IPv4 environment, remote method invocation object of udp send and receive IPv6 packets. This article does not go into detail EJB procedures describe how to configure JBoss to support IPv4 and IPv6 dual-stack environment.

Article structure:

    The first part --JBoss7.1 official documentation for instructions on IPv6 section

    The second part - the project described in detail in the configuration file for the JBoss modified

The first part --JBoss7.1 official documentation for instructions on IPv6 section

5.4.1 Interfaces and ports

Interface declarations

    domain.xml, host.xml and standalone.xml contain declarations portion of the interface. When we look at these interfaces declared in an XML file, you will find the interface of selection criteria (selection criteria), there are two types: one is a separate XML element, an interface bound to the wildcard address; the other is the interface or address one or more characteristic values ​​required to meet.

    For example, the first condition is an example of an interface of choice, each interface has a specific IP address:

< Interfaces>
  < Interface name = "management">
    < Inet-address value = "127.0.0.1" />
  < / Interface>
  < Interface name = "public">
    < Inet-address value = "127.0.0.1" />
  < / Interface>
< / Interfaces>

    Next is an example of using wildcards:

< Interface name = "global">
  < -! Use the wildcard address ->
  < Any-address />
< / Interface>

< Interface name = "ipv4-global">
  < -! Use the IPv4 wildcard address ->
  < Any-ipv4-address />
< / Interface>

< Interface name = "ipv6-global">
  < -! Use the IPv6 wildcard address ->
  < Any-ipv6-address />
< / Interface>

< Interface name = "external">
  < Nic name = "eth0" />
< / Interface>

Socket Binding Groups

    JBoss AS 7 configuration similar to the socket interface declaration, Sockets use a logical name to the statement, it can be referenced in the entire configuration. A plurality Sockets declaration can declare a particular name as a group. In such a configuration in the management domain of the server group can easily reference a particular socket binding group. Socket binding group referred to by the logical name of the interface Interface:

< Socket-binding-group name = "standard-sockets" default-interface = "public">
  < Socket-binding name = "jndi" port = "1099" />
  < Socket-binding name = "jmx-connector-registry" port = "1090" />
  < Socket-binding name = "jmx-connector-server" port = "1091" />
  < Socket-binding name = "http" port = "8080" />
  < Socket-binding name = "https" port = "8443" />
  < Socket-binding name = "jacorb" port = "3528" />
  < Socket-binding name = "jacorb-ssl" port = "3529" />
  < Socket-binding name = "osgi-http" port = "8090" />
  < Socket-binding name = "remoting" port = "4447" />
  < Socket-binding name = "txn-recovery-environment" port = "4712" />
  < Socket-binding name = "txn-status-manager" port = "4713" />
  < Socket-binding name = "messaging" port = "5445" />
  < Socket-binding name = "messaging-throughput" port = "5455" />
< / Socket-binding-group>

A socket binding contains the following information:
name - socket configured logical names can be referenced elsewhere in the configuration.
port - this configuration socket to bind to the base port (note server can be configured to cover the increase or decrease in value by all ports configured.)
interface (Optional) - configuration socket to be bound to the logical name of the interface (refer to the above interface declaration). If not specified, default-interface attribute socket binding group configuration element will be used.
multicast-address (optional) - If the socket for multicast, will use the multicast address.
multicast-port (optional) - If the socket for multicast, will use the multicast port
fixed-port (optional, defaults to false) - If true, the port value will always use this value, the value is not to cover the increase or decrease in the value of the port.

IPv4 versus IPv6

    JBoss AS7 supports the use of both IPv4 and IPv6 addresses. By default, AS7 is configured for use in an IPv4 network and so if you are running AS7 in an IPv4 network, no changes are required. If you need to run AS7 in an IPv6 network, the changes required are minimal and involve changing the JVM stack and address preferences, and adjusting any interface IP address values ​​specified in the configuration (standalone.xml or domain.xml).

Stack and address preference

    The system properties java.net.preferIPv4Stack and java.net.preferIPv6Addresses are used to configure the JVM for use with IPv4 or IPv6 addresses. With AS7, in order to run using IPv4 addresses, we need to specify java.net.preferIPv4Stack = true ; in order to run the AS7 with IPv6 addresses, we need to specify java.net.preferIPv4Stack = false (the JVM default) and java.net.preferIPv6Addresses = true The latter ensures that any hostname to IP address conversions always return IPv6 address. variants.

    These system properties are conveniently set by the JAVA_OPTS environment variable, defined in the standalone.conf (or domain.conf) file. For example, to change the IP stack preference from its default of IPv4 to IPv6, edit the standalone.conf (or domain.conf) file and change its default IPv4 setting:

if [ "x $ JAVA_OPTS" = "x"]; then
JAVA_OPTS = "... -Djava.net.preferIPv4Stack = true ..."
...

to an IPv6 suitable setting:

if [ "x $ JAVA_OPTS" = "x"]; then
JAVA_OPTS = "... -Djava.net.preferIPv4Stack = false -Djava.net.preferIPv6Addresses = true ..."
...

IP address literals

    To change the IP address literals referenced in standalone.xml (or domain.xml), first visit the interface declarations and ensure that valid IPv6 addresses are being used as interface values. For example, to change the default configuration in which the loopback interface is used as the primary interface, change from the IPv4 loopback address:

< Interfaces>
  < Interface name = "management">
    < Inet-address value = "$ {jboss.bind.address.management:127.0.0.1}" />
  < / Interface>
  < Interface name = "public">
    < Inet-address value = "$ {jboss.bind.address: 127.0.0.1}" />
  < / Interface>
< / Interfaces>

to the IPv6 loopback address:

< Interfaces>
  < Interface name = "management">
    < Inet-address value = "$ {jboss.bind.address.management: [:: 1]}" />
  < / Interface>
  < Interface name = "public">
    < Inet-address value = "$ {jboss.bind.address: [:: 1]}" />
  < / Interface>
< / Interfaces>

    Note that when embedding IPv6 address literals in the substitution expression, square brackets surrounding the IP address literal are used to avoid ambiguity. This follows the convention for the use of IPv6 literals in URLs.
    Over and above making such changes for the interface definitions, you should also check the rest of your configuration file and adjust IP address literals from IPv4 to IPv6 as required.

The second part - the project described in detail in the configuration file for the JBoss modified

    According to the above description, in order to make JBoss support IPv6, we need to modify the JBoss two profiles. First, modify the declaration section standalone.xml interfaces and socket port binding; Second, modify standalone.conf inside the JVM stack and address preferences.

    1. standalone.xml, file path: $ JBOSS-HOME / standalone / configuration

    Open to see the interface declaration section (interfaces) and the socket port binding part (socket-binding-group-) initial state as follows. Interface declaration management, public, unsecure jboss specify the local loopback address, socket bound default interface is public, the first three are designated management interfaces, unsecure unused interfaces.

< Interfaces>
        < Interface name = "management">
            < Inet-address value = "$ {jboss.bind.address.management:127.0.0.1}" />
        < / Interface>
        < Interface name = "public">
            < Inet-address value = "$ {jboss.bind.address: 127.0.0.1}" />
        < / Interface>
        < Interface name = "unsecure">
            < Inet-address value = "$ {jboss.bind.address.unsecure: 127.0.0.1}" />
        < / Interface>
    < / Interfaces>

    < Socket-binding-group name = "standard-sockets" default-interface = "public" port-offset = "$ {jboss.socket.binding.port-offset: 0}">
        < Socket-binding name = "management-native" interface = "management" port = "$ {jboss.management.native.port: 9999}" />
        < 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: 9443}" />
        < Socket-binding name = "ajp" port = "8009" />
        < Socket-binding name = "http" port = "8080" />
        < Socket-binding name = "https" port = "8443" />
        < Socket-binding name = "osgi-http" interface = "management" port = "8090" />
        < Socket-binding name = "remoting" port = "4447" />
        < 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>

    To meet JBoss to support IPv4 and IPv6 dual-stack environment, the selection criteria will have to modify the interface to bind to the wildcard status, namely < any-address />, and the socket is bound portion may not modify,

Interface Declarations section modified as follows:

< Interfaces>
        < Interface name = "management">
            < Any-address />
        < / Interface>
        < Interface name = "public">
            < Any-address />
        < / Interface>
        < Interface name = "unsecure">
            < Inet-address value = "$ {jboss.bind.address.unsecure: 127.0.0.1}" />
        < / Interface>
    < / Interfaces>

    2. standalone.conf.bat, file path: $ JBOSS-HOME / bin

    Note that this modification is not standalone.conf file because modify the file does not make IPv6 address to take effect, pro-test only modify standalone.conf.bat file to take effect. Modification method and a first portion inside Stack and address preference subsections describe as -Djava.net.preferIPv4Stack = true is to modify -Djava.net.preferIPv4Stack = false -Djava.net.preferIPv6Addresses = true can be, so the JVM startup time the default is the IPv6 address format, view the printout to verify correct.

Calling "K: \ jboss-as-7.1.1.Final \ bin \ standalone.conf.bat"
================================================== =============================

  JBoss Bootstrap Environment

  JBOSS_HOME: K: \ jboss-as-7.1.1.Final

  JAVA: C: \ Program Files (x86) \ Java \ jdk1.7.0_79 \ bin \ java

  JAVA_OPTS: -XX: + TieredCompilation -Dprogram.name = standalone.bat -Xms64M -Xmx51
2M -XX: MaxPermSize = 256M -Dsun.rmi.dgc.client.gcInterval = 3600000 -Dsun.rmi.dgc.se
rver.gcInterval = 3600000 -Djava.net.preferIPv4Stack = false -Djava.net.preferIPv6Ad
dresses = true -Dorg.jboss.resolver.warning = true -Djboss.modules.system.pkgs = org.j
boss.byteman -Djboss.server.default.config = standalone.xml

================================================== =============================

22:39: 47,729 information [org.jboss.modules] JBoss Modules version 1.1.1.GA
22: 39: 48,182 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
22: 39: 48,322 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" sta
rting
22: 39: 50,572 INFO [org.xnio] XNIO Version 3.0.3.GA
22: 39: 50,572 INFO [org.jboss.as.server] JBAS015888: Creating http management se
rvice using socket-binding (management-http)
22: 39: 50,604 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
22: 39: 50,619 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
22: 39: 50,666 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log han
dlers
22: 39: 50,682 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Po
ol - 31) JBAS010280: Activating Infinispan subsystem.
22: 39: 50,729 INFO [org.jboss.as.naming] (ServerService Thread Pool - 38) JBAS0
11800: Activating Naming Subsystem
22: 39: 50,744 INFO [org.jboss.as.configadmin] (ServerService Thread Pool - 26)
JBAS016200: Activating ConfigAdmin Subsystem
22: 39: 50,776 INFO [org.jboss.as.connector] (MSC service thread 1-1) JBAS010408:
 Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
22: 39: 50,776 INFO [org.jboss.as.security] (ServerService Thread Pool - 44) JBA
S013101: Activating Security Subsystem
22: 39: 50,807 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS01
5400: Bound mail session [java: jboss / mail / Default]
22: 39: 50,791 INFO [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: St
arting Naming Service
22: 39: 50,885 INFO [org.jboss.as.webservices] (ServerService Thread Pool - 48)
JBAS015537: Activating WebServices Extension
22: 39: 51,010 INFO [org.jboss.as.osgi] (ServerService Thread Pool - 39) JBAS011
940: Activating OSGi Subsystem
22: 39: 51,010 INFO [org.jboss.as.connector.subsystems.datasources] (ServerServic
e Thread Pool - 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Dr
iver (version 1.3)
22: 39: 51,026 INFO [org.jboss.as.security] (MSC service thread 1-2) JBAS013100:
Current PicketBox version = 4.0.7.Final
22: 39: 51,385 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC se
rvice thread 1-8) JBoss Web Services - Stack CXF Server 4.0.2.GA
22: 39: 52,135 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread
 1-4) Starting Coyote HTTP / 1.1 on http - 0_0_0_0_0_0_0_0-8080
22: 39: 52,526 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100:
Listening on / 0: 0: 0: 0: 0: 0: 0: 0: 4447
22: 39: 52,526 INFO [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100:
Listening on / 0: 0: 0: 0: 0: 0: 0: 0: 9999
22: 39: 52,526 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread
1-8) JBAS015012: Started FileSystemDeploymentService for directory K: \ jboss-as-7
.1.1.Final \ Standalone \ deployments
22: 39: 52,838 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service
thread 1-8) JBAS010400: Bound data source [java: jboss / datasources / ExampleDS]
22: 39: 53,073 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin con
sole listening on http: // [0: 0: 0: 0: 0: 0: 0: 0]: 9990
22: 39: 53,073 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS
7.1.1.Final "Brontes" started in 6079ms - Started 133 of 209 services (75 servic
es are passive or on-demand)

p.s. any errors also urge great God who criticism, thank you very much!
     
         
       
         
  More:      
 
- Setting Squid successful anti-hotlinking (Linux)
- Oracle 12C with multi-column index (Database)
- GO five stages of language learning (Programming)
- Install the system cleaning software under Linux: BleachBit 1.4 (Linux)
- using Docker Kitematic on windows (Linux)
- ld.so.conf.d profile (Linux)
- Linux Command Line Art (Linux)
- DB2 table space is redirected to restore the database combat (Database)
- To compile and install OpenCV-2.3.1 FFmpeg-2.1.2 under CentOS (Linux)
- Orionode source Linux Mint installation (Linux)
- CentOS network configuration 7, and set the host name and IP-bound problems (Linux)
- How to use the Vault secure password storage and API key (Linux)
- Linux shell string interception and stitching (Linux)
- Android Get App version number and version name (Programming)
- Django Signals from practice to source code analysis (Programming)
- The correct method to modify the maximum number of concurrent connections Tomcat 7 (Server)
- swap space is insufficient cause OOM kill MySQL Case (Database)
- MySQL 5.6 master-slave replication configuration (Database)
- Inxi: Get Linux system and hardware information (Linux)
- Radius server setup under CentOS (Server)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.