[ 
https://issues.apache.org/jira/browse/AMQCPP-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17536686#comment-17536686
 ] 

Sthala Narasimhan commented on AMQCPP-712:
------------------------------------------

I use the following connection string to connect to broker 
BrokerURL=failover:(tcp://host1:61625,tcp://host2:61625). The AMQConnection 
factory to try to create instance and crashes. Did some analysis and see that 
the crash happens at the following function call randomUUID@UUID@util@decaf

 

UUID UUID::randomUUID() {

    unsigned char data[16];
    SecureRandom secRand;
    secRand.nextBytes(data, 16);

    long long msb = 0;
    long long lsb = 0;

    msb = (data[0] & 0xFFLL) << 56;
    msb |= (data[1] & 0xFFLL) << 48;
    msb |= (data[2] & 0xFFLL) << 40;
    msb |= (data[3] & 0xFFLL) << 32;
    msb |= (data[4] & 0xFFLL) << 24;
    msb |= (data[5] & 0xFFLL) << 16;
    msb |= (data[6] & 0x0FLL) << 8;
    msb |= (0x4LL << 12); // set the version to 4
    msb |= (data[7] & 0xFFLL);

    lsb = (data[8] & 0x3FLL) << 56;
    lsb |= (0x2LL << 62); // set the variant to bits 01
    lsb |= (data[9] & 0xFFLL) << 48;
    lsb |= (data[10] & 0xFFLL) << 40;
    lsb |= (data[11] & 0xFFLL) << 32;
    lsb |= (data[12] & 0xFFLL) << 24;
    lsb |= (data[13] & 0xFFLL) << 16;
    lsb |= (data[14] & 0xFFLL) << 8;
    lsb |= (data[15] & 0xFFLL);

    return UUID(msb, lsb);
}

> ActiveMQConnection Start() hangs forever/not connecting with Broker
> -------------------------------------------------------------------
>
>                 Key: AMQCPP-712
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-712
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.9.5
>         Environment: Windows server 2012 R2
>            Reporter: Sthala Narasimhan
>            Assignee: Timothy A. Bish
>            Priority: Major
>
> My Client application uses CMS Library 3.9.5 with failover protocol.. When I 
> invoke Start() function to connect to broker it hangs/ not connecting, though 
> broker is configured correctly
> std::string brokerURI = 
> "failover:(tcp://host1:61400,tcp://host2:61400)&maxReconnectAttempts=1;
>  ActiveMQConnection* conn = 0;
> ActiveMQConnectionFactory *amqfactory = new 
> ActiveMQConnectionFactory(brokerURI);
> conn = amqfactory->createConnection();
> delete amqfactory;
> amqfactory = NULL;
> //Hangs here forever or timeout.  
> conn->start();
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to