Gatling JMS api for TIBCO Queue - javax.jms.JMSSecurityException: Failed to connect to any server

Hi,
I am using gatling for 6 month or so. Now I have to use gatling for TIBCO JMS Testing for Req-rep service.
Gatling version : 2.3.1

Here is my script.I have copied all TIBCO jars to gatling/lib folder. Same request is working fine with loadrunner and jmeter. . For

package test

import io.gatling.core.Predef._
import io.gatling.jms.Predef._
import javax.jms._
import scala.concurrent.duration._

class BasicJMS3 extends Simulation {

val jmsConfig = jms
.connectionFactoryName(“DBE_XXX_NonPersistent”)
.url(“tibjmsnaming://JNDI-SDF-R.domain:30300,tibjmsnaming://JNDI-SDF-B.domain:30300,tibjmsnaming://JNDI-WSA-R.domain:30300,tibjmsnaming://JNDI-WSA-B.domain:30300”)
.credentials(“my.java.naming.security.principalVALUE”, “my.java.naming.security.credentialsVALUE”)
.contextFactory(“com.tibco.tibjms.naming.TibjmsInitialContextFactory”)
.listenerCount(1)
.useNonPersistentDeliveryMode

val scn = scenario(“JMS DSL test”).repeat(1) {
exec(jms(“req reply testing”)
.reqreply
.queue(“My.Request.retrieveIPRelationshipInformation”)
.textMessage(StringBody("""<soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” xmlns:mes=“http://www.ing.com/csp/xsd/general/message_2” xmlns:ret=“http://www.ing.com/be/cmdm/bicc/xsd/cmm/involvedpartymanagement_default_03/retrieveiprelationshipinformation_03” xmlns:bas=“http://www.ing.com/be/bis/xsd/general/BaseContextType_01” xmlns:pim=“http://www.ing.com/pim”>
soap:Header
mes:MessageHeader
mes:From
mes:Id1</mes:Id>
</mes:From>
mes:HeaderFields
mes:ConversationIdqsde</mes:ConversationId>
mes:MessageIdqsde</mes:MessageId>
mes:Timestamp2013-09-16T19:53:35.022+02:00</mes:Timestamp>
</mes:HeaderFields>
</mes:MessageHeader>
</soap:Header>
soap:Body
ret:RequestPayload

bas:BaseContext

bas:ServiceConsumptionSpecifics

bas:SizeLimitation

bas:NumberRecords8</bas:NumberRecords>
</bas:SizeLimitation>
</bas:ServiceConsumptionSpecifics>

bas:PayloadDescription/
</bas:BaseContext>
pim:retrieveIPRelationshipInformationREQ
pim:InvolvedParty
pim:EntrepriseId
pim:Type5</pim:Type>
pim:Identifier0123456789</pim:Identifier>
</pim:EntrepriseId>
</pim:InvolvedParty>
pim:InvolvedPartyToInvolvedPartyRoleType109</pim:InvolvedPartyToInvolvedPartyRoleType>
</pim:retrieveIPRelationshipInformationREQ>
</ret:RequestPayload>
</soap:Body>
</soap:Envelope>"""))
.property(“SOAPJMS_soapAction”, “retrieveIPRelationshipInformation”)
.property(“SOAPAction”, “retrieveIPRelationshipInformation”)
.property(“JMSExpiration”, 1500)
.property(“JMSPriority”, 4)
.property(“JMSDeliveryMode”, 1)
.jmsType(“TextMessage”)
.check(simpleCheck(checkBodyTextCorrect))
)
}

setUp(scn.inject(atOnceUsers(1)).protocols(jmsConfig))

def checkBodyTextCorrect(m: Message) = {
// this assumes that the service just does an “uppercase” transform on the text
m match {
case tm: TextMessage => tm.getText.contains(“ns1:StatusOK</ns1:Status”)
case _ => false
}
}

}

Getting following error.

12:22:56.358 [INFO ] i.g.j.c.JmsReqReplyClient - Got ConnectionFactory QueueConnectionFactory[URL=tcp://XXX;clientID=null;Properties={com.tibco.tibjms.ssl.enable_verify_host=false, com.tibco.tibjms.connect.attemptcount=100, com.tibco.tibjms.reconnect.attemptdelay=30000, com.tibco.tibjms.ssl.enable_verify_hostname=false, com.tibco.tibjms.connect.attempttimeout=15000, com.tibco.tibjms.reconnect.attempttimeout=15000, com.tibco.tibjms.multicast.enabled=true, com.tibco.tibjms.connect.attemptdelay=5000, com.tibco.tibjms.reconnect.attemptcount=100}]
12:22:56.561 [ERROR] a.a.OneForOneStrategy - Failed to connect to any server at: tcp://yyy:port,tcp://xxx:port [Error: authentication failed: url that returned this exception = TCP://xxx:port ]
javax.jms.JMSSecurityException: Failed to connect to any server at: tcp://yyy:port,tcp://xxx:port

In tibco server log, user is printing as ‘anonymous’.

Qs. what is missed here?

Gatling 2 has reached end-of-life almost 1 year ago.
Please upgrade to latest Gatling (3.1.3 as of now).

Hi stephanie,
Today I tried the same too.
But same error.
Any idea if I am missing anything.

Here is my code in gatling 3.1.3.

package test

import io.gatling.core.Predef._
import io.gatling.jms.Predef._
import javax.jms._
import scala.concurrent.duration._

class BasicJMS3 extends Simulation {

val jndiBasedConnectionFactory = jmsJndiConnectionFactory
.connectionFactoryName(“DBE_XXX_NonPersistent”)
.url(“tibjmsnaming://JNDI-SDF-R.domain:30300,tibjmsnaming://JNDI-SDF-B.domain:30300,tibjmsnaming://JNDI-WSA-R.domain:30300,tibjmsnaming://JNDI-WSA-B.domain:30300”)
.credentials(“my.java.naming.security.principalVALUE”, “my.java.naming.security.credentialsVALUE”)
.contextFactory(“com.tibco.tibjms.naming.TibjmsInitialContextFactory”)

val jmsConfig = jms
.connectionFactory(jndiBasedConnectionFactory)
.listenerThreadCount(1)
.useNonPersistentDeliveryMode

val scn = scenario(“JMS DSL test”).repeat(1) {
exec(jms(“req reply testing”)
.requestReply
.queue(“My.Request.retrieveIPRelationshipInformation”)
.textMessage(StringBody(""""<soap:Envelope
xmlns:soap=“http://www.w3.org/2003/05/soap-envelope
xmlns:mes=“http://www.ing.com/csp/xsd/general/message_2
xmlns:ret=“http://www.ing.com/be/cmdm/bicc/xsd/cmm/involvedpartymanagement_default_03/retrieveiprelationshipinformation_03
xmlns:bas=“http://www.ing.com/be/bis/xsd/general/BaseContextType_01
xmlns:pim=“http://www.ing.com/pim”>
soap:Header
mes:MessageHeader
mes:From
mes:Id1</mes:Id>
</mes:From>
mes:HeaderFields
mes:ConversationIdqsde</mes:ConversationId>
mes:MessageIdqsde</mes:MessageId>
mes:Timestamp2013-09-16T19:53:35.022+02:00</mes:Timestamp>
</mes:HeaderFields>
</mes:MessageHeader>
</soap:Header>
soap:Body
ret:RequestPayload

bas:BaseContext

bas:ServiceConsumptionSpecifics

bas:SizeLimitation

bas:NumberRecords8</bas:NumberRecords>
</bas:SizeLimitation>
</bas:ServiceConsumptionSpecifics>

bas:PayloadDescription/
</bas:BaseContext>
pim:retrieveIPRelationshipInformationREQ
pim:InvolvedParty
pim:EntrepriseId
pim:Type5</pim:Type>
pim:Identifier0123456789</pim:Identifier>
</pim:EntrepriseId>
</pim:InvolvedParty>

pim:InvolvedPartyToInvolvedPartyRoleType109</pim:InvolvedPartyToInvolvedPartyRoleType>
</pim:retrieveIPRelationshipInformationREQ>
</ret:RequestPayload>
</soap:Body>
</soap:Envelope>"""))
.property(“SOAPJMS_soapAction”, “retrieveIPRelationshipInformation_03”)
.property(“SOAPAction”, “retrieveIPRelationshipInformation_03”)
.property(“JMSExpiration”, 30)
.property(“JMSPriority”, 4)
.property(“JMSDeliveryMode”, 1)
.jmsType(“TextMessage”)
.check(simpleCheck(checkBodyTextCorrect))
)
}

setUp(scn.inject(atOnceUsers(1)).protocols(jmsConfig))

def checkBodyTextCorrect(m: Message) = {
m match {
case tm: TextMessage => tm.getText.contains(“ns1:StatusOK</ns1:Status”)
case _ => false
}
}
}

Error as follows

15:33:39.429 [INFO ] i.g.j.j.JmsJndiConnectionFactoryBuilder - Got InitialContext javax.naming.InitialContext@3d9c13b5
15:33:39.623 [INFO ] i.g.j.j.JmsJndiConnectionFactoryBuilder - Got ConnectionFactory QueueConnectionFactory[URL=tcp://XXX15240.domain:30300,tcp://XXX15242.domain:30300;clientID=null;Properties={com.tibco.tibjms.ssl.enable_verify_host=false, com.tibco.tibjms.connect.attemptcount=100, com.tibco.tibjms.reconnect.attemptdelay=30000, com.tibco.tibjms.ssl.enable_verify_hostname=false, com.tibco.tibjms.connect.attempttimeout=15000, com.tibco.tibjms.reconnect.attempttimeout=15000, com.tibco.tibjms.multicast.enabled=true, com.tibco.tibjms.connect.attemptdelay=5000, com.tibco.tibjms.reconnect.attemptcount=100}]
15:33:39.912 [ERROR] i.g.a.Gatling$ - Run crashed
javax.jms.JMSSecurityException: Failed to connect to any server at: tcp://XXX15240.domain:30300,tcp://XXX15242.domain:30300 [Error: authentication failed: url that returned this exception = TCP://XXX15242.domain:30300 ]
at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:1393)
at com.tibco.tibjms.TibjmsConnection.(TibjmsConnection.java:4175)

Hi,

I could be wrong, but I doubt you’ll find any help on such entreprisey product as Tibco on an open source project community mailing list, all the more as the problem could actually with your set tup.
If you’re interested in contracting with us and have us investigate remotely in your environment, feel free to shoot an email at contact@gatling.io.

Regards,