【问题标题】:exposing mule http inbound endpoint暴露 mule http 入站端点
【发布时间】:2013-02-22 16:41:06
【问题描述】:

我无法在 CentOS 服务器上公开 http 端点/地址。最令人困惑的部分是我们能够将其他端点公开为 ajax 等,这些端点位于 mule 安装示例包中。我也无法公开这个简单的回声流。我什至尝试了另一种方法,即为端点显式定义一个 http 连接器以引用.. 仍然无法正常工作。我真的无法理解出了什么问题......在我成功将应用程序部署到 mule 服务器后,这个帖子 9002 甚至没有出现在 netstat 中......

代码如下:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:http="http://www.mulesoft.org/schema/mule/http"
xsi:schemalocation="
    http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
    http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd"> 

<description>
    Sample Flows
</description>

<flow name="echo-flow">
    <http:inbound-endpoint address="http://0.0.0.0:9002/echo" />
    <echo-component />
</flow>

并且我在 pom.xml 下使用,虽然这个示例应用程序不需要其中的所有传输和模块,但在我的原始应用程序中使用它们,因此使用与此相同。

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>mule.user</groupId>
  <artifactId>valexIntegration-esb</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>mule</packaging>

  <name>Self-Contained Standalone Mule Hello World</name>
  <description>The sources for this application were copied from Mule distributable</description>

  <properties>
    <mule.version>3.3.0</mule.version>
  </properties>

  <build>
  <plugins>
            <plugin>
                <groupId>org.mule.tools</groupId>
                <artifactId>maven-mule-plugin</artifactId>
                <version>1.7</version>
                <extensions>true</extensions>
            </plugin>
  </plugins>
    <resources>
      <resource>
        <directory>src/main/app</directory>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
      <version>1.8.1</version>
    </dependency>

    <dependency>
      <groupId>org.mule</groupId>
      <artifactId>mule-core</artifactId>
      <version>${mule.version}</version>
    </dependency>

    <dependency>
      <groupId>org.mule</groupId>
      <artifactId>mule-core</artifactId>
      <version>${mule.version}</version>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>

    <dependency>
      <groupId>org.mule.modules</groupId>
      <artifactId>mule-module-builders</artifactId>
      <version>${mule.version}</version>
    </dependency>

    <dependency>
      <groupId>org.mule.modules</groupId>
      <artifactId>mule-module-scripting</artifactId>
      <version>${mule.version}</version>
    </dependency>

    <dependency>
      <groupId>org.mule.transports</groupId>
      <artifactId>mule-transport-vm</artifactId>
      <version>${mule.version}</version>
    </dependency>

    <dependency>
      <groupId>org.mule.transports</groupId>
      <artifactId>mule-transport-http</artifactId>
      <version>${mule.version}</version>
    </dependency>

    <dependency>
      <groupId>org.mule.transports</groupId>
      <artifactId>mule-transport-servlet</artifactId>
      <version>${mule.version}</version>
    </dependency>

    <dependency>
      <groupId>org.mule.transports</groupId>
      <artifactId>mule-transport-stdio</artifactId>
      <version>${mule.version}</version>
    </dependency>

    <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.9</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>mule-deps</id>
      <name>Mule Dependencies</name>
      <url>http://dist.codehaus.org/mule/dependencies/maven2</url>
    </repository>
  </repositories>
</project>

【问题讨论】:

  • 这不仅在 CentOS 服务器上运行,而且在我的 Windows 8 上运行良好......其他具有 ajax 和码头入站(入口点)端点工作的骡子应用程序......不确定哪里出了问题。 ..任何帮助都非常感谢..

标签: http mule


【解决方案1】:

似乎问题不在于流程配置,甚至不在于 mule 本身。 我建议你在操作系统领域寻找线索,例如:

  1. 端口 9002 在服务器的所有网络接口中都可用吗?由于您尝试将其绑定到 0.0.0.0 地址,因此它会尝试将它们绑定到所有接口。

  2. mule 启动日志中是否有错误?还是开始没问题?

  3. 如果没有错误,可以从服务器内部访问地址吗?不仅是 127.0.0.1:9002,还有所有其他可能的网络接口(及其各自的 IP 地址)。

  4. 如果您可以从机器内部访问,但不能从外部访问(或者即使您无法从内部访问),您是否检查过是否存在防火墙规则或端口阻塞或其他问题在此服务器中强制执行安全措施?不仅要考虑内核和内部规则,还要考虑路由器或防火墙中的网络规则。

请向我们提供 mule 启动日志,以便我们了解更多线索。

【讨论】:

    猜你喜欢
    • 2012-12-28
    • 2012-04-26
    • 2017-01-03
    • 1970-01-01
    • 1970-01-01
    • 2014-04-15
    • 2020-01-15
    • 1970-01-01
    • 2014-09-21
    相关资源
    最近更新 更多