简体   繁体   中英

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,

Connection to same server by using java code work but not by using 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. 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. There isn't much anyone outside your administration can do since we don't know your configuration or network topology.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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