【问题标题】:Error connecting to HornetQ via JNDI通过 JNDI 连接到 HornetQ 时出错
【发布时间】:2012-05-30 18:02:17
【问题描述】:

我在通过标准端口 1099 上的 JNDI 连接到我们的远程 HornetQ JMS-Provider(2.2.5,独立)时遇到问题。我不是通过代码而是通过工具 JMS Browser 尝试此操作。 当连接到本地 hornetq 实例时,一切正常。

我得到的错误是:

10:10:38.805 Error connecting to head-sa: Connection refused to host: 127.0.0.1; nested exception is: 

就是这样。 ui 或任何日志中没有堆栈跟踪。 使用 telnet 进行测试给了我另一个见解,它工作正常并给了我(除了神秘的序列化 rmi 对象之外)以下字符串:

# telnet remoteserver 1099
Trying 193.164.8.162...
Connected to remoteserver.
Escape character is '^]'.
��srjava.rmi.MarshalledObject|���c�>.. and so on
UnicastRef2 127.0.0.1Jk��`�w�xConnection closed by foreign host.

现在有趣的部分是UnicastRef2 127.0.0.1,这可能是(但不是)hornetq-configuration.xml 或 hornetq-jms.xml 的配置问题。这些在我的远程主机上是非常标准的,除了 hornetq-configuration.xml:

<acceptor name="netty">
    <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
    <param key="host"  value="${hornetq.remoting.netty.host:0.0.0.0}"/>
    <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>

我什至尝试了到远程主机的隧道,但这给了我相同的结果。 有任何想法吗?谢谢。

【问题讨论】:

    标签: connection jms jndi hornetq


    【解决方案1】:

    我也有类似的问题。

    对我有用的是在 hornetq-bean.xml 和 hornetq 服务器 ip 中配置 JNDI 设置作为绑定地址值。

    【讨论】:

    • 你能提供更详细的信息吗?如果您在谈论 JNDIServer bean 中的 bindAddress 属性,我已经将其更改为 0.0.0.0(更改为 server-ip 也没有帮助)。
    猜你喜欢
    • 2012-01-24
    • 1970-01-01
    • 1970-01-01
    • 2017-12-10
    • 1970-01-01
    • 2023-03-04
    • 2012-08-07
    • 2020-12-24
    • 1970-01-01
    相关资源
    最近更新 更多