简体   繁体   English

无法将 php stomp 连接到远程 activemq

[英]unable to connect php stomp to remote activemq

Code代码

try {
    $stomp = new Stomp('tcp://xx:xxx:xxx:xxx:61616','admin','admin'); 
    // connection to remote server
} catch(StompException $e) {
    die('Connection failed: ' . $e->getMessage());
}

Result结果

Connection failed: Server is not responding

above code work fine for localhost or intranet but not for outside IP,上面的代码适用于localhost或内联网,但不适用于外部 IP,

Connection to same server by using java code work but not by using php stomp使用 java 代码连接到同一台服务器,但不能使用 php stomp

Typically the port 61616 is the OpenWire port for the broker and as such a STOMP client will not be able to connect to it.通常,端口 61616 是代理的 OpenWire 端口,因此 STOMP 客户端将无法连接到它。 If you've configured that as STOMP and still cannot get to it from outside the local network then it is likely a firewall issue or some other network policy inhibiting the ability of the client to get through.如果您已将其配置为 STOMP,但仍无法从本地网络外部访问它,则可能是防火墙问题或某些其他网络策略阻止了客户端通过的能力。 There isn't much anyone outside your administration can do since we don't know your configuration or network topology.由于我们不知道您的配置或网络拓扑,因此您的管理之外的任何人都无能为力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM