- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试启动 ActiveMQ 5.11,我看到了如下的 WARNING
:
WARN | Transport Connection to: tcp://127.0.0.1:40890 failed: java.io.EOFException
我的activemq.xml
如下:
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:${JMS_PORT}" />
<transportConnector name="stomp" uri="stomp://0.0.0.0:${JMS_STOMP_PORT}"/>
<transportConnector name="ssl" uri="ssl://0.0.0.0:${JMS_SSL_PORT}"/>
</transportConnectors>
<sslContext>
<sslContext
keyStore="file:${JMS_KEY_STORE}"
keyStorePassword="${JMS_KEY_STORE_PASSWORD}"
trustStore="file:${JMS_TRUST_STORE}"
trustStorePassword="${JMS_TRUST_STORE_PASSWORD}"
/>
</sslContext>
<networkConnectors>
<networkConnector
name="host1 and host2"
uri="static://(${JMS_X_SITE_CSV_URL})?wireFormat=ssl&wireFormat.maxInactivityDuration=30000"
dynamicOnly="true"
suppressDuplicateQueueSubscriptions = "true"
networkTTL="1"
/>
</networkConnectors>
这是完整的控制台日志:
Java Runtime: Oracle Corporation 1.7.0_05 /usr/java/jdk1.7.0_05/jre
Heap sizes: current=1004928k free=994439k max=1004928k
JVM args: -Xmx1G -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/home/dragon/activemq/conf/login.config -Dcom.sun.management.jmxremote -Djava.io.tmpdir=/home/dragon/activemq/tmp -Dactivemq.classpath=/home/dragon/activemq/conf; -Dactivemq.home=/home/dragon/activemq -Dactivemq.base=/home/dragon/activemq -Dactivemq.conf=/home/dragon/activemq/conf -Dactivemq.data=/home/dragon/activemq/data
Extensions classpath:
[/home/dragon/activemq/lib,/home/dragon/activemq/lib/camel,/home/dragon/activemq/lib/optional,/home/dragon/activemq/lib/web,/home/dragon/activemq/lib/extra]
ACTIVEMQ_HOME: /home/dragon/activemq
ACTIVEMQ_BASE: /home/dragon/activemq
ACTIVEMQ_CONF: /home/dragon/activemq/conf
ACTIVEMQ_DATA: /home/dragon/activemq/data
Loading message broker from: xbean:activemq.xml
INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@a842913: startup date [Fri Oct 07 08:14:02 IST 2016]; root of context hierarchy
INFO | PListStore:[/home/dragon/activemq/data/divinedragonbox/tmp_storage] started
INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/home/dragon/jms_store]
INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:15526/jmxrmi
INFO | KahaDB is version 5
INFO | Recovering from the journal ...
INFO | Recovery replayed 76 operations from the journal in 0.032 seconds.
INFO | Apache ActiveMQ 5.11.1 (divinedragonbox, ID:divinedragonbox-60914-1475824445361-0:1) is starting
INFO | Listening for connections at: tcp://divinedragonbox:15511
INFO | Connector openwire started
INFO | Listening for connections at: stomp://divinedragonbox:15512
INFO | Connector stomp started
INFO | Listening for connections at: ssl://divinedragonbox:15571
INFO | Connector ssl started
INFO | Establishing network connection from vm://divinedragonbox?async=false&network=true to ssl://localhost:15571
INFO | Connector vm://divinedragonbox started
INFO | Network Connector DiscoveryNetworkConnector:host1 and host2:BrokerService[divinedragonbox] started
INFO | Apache ActiveMQ 5.11.1 (divinedragonbox, ID:divinedragonbox-60914-1475824445361-0:1) started
INFO | For help or more information please see: http://activemq.apache.org
INFO | divinedragonbox Shutting down
INFO | Connector vm://divinedragonbox stopped
INFO | divinedragonbox bridge to Unknown stopped
WARN | Transport Connection to: tcp://127.0.0.1:40890 failed: java.io.EOFException
INFO | ActiveMQ WebConsole available at http://localhost:15521/
INFO | Initializing Spring FrameworkServlet 'dispatcher'
INFO | jolokia-agent: No access restrictor found at classpath:/jolokia-access.xml, access to all MBeans is allowed
我为消息启用了 TRACE,我在日志文件中得到了以下异常片段。
2016-10-07 08:15:45,378 | TRACE | Execute[ActiveMQ ForwardingBridge StopTask] runnable: org.apache.activemq.network.DemandForwardingBridgeSupport$4@b3f451d | org.apache.activemq.thread.TaskRunnerFactory | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,378 | TRACE | Created and running thread[ActiveMQ ForwardingBridge StopTask-5]: Thread[ActiveMQ ForwardingBridge StopTask-5,5,main] | org.apache.activemq.thread.TaskRunnerFactory | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,379 | DEBUG | Caught exception sending shutdown | org.apache.activemq.network.DemandForwardingBridgeSupport | ActiveMQ ForwardingBridge StopTask-5
org.apache.activemq.transport.TransportDisposedIOException: Transport disposed.
at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:82)[activemq-broker-5.11.1.jar:5.11.1]
at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)[activemq-client-5.11.1.jar:5.11.1]
at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)[activemq-client-5.11.1.jar:5.11.1]
at org.apache.activemq.network.DemandForwardingBridgeSupport$4.run(DemandForwardingBridgeSupport.java:288)[activemq-broker-5.11.1.jar:5.11.1]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_05]
2016-10-07 08:15:45,380 | DEBUG | Stopping transport ssl://localhost/127.0.0.1:15571 | org.apache.activemq.transport.tcp.TcpTransport | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,381 | DEBUG | Initialized TaskRunnerFactory[ActiveMQ Task] using ExecutorService: null | org.apache.activemq.thread.TaskRunnerFactory | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,381 | TRACE | Execute[ActiveMQ Task] runnable: org.apache.activemq.transport.tcp.TcpTransport$1@a1848dc | org.apache.activemq.thread.TaskRunnerFactory | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,381 | TRACE | Created and running thread[ActiveMQ Task-1]: Thread[ActiveMQ Task-1,5,main] | org.apache.activemq.thread.TaskRunnerFactory | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,382 | TRACE | Closing socket 2a9a5d77[TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: Socket[addr=localhost/127.0.0.1,port=15571,localport=40999]] | org.apache.activemq.transport.tcp.TcpTransport | ActiveMQ Task-1
2016-10-07 08:15:45,383 | DEBUG | Closed socket 2a9a5d77[TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: Socket[addr=localhost/127.0.0.1,port=15571,localport=40999]] | org.apache.activemq.transport.tcp.TcpTransport | ActiveMQ Task-1
2016-10-07 08:15:45,384 | INFO | divinedragonbox bridge to Unknown stopped | org.apache.activemq.network.DemandForwardingBridgeSupport | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,384 | TRACE | serviceLocalException: disposed true ex | org.apache.activemq.network.DemandForwardingBridgeSupport | ActiveMQ BrokerService[divinedragonbox] Task-4
org.apache.activemq.transport.TransportDisposedIOException: peer (vm://divinedragonbox#1) stopped.
at org.apache.activemq.transport.vm.VMTransport.stop(VMTransport.java:207)[activemq-broker-5.11.1.jar:5.11.1]
at org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)[activemq-client-5.11.1.jar:5.11.1]
at org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)[activemq-client-5.11.1.jar:5.11.1]
at org.apache.activemq.transport.ResponseCorrelator.stop(ResponseCorrelator.java:132)[activemq-client-5.11.1.jar:5.11.1]
at org.apache.activemq.broker.TransportConnection.doStop(TransportConnection.java:1151)[activemq-broker-5.11.1.jar:5.11.1]
at org.apache.activemq.broker.TransportConnection$4.run(TransportConnection.java:1117)[activemq-broker-5.11.1.jar:5.11.1]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_05]
2016-10-07 08:15:45,384 | DEBUG | Stopped transport: vm://divinedragonbox#0 | org.apache.activemq.broker.TransportConnection | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,384 | TRACE | Shutdown timeout: 1 task: Transport Connection to: vm://divinedragonbox#0 | org.apache.activemq.thread.DedicatedTaskRunner | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,385 | TRACE | Run task done: Transport Connection to: vm://divinedragonbox#0 | org.apache.activemq.thread.DedicatedTaskRunner | ActiveMQ Connection Dispatcher: vm://divinedragonbox#0
2016-10-07 08:15:45,385 | DEBUG | Connection Stopped: vm://divinedragonbox#0 | org.apache.activemq.broker.TransportConnection | ActiveMQ BrokerService[divinedragonbox] Task-4
2016-10-07 08:15:45,385 | TRACE | Shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@dfe196a[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] with await termination: 0 millis | org.apache.activemq.util.ThreadPoolUtils | ActiveMQ Transport: ssl:///127.0.0.1:40999
2016-10-07 08:15:45,385 | DEBUG | Shutting down VM connectors for broker: divinedragonbox | org.apache.activemq.transport.vm.VMTransportFactory | triggerStartAsyncNetworkBridgeCreation: remoteBroker=ssl://localhost/127.0.0.1:15571, localBroker= vm://divinedragonbox#0
2016-10-07 08:15:45,385 | INFO | Connector vm://divinedragonbox stopped | org.apache.activemq.broker.TransportConnector | triggerStartAsyncNetworkBridgeCreation: remoteBroker=ssl://localhost/127.0.0.1:15571, localBroker= vm://divinedragonbox#0
2016-10-07 08:15:45,400 | DEBUG | Shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@dfe196a[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] is shutdown: true and terminated: true took: 0.001 seconds. | org.apache.activemq.util.ThreadPoolUtils | ActiveMQ Transport: ssl:///127.0.0.1:40999
2016-10-07 08:15:45,400 | DEBUG | Transport Connection to: tcp://127.0.0.1:40999 failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: ssl:///127.0.0.1:40999
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:392)[:1.7.0_05]
at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:258)[activemq-client-5.11.1.jar:5.11.1]
at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:221)[activemq-client-5.11.1.jar:5.11.1]
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:213)[activemq-client-5.11.1.jar:5.11.1]
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)[activemq-client-5.11.1.jar:5.11.1]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_05]
2016-10-07 08:15:45,401 | DEBUG | Unregistering MBean org.apache.activemq:type=Broker,brokerName=divinedragonbox,connector=clientConnectors,connectorName=ssl,connectionViewType=remoteAddress,connectionName=tcp_//127.0.0.1_40999 | org.apache.activemq.broker.jmx.ManagementContext | ActiveMQ Transport: ssl:///127.0.0.1:40999
2016-10-07 08:15:45,401 | TRACE | Execute[ActiveMQ BrokerService[divinedragonbox] Task] runnable: org.apache.activemq.broker.TransportConnection$4@5039f4d3 | org.apache.activemq.thread.TaskRunnerFactory | ActiveMQ Transport: ssl:///127.0.0.1:40999
2016-10-07 08:15:45,401 | TRACE | Created and running thread[ActiveMQ BrokerService[divinedragonbox] Task-6]: Thread[ActiveMQ BrokerService[divinedragonbox] Task-6,8,main] | org.apache.activemq.thread.TaskRunnerFactory | ActiveMQ Transport: ssl:///127.0.0.1:40999
有人能告诉我为什么会抛出这些异常吗?如果有人需要更深入地了解,我可以提供整个日志文件。
最佳答案
这个警告
是因为networkConnector
的方式工作和配置。我已将此发布在 ActiveMQ users mailing list 上.
当使用 networkConnector
时,ActiveMQ 会尝试连接到已配置的代理。在我的例子中,我试图 self 连接到代理,这就是它拒绝连接的原因。 Tim 在社区中也指出了同样的问题。
I've never tried configuring a broker with a static networkConnector connected to itself (why would I, it's a useless configuration), but it wouldn't surprise me if the broker rejected that self-connection, which could result in the EOFException you saw. It's also possible that there's something wrong with your SSL configuration as you suggested; there's no good way in a mailing list discussion to check whether your truststore trusts your keystore and the certs are being presented properly since that's all about the binary content and you shouldn't be sharing that publicly, but you could test the SSL configuration by setting up two brokers (in a test environment) that each have their JMS_X_SITE_CSV_URL pointed at each other. If that configuration gives you EOFExceptions, then switch to using the tcp transport and see what happens. If you get errors with the ssl transport but not the tcp one, there's a good chance it's something wrong with your keys.
As far as the current configuration (where you have a broker whose only networkConnection is a static:ssl: one to itself), it's not a useful configuration (having a networkConnector to yourself serves no purpose), and you proved early on in this discussion that removing it removes the WARN log line that you're concerned about. So I disagree with your statement that "I feel the configuration still seems fine." Either switch to something that serves the purpose you said you're trying to achieve (like the discovery: transport instead of the static: transport, or like listing your cross-site servers if you're going to continue using the static: transport) or take it out and eliminate the WARN line.
因此,如果 networkConnector
是单个代理系统,则它基本上没有用。它在多代理部署中更有意义,然后配置所有代理,除了每个代理上的 self 。
为了仍然使 networkConnector
配置在单一代理部署中工作,我必须设置的值是 - url="static://(ssl://divinedragonbox:7031) ...”
(主机名而不是 IP 地址或 localhost
)。这消除了出现的 WARNING
。
关于java - 当 ActiveMQ 启动时警告为 java.io.EOFException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39915818/
我正在编写一个具有以下签名的 Java 方法。 void Logger(Method method, Object[] args); 如果一个方法(例如 ABC() )调用此方法 Logger,它应该
我是 Java 新手。 我的问题是我的 Java 程序找不到我试图用作的图像文件一个 JButton。 (目前这段代码什么也没做,因为我只是得到了想要的外观第一的)。这是我的主课 代码: packag
好的,今天我在接受采访,我已经编写 Java 代码多年了。采访中说“Java 垃圾收集是一个棘手的问题,我有几个 friend 一直在努力弄清楚。你在这方面做得怎么样?”。她是想骗我吗?还是我的一生都
我的 friend 给了我一个谜语让我解开。它是这样的: There are 100 people. Each one of them, in his turn, does the following
如果我将使用 Java 5 代码的应用程序编译成字节码,生成的 .class 文件是否能够在 Java 1.4 下运行? 如果后者可以工作并且我正在尝试在我的 Java 1.4 应用程序中使用 Jav
有关于why Java doesn't support unsigned types的问题以及一些关于处理无符号类型的问题。我做了一些搜索,似乎 Scala 也不支持无符号数据类型。限制是Java和S
我只是想知道在一个 java 版本中生成的字节码是否可以在其他 java 版本上运行 最佳答案 通常,字节码无需修改即可在 较新 版本的 Java 上运行。它不会在旧版本上运行,除非您使用特殊参数 (
我有一个关于在命令提示符下执行 java 程序的基本问题。 在某些机器上我们需要指定 -cp 。 (类路径)同时执行java程序 (test为java文件名与.class文件存在于同一目录下) jav
我已经阅读 StackOverflow 有一段时间了,现在我才鼓起勇气提出问题。我今年 20 岁,目前在我的家乡(罗马尼亚克卢日-纳波卡)就读 IT 大学。足以介绍:D。 基本上,我有一家提供簿记应用
我有 public JSONObject parseXML(String xml) { JSONObject jsonObject = XML.toJSONObject(xml); r
我已经在 Java 中实现了带有动态类型的简单解释语言。不幸的是我遇到了以下问题。测试时如下代码: def main() { def ks = Map[[1, 2]].keySet()
一直提示输入 1 到 10 的数字 - 结果应将 st、rd、th 和 nd 添加到数字中。编写一个程序,提示用户输入 1 到 10 之间的任意整数,然后以序数形式显示该整数并附加后缀。 public
我有这个 DownloadFile.java 并按预期下载该文件: import java.io.*; import java.net.URL; public class DownloadFile {
我想在 GUI 上添加延迟。我放置了 2 个 for 循环,然后重新绘制了一个标签,但这 2 个 for 循环一个接一个地执行,并且标签被重新绘制到最后一个。 我能做什么? for(int i=0;
我正在对对象 Student 的列表项进行一些测试,但是我更喜欢在 java 类对象中创建硬编码列表,然后从那里提取数据,而不是连接到数据库并在结果集中选择记录。然而,自从我这样做以来已经很长时间了,
我知道对象创建分为三个部分: 声明 实例化 初始化 classA{} classB extends classA{} classA obj = new classB(1,1); 实例化 它必须使用
我有兴趣使用 GPRS 构建车辆跟踪系统。但是,我有一些问题要问以前做过此操作的人: GPRS 是最好的技术吗?人们意识到任何问题吗? 我计划使用 Java/Java EE - 有更好的技术吗? 如果
我可以通过递归方法反转数组,例如:数组={1,2,3,4,5} 数组结果={5,4,3,2,1}但我的结果是相同的数组,我不知道为什么,请帮助我。 public class Recursion { p
有这样的标准方式吗? 包括 Java源代码-测试代码- Ant 或 Maven联合单元持续集成(可能是巡航控制)ClearCase 版本控制工具部署到应用服务器 最后我希望有一个自动构建和集成环境。
我什至不知道这是否可能,我非常怀疑它是否可能,但如果可以,您能告诉我怎么做吗?我只是想知道如何从打印机打印一些文本。 有什么想法吗? 最佳答案 这里有更简单的事情。 import javax.swin
我是一名优秀的程序员,十分优秀!