Invalid MSI index -1

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Invalid MSI index -1

  • Creator
    Topic
  • #55228
    Christopher Wells
    Participant

      I have TCL where I am creating multiple outbound messages from a single inbound message, splitting apart FT1 / ZPA segment pairs into unique outbound messages.  The proc seems to work fine for a while, but occasionally it throws an “Invalid MSI index -1” error.  When this happens, I find the inbound message is in the recovery db with a message state of ‘5’.  I remove it from the recovery db and re-send the same message from SMAT without error.  This error only seems to occur when the process it is in is stopped, possibly when this TCL is in the middle of processing a message.  Here is  a code snippet for the message creation:

      set outboundMsg [join $message_out “r”]

      set mh2 [msgcreate -type data]

      msgmetaset $mh2 DESTCONN $destConn

      msgset $mh2 $outboundMsg

      lappend dispList “CONTINUE $mh2”

      Any suggestions on why this might be erroring out?  Out of thousands of messages, it has only errored out in this way about 3 times.  I have put it in its own process to mitigate the problem, but would like to eliminate it altogether.

      Thanks for any insight anyone may have on this,

      Christopher Wells

    Viewing 1 reply thread
    • Author
      Replies
      • #84634
        Robert Kersemakers
        Participant

          Hi Christopher,

          I read in another thread that you solved this. You really need to kill the original message when doing stuff like this.

          Also, instead of a ‘msgcreate’ I try to use ‘msgcopy’ as much as possible. This way all metadata like destination etc from the original message will be copied as well.

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #84635
          Christopher Wells
          Participant

            With info from another thread, I was able to solve the issue.  I am leaving this thread here and posting my solution to make it easier for others to find the solution to this particular error:

                       set msgData [msgget $mh]

                       # Kill original message:

                       lappend dispList “KILL $mh”

                       # create new OB message

                        set mh2 [msgcopy $mh]

                        msgmetaset $mh2 DESTCONN $destConn  

                        msgset $mh2 $outboundMsg

                        lappend dispList “CONTINUE $mh2”

            I have not experienced the error since making these changes.

            Regards.

            Christopher Wells

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.