繁体   English   中英

连接远程JBoss-eap-6.2以在Java中传递消息

[英]Connecting remote JBoss-eap-6.2 to pass message in java

代码运行到创建连接工厂都没有任何问题,但是它无法创建主题连接。 创建主题连接时,它引发以下异常。(我的代码用于创建发布者和订阅者)这是我收到的终端输出,

Jun 03, 2015 10:51:55 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA-redhat-1
Jun 03, 2015 10:51:55 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA-redhat-1
Jun 03, 2015 10:51:55 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.18.GA-redhat-1
connFactory : HornetQConnectionFactory [serverLocator=ServerLocatorImpl [initial
Connectors=[TransportConfiguration(name=netty, factory=org-hornetq-core-remoting
-impl-netty-NettyConnectorFactory) ?host=172-26-75-72&port=5545], discoveryGroup
Configuration=null], clientID=null, dupsOKBatchSize=1048576, transactionBatchSiz
e=1048576, readOnly=false]
JMSException
javax.jms.JMSException: Failed to create session factory
        at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInter
nal(HornetQConnectionFactory.java:587)
        at org.hornetq.jms.client.HornetQConnectionFactory.createTopicConnection
(HornetQConnectionFactory.java:131)
        at pubsub.Publisher.ConnectionSetup(Publisher.java:55)
        at pubsub.Publisher.sendMessage(Publisher.java:77)
        at pubsub.PubStart.main(PubStart.java:9)
Caused by: HornetQException[errorType=NOT_CONNECTED message=HQ119007: Cannot con
nect to server(s). Tried with all available servers.]
        at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(S
erverLocatorImpl.java:909)
        at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInter
nal(HornetQConnectionFactory.java:583)
        ... 4 more
Jun 03, 2015 10:51:57 AM org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1
$MessageReceiver handleEnd
ERROR: Channel end notification received, closing channel Channel ID 9ebab472 (o
utbound) of Remoting connection 01bb14d2 to /172.26.75.72:4547

由于我通过VPN连接访问此Jboss服务器,因此它们仅允许我访问172.26.75.72:4547。端口为4547,因为在standalone-full.xml文件中将它们设置为100。 打印连接工厂后,我看到它访问另一个端口进行通信,因为它们不允许该端口访问我的代码,因此抛出异常。 直到您在不受限制的网络中工作,都不会引发上述异常。 允许端口4547后,我的代码运行顺利。

暂无
暂无

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

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