0
我正在嘗試perl生產者與ActiveMq交談。請找到我試過的代碼。這是給我的錯誤「*網:: STOMP ::客戶:: IO :: receive_data():不能sysread執行():EOF」 **perl生產者連接到activemq服務器的錯誤
後調試的錯誤是在$stomp->connect();
請讓我知道爲什麼這個錯誤在這一點......我不能找到有關這個網上有很大幫助..
在此先感謝
我已經嘗試遠程登錄到我想要的網址連接。首先它正在連接,並在最後它是一些錯誤信息如下:
CacheEnabledSizePrefixDisabled MaxInactivityDurationInitalDelay'TcpNoDelayEnabledMaxInactivityDurationu0TightEncodingEnabledStackTraceEnabledPuTTY
Connection closed by foreign host.
這意味着連接正在關閉。
這些都是經紀人日誌在那裏我懷疑一些錯誤:
2012-12-07 14:44:12,021 | WARN | Transport Connection to: tcp://127.0.0.1:57404 failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:[email protected]
2012-12-07 14:44:12,021 | WARN | Transport Connection to: tcp://127.0.0.1:57403 failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:[email protected]
2012-12-07 14:44:12,024 | WARN | Transport Connection to: tcp://127.0.0.1:57405 failed: java.io.IOException: Unknown data type: 47 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:[email protected]
2012-12-07 14:44:12,024 | WARN | Transport Connection to: tcp://127.0.0.1:57405 failed: org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://127.0.0.1:57405 | org.apache.activemq.broker.TransportConnection.Transport | Async Exception Handler
2012-12-07 16:08:55,045 | WARN | Transport Connection to: tcp://127.0.0.1:58008 failed: java.io.IOException: Unknown data type: 69 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:[email protected]
2012-12-07 16:08:55,045 | WARN | Transport Connection to: tcp://127.0.0.1:58008 failed: org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://127.0.0.1:58008 | org.apache.activemq.broker.TransportConnection.Transport | Async Exception Handler
代碼:
#! /usr/bin/perl
use strict;
use warnings;
use Net::STOMP::Client;
my $stomp = Net::STOMP::Client->new(uri => "tcp://$url:$port");
my $peer = $stomp->peer();
printf("connected to broker %s (IP %s), port %d\n",
$peer->host(), $peer->addr(), $peer->port());
$stomp->connect();
printf("speaking STOMP %s with server %s\n",
$stomp->version(), $stomp->server() || "UNKNOWN");
printf("session %s started\n", $stomp->session());
$stomp->disconnect();
printf("session ended\n");
在發佈的示例代碼中,哪一行會給出錯誤,很難在沒有更多信息的情況下猜測發生了什麼問題。經紀人日誌也是一個好看的地方。 –
代理配置是什麼樣的? –