EMS Java client reports: " TCPLink Error: invalid magic in the message and got deadlock".

EMS Java client reports: " TCPLink Error: invalid magic in the message and got deadlock".

book

Article ID: KB0093649

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

Description

Description:
EMS Java client reports: " TCPLink Error: invalid magic in the message and got deadlock".
Symptoms:




Cause:
This is a known defect known defect and has been fixed since EMS 8.0 Java client.

8.0.0 EMS-3897
Fixed an error that caused an application's connection to be unusable—and show as stopped in the tibemsadmin tool—if the client library tried to connect to a non-EMS server process that was incorrectly part of the FT URL list.

 
The "unusable" mentioned here means deadlock.


The thread dump taken from the java client is like following:

=============

"TIBCO EMS TCPLink Reader (Server-58672344)" daemon prio=10 tid=0x00007fe251367000 nid=0x3063 waiting for monitor entry [0x00007fe2995e9000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at com.tibco.tibjms.TibjmsxSessionImp._close(TibjmsxSessionImp.java:2576)
    - waiting to lock <0x00000000c3939888> (a java.lang.Object)
    at com.tibco.tibjms.TibjmsConnection._close(TibjmsConnection.java:2183)
    at com.tibco.tibjms.TibjmsConnection._onDisconnected(TibjmsConnection.java:2284)
    at com.tibco.tibjms.TibjmsConnection$ServerLinkEventHandler.onEventDisconnected(TibjmsConnection.java:341)
    at com.tibco.tibjms.TibjmsxLinkTcp._readWireMsg(TibjmsxLinkTcp.java:700)
    at com.tibco.tibjms.TibjmsxLinkSSL._readWireMsg(TibjmsxLinkSSL.java:651)
    at com.tibco.tibjms.TibjmsxLinkTcp.syncSendRequest(TibjmsxLinkTcp.java:1078)
    at com.tibco.tibjms.TibjmsConnection._doInitMsg(TibjmsConnection.java:1699)
    at com.tibco.tibjms.TibjmsConnection._doInitMsg(TibjmsConnection.java:1447)
    at com.tibco.tibjms.TibjmsConnection._reconnect(TibjmsConnection.java:1868)
    at com.tibco.tibjms.TibjmsConnection$ServerLinkEventHandler.onEventReconnect(TibjmsConnection.java:361)
    at com.tibco.tibjms.TibjmsxLinkTcp._doReconnect(TibjmsxLinkTcp.java:590)
    at com.tibco.tibjms.TibjmsxLinkTcp$LinkReader.work(TibjmsxLinkTcp.java:307)
    - locked <0x00000000c1aa2d90> (a java.lang.Object)

    at com.tibco.tibjms.TibjmsxLinkTcp$LinkReader.run(TibjmsxLinkTcp.java:247)

==================


The client may report " TCPLink Error: invalid magic in the message" error.  It may be possible there was some other daemon or service running using a EMS server port where the client tried to reconnect to.

Issue/Introduction

EMS Java client reports: " TCPLink Error: invalid magic in the message and got deadlock".

Resolution

Upgrade to EMS java client 8.0 and higher

Additional Information