WSO2 ESB 4.9.0忽略声明的axis2绑定地址

时间:2016-01-20 13:23:11

标签: wso2 wso2esb wso2carbon

问题如下:

1)我们有一台具有多个接口的机器(每个接口都有自己的IP),我们希望将一个特定的IP绑定到ESB代理服务(出于安全原因)。

2)我们正在关注WSO2文档以设置主机名和端口:https://docs.wso2.com/display/ESB490/Setting+Up+Host+Names+and+Ports

3)我们更改了axis2.xml配置文件,使用所选IP编辑了2个参数“bind-address”和“WSDLEPRPrefix”:

<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
    <parameter name="port" locked="false">8280</parameter>
    <parameter name="bind-address" locked="false">10.10.16.15</parameter>
    <parameter name="WSDLEPRPrefix" locked="false">http://10.10.16.15:8280</parameter>
</transportReceiver>

4)当我们启动ESB时,日志输出以下行:

[01/20/2016 14: 13: 28.087] INFO - PassThroughHttpSSLListener Starting Pass-through HTTPS Listener ...
[01/20/2016 14: 13: 28.093] INFO - PassThroughListeningIOReactorManager Pass-through HTTPS Listener started on 0.0.0.0:8243
[01/20/2016 14: 13: 28.093] INFO - PassThroughHttpListener Starting Pass-through HTTP Listener ...
[01/20/2016 14: 13: 28.094] INFO - PassThroughListeningIOReactorManager Pass-through HTTP Listener started on 0.0.0.0:8280

我们可以看到在端口8280上绑定了所有IP(0.0.0.0),而不是10.10.16.15。我们还使用netstat命令检查绑定。

注意:我们还发现此配置项(https://wso2.org/jira/browse/ESBJAVA-3117)上存在一个错误,该错误本应在ESB版本4.9.0中解决。

os是Centos 7,带有jdk oracle jdk1.7.0_79。

在文件axis2.xml中有以下内容:

<! - ============================================== === ->
    <! - Transport Ins (Listeners) ->
    <! - ============================================== === ->

     <TransportReceiver name = "http" class = "org.apache.synapse.transport.passthru.PassThroughHttpListener">
        <Parameter name = "port" locked = "false"> 8280 </ parameter>
        <Parameter name = "non-blocking" locked = "false"> false </ parameter>
        <Parameter name = "bind-address" locked = "false"> 10.10.16.15 </ parameter>
        <Parameter name = "WSDLEPRPrefix" locked = "false"> http://10.11.35.10 </ parameter>
        <Parameter name = "httpGetProcessor" locked = "false"> org.wso2.carbon.mediation.transport.handlers.PassThroughNHttpGetProcessor </ parameter>
        <! - <Parameter name = "priorityConfigFile" locked = "false"> location of priority configuration file </ parameter> ->
    </ TransportReceiver>

     <TransportReceiver name = "https" class = "org.apache.synapse.transport.passthru.PassThroughHttpSSLListener">
        <Parameter name = "port" locked = "false"> 8243 </ parameter>
        <Parameter name = "non-blocking" locked = "false"> false </ parameter>
        <Parameter name = "HttpsProtocols"> TLSv1, TLSv1.1, TLSv1.2 </ parameter>
        <Parameter name = "bind-address" locked = "false"> 10.10.16.15 </ parameter>
        <Parameter name = "WSDLEPRPrefix" locked = "false"> https://10.11.35.10 </ parameter>
        <Parameter name = "httpGetProcessor" locked = "false"> org.wso2.carbon.mediation.transport.handlers.PassThroughNHttpGetProcessor </ parameter>
        <Parameter name = "keystore" locked = "false">

我机器上的IP如下:

ip addr show
1: I: <LOOPBACK, UP, LOWER_UP> mtu 65536 qdisc NOQUEUE been UNKNOWN
    link / loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
    inet 127.0.0.1/8 brooms host the
       valid_lft forever preferred_lft forever
    inet6 :: 1/128 brooms host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 qdisc pfifo_fast been UP qlen 1000
    link / ether 52: 54: 00: 3b: 09: 4e brd ff: ff: ff: ff: ff: ff
    inet 10.10.16.15/21 brd 10.10.23.255 brooms global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80 :: 5054: ff: fe3b: 94th / 64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 qdisc pfifo_fast been UP qlen 1000
    link / ether 52: 54: 00: 5b: aa: c8 brd ff: ff: ff: ff: ff: ff
4: eth2: <BROADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 qdisc pfifo_fast been UP qlen 1000
    link / ether 52: 54: 00: 38: b5: 80 brd ff: ff: ff: ff: ff: ff
    inet 10.11.34.15/24 brd 10.11.34.255 global scope eth2
       valid_lft forever preferred_lft forever
    inet 10.11.34.25/24 brd 10.11.34.255 brooms global secondary eth2: 0
       valid_lft forever preferred_lft forever
    inet6 fe80 :: 5054: ff: fe38: B580 / 64 scope link
       valid_lft forever preferred_lft forever
5: eth3: <BROADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 qdisc pfifo_fast been UP qlen 1000
    link / ether 52: 54: 00: e4: 6d: 86 brd ff: ff: ff: ff: ff: ff
    inet 10.11.35.5/24 brd 10.11.35.255 global scope eth3
       valid_lft forever preferred_lft forever
    inet 10.11.35.10/24 brd 10.11.35.255 brooms global secondary eth3: 0
       valid_lft forever preferred_lft forever
    inet6 fe80 :: 5054: ff: FEE4: 6d86 / 64 scope link
       valid_lft forever preferred_lft forever

这是日志:

[Root @ frontend01 ~] # /opt/wso2esb-4.9.0/bin/wso2server.sh
JAVA_HOME environment variable is September to /opt/jdk1.7.0_79/
CARBON_HOME environment variable is September to /opt/wso2esb-4.9.0
[01/20/2016 14: 13: 16.543] INFO - CarbonCoreActivator Starting WSO2 Carbon ...
[01/20/2016 14: 13: 16.546] INFO - CarbonCoreActivator Operating System: Linux 3.10.0-327.el7.x86_64, amd64
[01/20/2016 14: 13: 16.546] INFO - CarbonCoreActivator Java Home: /opt/jdk1.7.0_79/jre
[01/20/2016 14: 13: 16.546] INFO - CarbonCoreActivator Java Version: 1.7.0_79
[01/20/2016 14: 13: 16.547] INFO - CarbonCoreActivator Java VM: Java HotSpot (TM) 64-Bit Server VM 24.79-b02, Oracle Corporation
[01/20/2016 14: 13: 16.547] INFO - CarbonCoreActivator Carbon Home: /opt/wso2esb-4.9.0
[01/20/2016 14: 13: 16.547] INFO - CarbonCoreActivator Java Temp Dir: /opt/wso2esb-4.9.0/tmp
[01/20/2016 14: 13: 16.547] INFO - CarbonCoreActivator User: root, en-US, Europe / Rome
[01/20/2016 14: 13: 16.637] WARN - SystemValidator Could not validate the system for configuration parameter: CPU
[01/20/2016 14: 13: 16.639] WARN - ValidationResultPrinter Carbon is configured to use the default keystore (wso2carbon.jks). To maximize security When deploying to a production environment, configure a new keystore with a unique password for the production server profile.
[01/20/2016 14: 13: 16.644] INFO - AgentHolder Agent created!
[01/20/2016 14: 13: 16.657] INFO - AgentDS Successfully deployed Agent Client
[01/20/2016 14: 13: 17.949] INFO - EmbeddedRegistryService Configured Registry in 56ms
[01/20/2016 14: 13: 18.012] INFO - RegistryCoreServiceComponent Registry Mode: READ-WRITE
[01/20/2016 14: 13: 19.267] INFO - SolrClient Default Embedded Server Solr Initialized
[01/20/2016 14: 13: 19.455] INFO - UserStoreMgtDSComponent Carbon UserStoreMgtDSComponent activated successfully.
[01/20/2016 14: 13: 23.658] INFO - TaglibUriRule TLD skipped. URI: http://tiles.apache.org/tags-tiles is already defined
[01/20/2016 14: 13: 24.145] INFO - ClusterBuilder Clustering Has Been disabled
[01/20/2016 14: 13: 24.288] INFO - UserStoreConfigurationDeployer User Store Configuration Deployer initiated.
[01/20/2016 14: 13: 24.289] INFO - UserStoreConfigurationDeployer User Store Configuration Deployer initiated.
[01/20/2016 14: 13: 24.297] INFO - PassThroughHttpSSLSender Initializing Pass-through HTTP / S Sender ...
[01/20/2016 14: 13: 24.308] INFO - ClientConnFactoryBuilder HTTPS Loading Identity Keystore from: repository / resources / security / wso2carbon.jks
[01/20/2016 14: 13: 24.310] INFO - ClientConnFactoryBuilder HTTPS Loading Trust Keystore from: repository / resources / security / client-truststore.jks
[01/20/2016 14: 13: 24.324] INFO - PassThroughHttpSSLSender Pass-through HTTPS Sender started ...
[01/20/2016 14: 13: 24.325] INFO - PassThroughHttpSender Initializing Pass-through HTTP / S Sender ...
[01/20/2016 14: 13: 24.326] INFO - PassThroughHttpSender Pass-through HTTP Sender started ...
[01/20/2016 14: 13: 24.333] INFO - PassThroughHttpSSLListener Initializing Pass-through HTTP / S Listener ...
[01/20/2016 14: 13: 24.353] INFO - PassThroughHttpListener Initializing Pass-through HTTP / S Listener ...
[01/20/2016 14: 13: 24.415] INFO - ModuleDeployer Deploying module: addressing-1.6.1-wso2v14 - file: /opt/wso2esb-4.9.0/repository/deployment/client/modules/addressing-1.6.1 -wso2v14.mar
[01/20/2016 14: 13: 24.418] INFO - ModuleDeployer Deploying module: rampart-1.6.1-wso2v12 - file: /opt/wso2esb-4.9.0/repository/deployment/client/modules/rampart-1.6.1 -wso2v12.mar
[01/20/2016 14: 13: 25.121] WARN - DefaultSchemaGenerator We do not support method overloading. Ignoring [validateAudienceRestriction]
[01/20/2016 14: 13: 25.321] INFO - DeploymentEngine Deploying Web services: org.wso2.carbon.message.processor-4.4.10 -
[01/20/2016 14: 13: 25.331] INFO - DeploymentEngine Deploying Web services: org.wso2.carbon.message.store-4.4.10 -
[01/20/2016 14: 13: 25.842] INFO - DeploymentInterceptor Deploying Axis2 service: wso2carbon STS-super-tenant {}
[01/20/2016 14: 13: 25.864] INFO - DeploymentEngine Deploying Web services: org.wso2.carbon.sts-4.5.6 -
[01/20/2016 14: 13: 25.937] INFO - DeploymentEngine Deploying Web services: org.wso2.carbon.tryit-4.4.7 -
[01/20/2016 14: 13: 26.092] INFO - CarbonServerManager Repository: /opt/wso2esb-4.9.0/repository/deployment/server/
[01/20/2016 14: 13: 26.454] INFO - TenantLoadingConfig tenant Using lazy loading policy ...
[01/20/2016 14: 13: 26.468] INFO - PermissionUpdater Permission Cache updated for tenant -1234
[01/20/2016 14: 13: 26.506] INFO - RuleEngineConfigDS Successfully registered the Rule Config service
[01/20/2016 14: 13: 26.532] INFO - ServiceBusInitializer Starting ESB ...
[01/20/2016 14: 13: 26.552] INFO - ServiceBusInitializer Initializing Apache Synapse ...
[01/20/2016 14: 13: 26.555] INFO - SynapseControllerFactory Using Synapse home: /opt/wso2esb-4.9.0/.
[01/20/2016 14: 13: 26.555] INFO - SynapseControllerFactory Using synapse.xml location: /opt/wso2esb-4.9.0/././repository/deployment/server/synapse-configs/default
[01/20/2016 14: 13: 26.555] INFO - SynapseControllerFactory Using server name: 10.11.35.10
[01/20/2016 14: 13: 26.558] INFO - SynapseControllerFactory The timeout handler will run every: 15s
[01/20/2016 14: 13: 26.563] INFO - Axis2SynapseController Initializing at Synapse: Wed Jan 20 14:13:26 CET 2016
[01/20/2016 14: 13: 26.568] INFO - CarbonSynapseController Loading the mediation configuration from the file system
[01/20/2016 14: 13: 26.570] INFO - MultiXMLConfigurationBuilder Building synapse configuration from the synapse artifact repository at: ././repository/deployment/server/synapse-configs/default
[01/20/2016 14: 13: 26.573] INFO - XMLConfigurationBuilder Generating the Synapse configuration model by parsing the XML configuration
[01/20/2016 14: 13: 26.625] INFO - SynapseConfigurationBuilder Loaded Synapse configuration artifact from the repository at: ././repository/deployment/server/synapse-configs/default
[01/20/2016 14: 13: 26.627] INFO - Axis2SynapseController Loading mediator extensions ...
[01/20/2016 14: 13: 26.635] INFO - DeploymentInterceptor Deploying Axis2 service: echo {super-tenant}
[01/20/2016 14: 13: 26.638] INFO - DeploymentEngine Deploying Web services: Echo.aar - file: /opt/wso2esb-4.9.0/repository/deployment/server/axis2services/Echo.aar
[01/20/2016 14: 13: 26.648] INFO - DeploymentInterceptor Deploying Axis2 service: Version {super-tenant}
[01/20/2016 14: 13: 26.651] INFO - DeploymentEngine Deploying Web services: Version.aar - file: /opt/wso2esb-4.9.0/repository/deployment/server/axis2services/Version.aar
[01/20/2016 14: 13: 26.651] INFO - Axis2SynapseController Deploying the Synapse service ...
[01/20/2016 14: 13: 26.655] INFO - Axis2SynapseController Deploying Proxy services ...
[01/20/2016 14: 13: 26.655] INFO - Axis2SynapseController Deploying EventSources ...
[01/20/2016 14: 13: 26.662] INFO - ServerManager Server ready for processing ...
[01/20/2016 14: 13: 26.705] INFO - MediationStatisticsComponent Statistic Reporter is Disabled
[01/20/2016 14: 13: 26.705] INFO - MediationStatisticsComponent Can not register an observer for mediationStatisticsStore. If you have disabled StatisticsReporter, please enable it in the Carbon.xml
[01/20/2016 14: 13: 28.087] INFO - PassThroughHttpSSLListener Starting Pass-through HTTPS Listener ...
[01/20/2016 14: 13: 28.093] INFO - PassThroughListeningIOReactorManager Pass-through HTTPS Listener started on 0.0.0.0:8243
[01/20/2016 14: 13: 28.093] INFO - PassThroughHttpListener Starting Pass-through HTTP Listener ...
[01/20/2016 14: 13: 28.094] INFO - PassThroughListeningIOReactorManager Pass-through HTTP Listener started on 0.0.0.0:8280
[01/20/2016 14: 13: 28.102] INFO - NioSelectorPool Using a shared selector for servlet write / read
[01/20/2016 14: 13: 28.389] INFO - NioSelectorPool Using a shared selector for servlet write / read
[01/20/2016 14: 13: 28.449] INFO - TaskServiceImpl Task service starting in STANDALONE mode ...
[01/20/2016 14: 13: 28.467] INFO - NTaskTaskManager Initialized task manager. Tenant [-1234]
[01/20/2016 14: 13: 28.484] INFO - RegistryEventingServiceComponent Successfully Initialized on Eventing Registry
[01/20/2016 14: 13: 28.517] INFO - JMXServerManager JMX Service URL: service: jmx: rmi: // localhost: 11111 / jndi / rmi: // localhost: 9999 / jmxrmi
[01/20/2016 14: 13: 28.524] INFO - StartupFinalizerServiceComponent Server: WSO2 Enterprise Service Bus-4.9.0
[01/20/2016 14: 13: 28.525] INFO - StartupFinalizerServiceComponent WSO2 Carbon started in 15 seconds
[01/20/2016 14: 13: 28.688] INFO - CarbonUIServiceComponent Mgt Console URL: https://10.11.35.10:9443/carbon/

1 个答案:

答案 0 :(得分:1)

看起来修复程序还没有进入WSO2 ESB 4.9.0。它有Synapse版本&#34; 2.1.3.wso2v11&#34;我在PassThroughHttpListener.java中看不到代码更改。我也没有在GitHub存储库中看到任何相关代码。 https://github.com/wso2/wso2-synapse/search?utf8=%E2%9C%93&q=bind-address

我重新打开了ESBJAVA-3117 JIRA,ESB团队会调查这一点。

谢谢!