Saturday, January 8, 2011

Tibco tutorial : Tibrv Errors and Exceptions

While working with tibco rv during many years I found that tibco errors are mysteriously difficult to diagnose for a newcomer and minor difference between syntax and semantics along with network specifics lead some strange error. here I am putting most common error which I have faced mainly because of some silly mistake in syntax and spent hours to figure out exact cause during my initial days.This list is by no means complete and I would encourage to put any other error you have encountered to make this list more useful. Any suggestion, input feedback always welcome.


1) Error: Failed to initialize transport: Could not resolve network specification

This error comes when your rvd tries to creates tibco transport and failed to created it , it could come in your Java program which is trying to establish tibco transport or while using tibrvsend or tibrvlisten command . recently I have encountered when I am trying to listen on a particular topic (subject) by using tibrvlisten command in my windows machine.

C:\>tibrvlisten -service "5420" -network "190.231.54.20" -daemon "tcp:7500"  TEST.REPLY

Cause: It was not working because of missing ";" before network value , when I modified network string as below it working.

C:\>tibrvlisten -service "5420" -network ";190.231.54.20" -daemon "tcp:7500"  TEST.REPLY

2) Not able to receive message between two host .
This is another classic error which I have faced many times , it always look something is wrong on my side but many times it comesbecause of network filtering where they allow/disallow passing message between two based on service or topic.

generally prod and non production servers reside on different multicast network so if a configuration working for non production it may not work on production environment if network is different. you will have to change the network parameter and use the one which is assigned for production.

3) Failed to initialize transport: Arguments conflict
Another classic error which has manifests itself in different form and can magically puzzle you but I have already said looking and focusing on error message is most important point, here its simply trying to say I am trying to create tibco rvd transport for your but the arguments (which could be either service, network or daemon) is conflicting with something already running on that box, service or network.

I have recently faced issue with two different reason let's see where are those.

C:\>tibrvlisten -service "5420" -network ";190.231.54.20" -daemon "tcp:7500"  TEST.REPLY
tibrvlisten: Failed to initialize transport: Arguments conflict

Here I was trying to listen on above tibco transport but it always failing later I discovered that service "5420" was already bounded to some other network "";200.231.54.20" and some other process was already using that. when I shutdown the process and restart my tibrvlisten it started working.

Cause: If a service is already bounded to a network , trying to bound with another network will fail.

The reason for this failure is that since rvd associates the port , specified by service number with the interface/address specified by the network parameter and hence not able to associate two or more networks/interfaces with same UDP port (remember service denotes UDP port)

Second time also manifestation was same but actual cause was not with the service name but was with the network interface.

I was again trying to listen this time using remote daemon

C:\>tibrvlisten -service "5420" -network ";190.231.54.20" -daemon "tcp:10.230.23.65:7500"  TEST.REPLY
tibrvlisten: Failed to initialize transport: Arguments conflict

Cause :Here on host 10.230.23.65 we had two NIC (Network Interface Card) and this network "190.231.54.20" was already bound to NIC card "eth1" and here I am trying to binding this with eth0 (default one) and due to this it was failing.

Solution : when I changed the command to use "eth1" it started working.
C:\>tibrvlisten -service "5420" -network "eth1;190.231.54.20" -daemon "tcp:10.230.23.65:7500"  TEST.REPLY
tibrvlisten: Listening to subject TEST.REPLY

Conclusion: you can not associate same service with two different network or same network with two different NIC cards.

4)TibrvException[error=67,message=Socket limit reached]
at com.tibco.tibrv.TibrvImplTPortC.natCreate(Native Method)
at com.tibco.tibrv.TibrvImplTPortC.create(TibrvImplTP ortC.java:40)
at com.tibco.tibrv.TibrvRvdTransport.init(TibrvRvdTra nsport.java:77

Cause: your rvd (Rendezvous daemon) is creating so many tibco transport that eventually it exhausts Socket limit available for any process in windows.

Diagnosis: to find out the culprit you need to find out on which process is creating so many transport first.

netstat -nap | grep "processid | wc -l

run this multiple time with different suspected process to identify the process which is culprit.

Now if your process is publishing/subscribing on multiple service you need to find on which service this is happening to find out use netstat command again with different service your process is using.

netstat -a | grep "service"  | wc -l

Now you know exact culprit process id and service , first stop the process and figure out why exactly so many transports are getting created.

5) Name collision on Certified messaging.
You can not have two  connection with same name if you are using Certified messaging. you will get below error.
ADV_CLASS=ERROR ADV_SOURCE=RVCM ADV_NAME=REGISTRATION.COLLSION.NAME.TestClient

it means some one has alrady registered with name "TestClient" in this certified transport.
UHF32WN5SUQZ

6)  Exception while confirming message in tibco rv certified messaging.
TibrvException[error=27,message=Not permitted]
  
This error comes if you try to confirm the message two times.

to read more about tibco rv or tibco ems  see my tibco tutorial series

13 comments :

Anonymous said...

Great article. How about:

tibrvlisten: Failed to initialize transport: Not connected to daemon

Anonymous said...

nice post.
i am running into
Cannot close RV: Not initialized [Error]

any tip?

Anonymous said...

I am getting below error while running sample Java programs or applications, which comes with tibco rv installation :

Exception in thread "main" java.lang.UnsatisfiedLinkError: Native library not fo
und. Tried to load tibrvnative64 and tibrvnative
at com.tibco.tibrv.Tibrv.loadNativeLibrary(Tibrv.java:392)
at com.tibco.tibrv.Tibrv.(Tibrv.java:79)
at tibrvftmon.(tibrvftmon.java:51)
at tibrvftmon.main(tibrvftmon.java:161)
Caused by: java.lang.UnsatisfiedLinkError: no tibrvnative in java.library.path

and when I include tibco bin directory we get :

Caused by: java.lang.UnsatisfiedLinkError: C:\tibco\tibrv\8.4\bin\tibrvnative.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)

any help will be much appreciated.

Anonymous said...

Hello, We are getting following error, while starting our Java application, which uses Tibco Rendezvous for communication : TibrvException[error=21,message=Could not connect to daemon, here is the complete error, please help

Caused by: TibrvException[error=21,message=Could not connect to daemon]
at com.tibco.tibrv.TibrvRvdTransport.tibrvTransport_Create(Native Method)
at com.tibco.tibrv.TibrvRvdTransport.(TibrvRvdTransport.java:44)

Ryah said...

Getting this error, while running tibrvlisten command Failed to initialize transport: Not connected to daemon, please help, I have checked my rvd is running.

Anonymous said...

We were getting below exception while confirming certified message back to CM Sender.
TibrvException[error=27,message=Not permitted]
at com.tibco.tibrv.TibrvCmListener.tibrvcmEvent_ConfirmMsg(Native Method)
at com.tibco.tibrv.TibrvCmListener.confirmMsg(TibrvCmListener.java:101)

upon investigation we found that, we get this error while confirming very first message. Further investigation reveals that it was becasue sequence number was not present in the first message. After looking at sample examples from Tibco installtion we found that, if you are using explicit confirm i.e. by calling cmListener.setExplicitConfirm(); method, then right way to confirm certified message are as below :

try {
// Report we are confirming message
long seqno = TibrvCmMsg.getSequence(msg);

// If it was not CM message or very first message
// we'll get seqno=0. Only confirm if seqno > 0.
if (seqno > 0) {
System.out.println("Confirming message with seqno=" + seqno);

// Confirm the message
cmListener.confirmMsg(msg);
}
} catch (TibrvException e) {
System.out.println("Failed to confirm CM message: " + e.toString());
}

In short, if you try to confrim very fist message in Certified message, you will get TibrvException[error=27,message=Not permitted], to resolve, just confirm message when sequence number is greater than zero.

Anonymous said...

Hello there, I am keep getting following error message while using Tiboc rendezvous :
TibrvException[error=68,message=OS error]

Not enough information in this error message, does any one knows the real cause of this tibco error?

Anonymous said...

Getting this error while confirming CM messages "com.tibco.tibrv.TibrvException: Not permitted" any idea folks?

Anonymous said...

Hi, We are certified messaging for delivery of order and trade messages, and we are also using pre-registered listener but our CM publisher keep showing following Tibco Advisory message ""DELIVERY.NO_RESPONSE" or {ADV_CLASS="WARN" ADV_SOURCE="RVCM" ADV_NAME="DELIVERY.NO_RESPONSE

We have two CM listeners and I know both of them are confirming message but still we see this Tibco advisory message on publisher side? Any idea what causing this error?

Rama said...

Getting following error, while running my Java app which uses Tibco RV

TibrvException[error=27,message=Native implementation required]

Running on Tibco 8.4.1 , JDK 1.7

Rama said...

I realized that my JDK was 64-bit, upon changing it to JDK 1.7 32-bit I am getting following error

ERROR :TibrvException[error=22,message=Version mismatch: tibrvj shared library version 8.4 does not match version of .JAR file 8.3]

Rama said...

I replace the tibco JARs from 8.3 to 8.4 and this error has gone. Now I am using following JAR files

C:\Users\rama\.m2\repository\tibco\tibrvj\8.4\tibrvj-8.4.jar
C:\Users\rama\.m2\repository\tibco\tibrvjsd\8.4\tibrvjsd-8.4.jar
C:\Users\rama\.m2\repository\tibco\tibrvjweb\8.4\tibrvjweb-8.4.jar
C:\Users\rama\.m2\repository\tibco\tibrvnative\8.4\tibrvnative-8.4.jar
C:\Users\rama\.m2\repository\tibco\tibrvnativesd\8.4\tibrvnativesd-8.4.jar

but still I was getting one more error :

TibrvException[error=21,message=Not connected to daemon]

This time it was simple one, RVD was not running. I started the windows services for rvd and it works fine.

KP said...

List of Tibrv Errors and their cause :
ERROR :TibrvException[error=21,message=Could not connect to daemon]
Solution : rvd windows services is not running. Start rvd by going to windows services.

TibrvException[error=5,message=Conflicting arguments]
Failed to create TibrvRvdTransport.

Solution: either same process is running or other process is using same Service (UDP PORT)

ERROR :TibrvException[error=3,message=Invalid argument]


ERROR: TibrvException[error=27,message=Not permitted]
Solution : Another process was running, which was kept the service open.

Post a Comment