ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML Message Truncated while routing through HTTP Request

Post new topic  Reply to topic Goto page 1, 2  Next
 XML Message Truncated while routing through HTTP Request « View previous topic :: View next topic » 
Author Message
mqbrks
PostPosted: Mon Oct 22, 2018 7:04 am    Post subject: XML Message Truncated while routing through HTTP Request Reply with quote

Voyager

Joined: 17 Jan 2012
Posts: 75

Hi All,

We have a issue while routing the XML Payload to the target. The xml is routed to target through layer 7 or the API Gateway to the destination. The timeout set on HTTP Request node is 60 seconds. The max Payload size is 100KB , min is around 16 -20 KB.

can you please provide your inputs ?

Thank you!
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Oct 22, 2018 7:10 am    Post subject: Re: XML Message Truncated while routing through HTTP Request Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqbrks wrote:
can you please provide your inputs ?


You first:

- how large is the payload going through the HTTP Request node?
- how much of the payload is arriving (specifically are you getting the first 4Kb)?
- where is the maximum and minimum size set?
- where in the journey from source to destination does the network packet trace say the truncation is occurring?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqbrks
PostPosted: Mon Oct 22, 2018 10:43 am    Post subject: Re: XML Message Truncated while routing through HTTP Request Reply with quote

Voyager

Joined: 17 Jan 2012
Posts: 75

Quote:
You first:

- how large is the payload going through the HTTP Request node?
- how much of the payload is arriving (specifically are you getting the first 4Kb)?
- where is the maximum and minimum size set?
- where in the journey from source to destination does the network packet trace say the truncation is occurring?


- how large is the payload going through the HTTP Request node? - around 92 to 94 KB
- how much of the payload is arriving (specifically are you getting the first 4Kb)? - Seems like 5 KB
- where is the maximum and minimum size set? -as mentioned above max is 100KB and min is 20 KB
- where in the journey from source to destination does the network packet trace say the truncation is occurring? - We didnt yet take the network trace. This is occurring intermittently. but this is from the archive after the file got sent to the destination.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Oct 22, 2018 10:59 am    Post subject: Re: XML Message Truncated while routing through HTTP Request Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqbrks wrote:
Quote:
You first:

- how large is the payload going through the HTTP Request node?
- how much of the payload is arriving (specifically are you getting the first 4Kb)?
- where is the maximum and minimum size set?
- where in the journey from source to destination does the network packet trace say the truncation is occurring?


- how large is the payload going through the HTTP Request node? - around 92 to 94 KB
- how much of the payload is arriving (specifically are you getting the first 4Kb)? - Seems like 5 KB
- where is the maximum and minimum size set? -as mentioned above max is 100KB and min is 20 KB
- where in the journey from source to destination does the network packet trace say the truncation is occurring? - We didnt yet take the network trace. This is occurring intermittently. but this is from the archive after the file got sent to the destination.


That's very large for an HTTP request. I notice later on you refer to it as a "file" and if it is then consider FTP or a similar protocol to transfer it. I mentioned 4Kb as that's the default limit on a lot of network hardware/software for transfer and is certainly the default threshold where some security equipment decides that the HTTP is a Denial Of Service attack. You might also want to work out if this happens intermittently after you've transferred a lot of files in a short period of time, so you look like a DDoS attack.

I didn't ask what the maximum and minimum were set to, I asked where these values are set. Are these actual values configured as limits somewhere or just the range of sizes you see in the XML documents you're transferring?

mqbrks wrote:
This is occurring intermittently. but this is from the archive after the file got sent to the destination.


The archive at the source end or the destination end? Do you mean that you transfered a file and only got the 1st 4Kb at the destination? If so, how have you centered on IIB as the problem?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqbrks
PostPosted: Mon Oct 22, 2018 6:56 pm    Post subject: Re: XML Message Truncated while routing through HTTP Request Reply with quote

Voyager

Joined: 17 Jan 2012
Posts: 75

vitor wrote:
That's very large for an HTTP request. I notice later on you refer to it as a "file" and if it is then consider FTP or a similar protocol to transfer it. I mentioned 4Kb as that's the default limit on a lot of network hardware/software for transfer and is certainly the default threshold where some security equipment decides that the HTTP is a Denial Of Service attack. You might also want to work out if this happens intermittently after you've transferred a lot of files in a short period of time, so you look like a DDoS attack.


XML Payload is being sent to target and being archived as file on the local file system after getting a successful response from target.

vitor wrote:
I didn't ask what the maximum and minimum were set to, I asked where these values are set. Are these actual values configured as limits somewhere or just the range of sizes you see in the XML documents you're transferring?

I looked at the file size from the archive dir and mentioned the max and min of payload being transferred, forgive my ignorance, I am not sure where the max and min are set or haven't noticed where it is set

vitor wrote:

The archive at the source end or the destination end? Do you mean that you transfered a file and only got the 1st 4Kb at the destination? If so, how have you centered on IIB as the problem?

Sorry we are not transferring the file to destination, it is the XML Payload that is transferred to the target. Target team normally use the term "file", so meant in that context.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 23, 2018 5:10 am    Post subject: Re: XML Message Truncated while routing through HTTP Request Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqbrks wrote:
vitor wrote:
That's very large for an HTTP request. I notice later on you refer to it as a "file" and if it is then consider FTP or a similar protocol to transfer it. I mentioned 4Kb as that's the default limit on a lot of network hardware/software for transfer and is certainly the default threshold where some security equipment decides that the HTTP is a Denial Of Service attack. You might also want to work out if this happens intermittently after you've transferred a lot of files in a short period of time, so you look like a DDoS attack.


XML Payload is being sent to target and being archived as file on the local file system after getting a successful response from target.


So are you saying this:

- you send 90Kb of XML through an HTTP Request node
- you get an HTTP 200 from the destination
- you write the 90Kb of XML to an archive file
- the destination complains they've only got 4Kb of truncated XML
- you check the archive file and it's 90Kb of XML

Or are you saying this:

- you send 90Kb of XML through an HTTP Request node
- you get an HTTP 200 from the destination
- you write the 90Kb of XML to an archive file
- the destination complains they've only got 4Kb of truncated XML
- you check the archive file and it's only 4Kb of XML

Or is it a third scenario, which you're about to break down for me?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqbrks
PostPosted: Tue Oct 23, 2018 5:55 am    Post subject: Re: XML Message Truncated while routing through HTTP Request Reply with quote

Voyager

Joined: 17 Jan 2012
Posts: 75

Vitor wrote:

So are you saying this:

- you send 90Kb of XML through an HTTP Request node
- you get an HTTP 200 from the destination
- you write the 90Kb of XML to an archive file
- the destination complains they've only got 4Kb of truncated XML
- you check the archive file and it's 90Kb of XML

Or are you saying this:

- you send 90Kb of XML through an HTTP Request node
- you get an HTTP 200 from the destination
- you write the 90Kb of XML to an archive file
- the destination complains they've only got 4Kb of truncated XML
- you check the archive file and it's only 4Kb of XML

Or is it a third scenario, which you're about to break down for me?


btw, thank you for the replies!

It is close to the second scenario, except that on the archive file it shows 90 KB, but when I copy and paste the content into a new file - the size is 5KB.

Is it there any restriction for the HTTP Request node that it can handles only upto a limit ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 23, 2018 6:50 am    Post subject: Re: XML Message Truncated while routing through HTTP Request Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqbrks wrote:
It is close to the second scenario, except that on the archive file it shows 90 KB, but when I copy and paste the content into a new file - the size is 5KB.


Bingo!

There's a character or sequence of characters in the file that's acting as an end-of-file marker. So the HTTP Request node sends 90Kb, the target sends you an HTTP 200 because it got all 90Kb but when the target (or you) try and interpret it this character signals end of file 85Kb from the end. Also explains why the problem is intermittent; not all files have this.


mqbrks wrote:
Is it there any restriction for the HTTP Request node that it can handles only upto a limit ?


Nothing I'm aware of. You'll probably hit one of the network limits I espouse above before the node gives out.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 23, 2018 6:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Here's a tip:

Ask whoever's producing this XML what parser they're using to serialize the XML. If they say anything along the lines of "it's something we built ourselves" or "we just concatenate the tags together" then that's a smoking gun for this.

If they say they're using a commercial parser, get a fresh clean copy and try to open in in IE, XMLSpy or an equivalent XML aware tool & post the result.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqbrks
PostPosted: Tue Oct 23, 2018 7:06 am    Post subject: Reply with quote

Voyager

Joined: 17 Jan 2012
Posts: 75

Vitor wrote:
Here's a tip:

Ask whoever's producing this XML what parser they're using to serialize the XML. If they say anything along the lines of "it's something we built ourselves" or "we just concatenate the tags together" then that's a smoking gun for this.

If they say they're using a commercial parser, get a fresh clean copy and try to open in in IE, XMLSpy or an equivalent XML aware tool & post the result.


I was just about to add this information. The source is IIB and I see the parsing options set on the HTTPRequest Node are Immediate (XMLNSC Parser).

The whole scenario:

Mainframe App (File) -> IIB -> XML request -> Windows Middleware WEbservice (target)

The incoming file is sorted according to the Record Number and then in set of 250 records the XML request is sent from IIB to target in batches. Likewise for large incoming file nearly 20 to 25 xmls are sent in batch one after the other.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 23, 2018 7:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqbrks wrote:
Mainframe App (File) -> IIB -> XML request -> Windows Middleware WEbservice (target)


Is something transferring the file or is IIB running on the mainframe?

Is the file sorted before it arrives?

Is it in a flat file (copybook) format and converted to XML by IIB?

mqbrks wrote:
The incoming file is sorted according to the Record Number and then in set of 250 records the XML request is sent from IIB to target in batches. Likewise for large incoming file nearly 20 to 25 xmls are sent in batch one after the other.


As a design, that sucks.

Is the "archive file" one of the XMLs that's being sent or the original file?

What exactly is the HTTP Request node parsing? What's being sent back by the target except the confirmation?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqbrks
PostPosted: Tue Oct 23, 2018 7:33 am    Post subject: Reply with quote

Voyager

Joined: 17 Jan 2012
Posts: 75

Vitor wrote:


Is something transferring the file or is IIB running on the mainframe?


Another application running on mainframes is sending the file to IIB.

Vitor wrote:

Is the file sorted before it arrives?


No the file is sorted by mapping node after it is parsed by DFDL and yes it is a FLAT file.

Vitor wrote:

Is it in a flat file (copybook) format and converted to XML by IIB?

Yes.

Vitor wrote:

Is the "archive file" one of the XMLs that's being sent or the original file?

What exactly is the HTTP Request node parsing? What's being sent back by the target except the confirmation?


Flat File is converted to XML by IIB and this XML payload is sent to target in batches, target sends a confirmation. If a 200 OK is received the xml payload is saved on the archive directory, else if a 500 is received the xml payload is saved on the reprocess directory to be reprocessed.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 23, 2018 7:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

I've make a safe bet it's not an application sending the file from the mainframe but some kind of file transfer utility. Is it converted from EBCDIC by the transfer utility or is IIB reading the raw EBCDIC file?

This kind of character problem is typically routed in a conversion issue, especially if the file contains binary data no one's remembered.

Your design still sucks. It's 5 lines of JCL to have the mainframe sort the file and it will do it much more efficiently than a mapping node (or anything else on the distributed side). I'm also not a fan of this weird batching thing, which is an affinity problem waiting to happen.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqbrks
PostPosted: Wed Oct 24, 2018 8:23 am    Post subject: Reply with quote

Voyager

Joined: 17 Jan 2012
Posts: 75

Vitor wrote:
I've make a safe bet it's not an application sending the file from the mainframe but some kind of file transfer utility. Is it converted from EBCDIC by the transfer utility or is IIB reading the raw EBCDIC file?

This kind of character problem is typically routed in a conversion issue, especially if the file contains binary data no one's remembered.


We are receiving a UTF-8 format file after the binary to UTF Conversion by Connect Direct through which we are receiving the file. It is an old design of doing the sorting in the transformation. It can be changed but the mainframe application has to be modified. Please suggest anything I can do to fix the issue ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 24, 2018 9:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqbrks wrote:
We are receiving a UTF-8 format file after the binary to UTF Conversion by Connect Direct through which we are receiving the file.


Connect Direct doesn't do a binary to UTF-8 conversion; it either does an EBCDIC to ASCII conversion or no conversion. If it's converting a file with binary data as if the binary is a set of EBCDIC characters, all sorts of weirdness will occur. Like strange EOF marks turning up in the middle of a file.

Get the Connect Direct people to set the transfer to BINARY and set the FileInput node to whichever EBCDIC CCSID your z/OS is using.

mqbrks wrote:
It is an old design of doing the sorting in the transformation. It can be changed but the mainframe application has to be modified.


No it doesn't.

Get whoever owns the mainframe JCL that's doing the Connect Direct transfer to add a Sort jobstep before the Connect Direct jobstep. It's 5 lines of JCL and half a dozen sort control cards. The Connect Direct step is probably double that.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML Message Truncated while routing through HTTP Request
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.