0

Ejabberd サーバーを Mule ESB コミュニティ エディションの後ろに配置しようとしました。つまり、Ejabberd サーバーへのすべてのメッセージは最初に ESB に送られる必要があります。

次のxml構成として、ドキュメントでxmppコネクタを使用しました。

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:spring="http://www.springframework.org/schema/beans"
  xmlns:xmpp="http://www.mulesoft.org/schema/mule/xmpp"
  xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio"
  xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
    http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
    http://www.mulesoft.org/schema/mule/xmpp http://www.mulesoft.org/schema/mule/xmpp/3.1/mule-xmpp.xsd
    http://www.mulesoft.org/schema/mule/stdio http://www.mulesoft.org/schema/mule/stdio/3.1/mule-stdio.xsd">

    <xmpp:connector name="xmppConnector" host="192.168.1.132" port="5222" user="whh@whh.com" password="password"/>

    <flow name="stdio2xmpp">
        <stdio:inbound-endpoint system="IN"/>
        <xmpp:outbound-endpoint type="CHAT" recipient="sjc@whh.com"/>
    </flow>

    <flow name="xmpp2stdio">
        <xmpp:inbound-endpoint type="CHAT" from="sjc@whh.com"/>
        <xmpp:xmpp-to-object-transformer/>
        <stdio:outbound-endpoint system="OUT"/>
    </flow>
</mule>

Pidgin を使用してサーバーにログインできるため、ユーザー名とパスワードは正しいと確信しています。Studio でこのフローを実行しようとすると、常に「サーバーに接続されていません」という例外がスローされます。

Exception in thread "main" org.mule.module.launcher.DeploymentStartException: IllegalStateException: Not connected to server. 
        at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:174) 
        at org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107) 
        at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:47) 
        at org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:56) 
        at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:88) 
        Caused by: org.mule.retry.RetryPolicyExhaustedException: Not connected to server. 
        at org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:105) 
        at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1616) 
        at org.mule.transport.AbstractConnector.start(AbstractConnector.java:428) 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
        at java.lang.reflect.Method.invoke(Unknown Source) 
        at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225) 
        at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276) 
        at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155) 
        at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126) 
        at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80) 
        at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120) 
        at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94) 
        at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90) 
        at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72) 
        at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64) 
        at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:250) 
        at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:151) 
        ... 4 more 
        Caused by: java.lang.IllegalStateException: Not connected to server. 
        at org.jivesoftware.smack.XMPPConnection.addPacketListener(XMPPConnection.java:747) 
        at org.jivesoftware.smackx.ServiceDiscoveryManager.init(ServiceDiscoveryManager.java:270) 
        at org.jivesoftware.smackx.ServiceDiscoveryManager.(ServiceDiscoveryManager.java:80) 
        at org.jivesoftware.smackx.ServiceDiscoveryManager$1.connectionCreated(ServiceDiscoveryManager.java:66) 
        at org.jivesoftware.smack.XMPPConnection.initConnection(XMPPConnection.java:957) 
        at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:904) 
        at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1415) 
        at org.mule.transport.xmpp.XmppConnector.connectToJabberServer(XmppConnector.java:137) 
        at org.mule.transport.xmpp.XmppConnector.doConnect(XmppConnector.java:84) 
        at org.mule.transport.AbstractConnector$5.doWork(AbstractConnector.java:1556) 
        at org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:67) 
        ... 22 more 

誰でもこの問題について考えがありますか?ありがとう。

4

1 に答える 1