Question
· Sep 25, 2018

Wireshark with ensemble

Hi,

We see a lot of TCPIP connection error for few of the components not sure if it is a network glitch at the source/target or is it with us. And most of the times these errors are very transient and vanish on their own and the connection gets re established and the messages get processed. Here is the error we mostly see

ERROR <Ens>ErrTCPTerminatedReadTimeoutExpired: TCP Read timeout (30) expired waiting for terminator SegTerminatorAscii=13, on |TCP|50007|10620, data received =''

or

ERROR <Ens>ErrOutConnectionLost: Lost HL7 Read connection to 10.101.87.133:50007 - detected via ERROR #5002: Cache error: <READ>zReadLine+11 ^%IO.DeviceStream.1

Just wanted to check if anyone has used wireshark to get past this problem and to infer the issues lies. Can someone guide me on how to setup wireshark on ensemble or healthshare? What the do's and dont?

Any kind of documentation/manual/video pertaining to this will be very helpful.

Thanks,

Roma

Discussion (2)0
Log in or sign up to continue

If you have never used Wireshark before or haven't a deep understanding of the TCP/IP suite of protocols then Wireshark might be overkill for your needs.  I have only used it in a Lab or Development environment. You also have to consider the disk storage requirements and governance issues around full-packet capture eg. HPIAA, PCI-DSS. You might want to check  Eduard Lebedyuk's article on Debugging Web for additional tools and tips.

For troubleshooting these issues, we enable a monitoring global that records every character recieved within the TCP Stream

START 
  do USE read *CHAR:2 else  do WAIT
  do CHARMONITOR
 goto START
CHARMONITOR
 if ^AC=1 CHAR'=-1 set X=^AC1,^AC1(X+1)="*"_$char(CHAR)_"*"_CHAR_"*",^AC1=X+1 ; Monitor character by character
 set ^CALLED("CHARMON")=$ZD(+$H,4)_"*"_$ZT($P($H,",",2))_"*"_CHAR
 quit

You can try a re-connect using $ZTRAP or try-catch. In this example, we do a maximum of 10 re-connect attempts

 set $ZT="ERROR"
ERROR
 if ($ZE["<READ>")
 {
     set ERRORCOUNT=ERRORCOUNT+1
     if (ERRORCOUNT<11)
     {
         set ^TCPLOG("ERROR",$ZD(+$H,4),$ZT($P($H,",",2)),ERRORCOUNT)=$ZE
         close "|TCP|"_PORT
         hang 30 goto OPEN 
      }
      else do ^%ET }
 }
 else  do ^%ET }
 quit

You might also look at extending the TCP timeout value to see if that makes a difference to the volume of errors. Check out this Ensemble Example of a SOAP Web Service