Dear Tim,

Thank you for your reply. 

My message indeed seems to have been corrupted somehow.
In the meantime I managed to narrow the problem down quite a bit and I can
provide more information.

For my setup I am running the ActiveMQ Message Broker 5.15.3 locally on my
Windows system. I took the default distribution and simply added the
following connector:

<transportConnector name="http"
uri="http://0.0.0.0:8866?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>

Using this setup, I can run the following Java Example which connects to the
message broker:

import javax.jms.Connection;
import javax.jms.JMSException;
import org.apache.activemq.ActiveMQConnectionFactory;
public class TestConnect {
  public static void main(String[] args) throws JMSException {
    System.out.println("Connecting:");
    ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("failover:(http://localhost:8866)?randomize=false&jms.prefetchPolicy.queuePrefetch=1");
    Connection connection = connectionFactory.createConnection("admin",
"admin");
    connection.start();
  }
}


After 30 seconds I get the following error message:


Connecting:
 INFO | Broker Servlet supports GZip compression.
 INFO | Successfully connected to http://localhost:8866
 WARN | Transport (http://localhost:8866) failed , attempting to
automatically reconnect: {}
java.io.IOException: Failed to perform GET on: http://localhost:8866 Reason:
Read timed out
        at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:34)
        at
org.apache.activemq.transport.http.HttpClientTransport.run(HttpClientTransport.java:208)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
        at java.net.SocketInputStream.read(SocketInputStream.java:171)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:158)
        at
org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:82)
        at
org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:271)
        at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
        at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
        at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
        at
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281)
        at
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:257)
        at
org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:207)
        at
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
        at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
        at
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:684)
        at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
        at
org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
        at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
        at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
        at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
        at
org.apache.activemq.transport.http.HttpClientTransport.run(HttpClientTransport.java:180)
        ... 1 more

        
I noticed this problem on my local Windows system and on our Ubuntu
integration environment, connecting locally and over the network. 
The JIRA Ticket I meantioned seemed relevant since they are experiencing the
same socket timeout after 30 seconds.

This looks like a bug in ActiveMQ to me. What would you suggest? 

I could open a ticket on JIRA for this problem.

Cheers
Samuel



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply via email to