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 » IBM MQ Installation/Configuration Support » Failed to send a message to destination

Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next
 Failed to send a message to destination « View previous topic :: View next topic » 
Author Message
fjb_saper
PostPosted: Wed Feb 01, 2017 12:33 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Vitor wrote:
fjb_saper wrote:
the put did happen and before the qmgr could respond positively the connection got broken and you still get a 2009... (client side).


Really? If the queue manager has failed to handshake with the client, wouldn't it roll back the message? Or at least leave it uncommitted?

The assumption you are making here is that you are running inside of a Unit of Work. What happens if your put is outside of a Unit of Work? Clearly from the OP's post, he is not working inside a UOW
Code:
 session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

Also the automated reconnection to the MI manager should allow you to finally commit or roll back the pending UOW after reconnection...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Feb 01, 2017 12:47 pm    Post subject: Reply with quote

Grand High Poobah

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

fjb_saper wrote:
Clearly from the OP's post, he is not working inside a UOW
Code:
 session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);


It's Java - there's nothing clear about it.

It's like the A-level Calculus textbooks I used to hate as a child; they fill an A4 page with formulae and then smugly write:

Quote:
from which it can be seen


I spent many lessons muttering, "not by me it can't be" under my breath.

Java. Humbug.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Feb 01, 2017 4:38 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

You can use syncpoint to do the put, you issue the commit and get a 2009 reason code. Did the commit work (connection broker after the commit worked but before the the result was sent back), or not (connection broker prior to Qmgr executing the commit)? Flip a coin, you can't tell and you shouldn't guess.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
tczielke
PostPosted: Wed Feb 01, 2017 8:29 pm    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
Location: Illinois, USA

If you really need to know, you PUT your application message to your application queue and PUT another message with a unique identifier (also probably with an expiry) to another sync queue under the same unit of work, and then you commit. If you get a 2009, you check if your identifier message is on the sync queue. If so, your commit to your application queue was good. If not, you have relative assurance your commit to your application queue failed.
_________________
Working with MQ since 2010.
Back to top
View user's profile Send private message
kalam475
PostPosted: Wed Feb 01, 2017 10:24 pm    Post subject: Reply with quote

Acolyte

Joined: 16 Jan 2015
Posts: 63

Quote:

The assumption you are making here is that you are running inside of a Unit of Work. What happens if your put is outside of a Unit of Work? Clearly from the OP's post, he is not working inside a UOW


We have tried making it under UOW by giving the
Quote:
session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);

and tried to make commit and rollback in the code. When I use reconnection logic it is trowing an exception JMSCC0020: This session is closed.


still same issue.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 02, 2017 6:23 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

kalam475 wrote:
Quote:

The assumption you are making here is that you are running inside of a Unit of Work. What happens if your put is outside of a Unit of Work? Clearly from the OP's post, he is not working inside a UOW


We have tried making it under UOW by giving the
Quote:
session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);

and tried to make commit and rollback in the code. When I use reconnection logic it is trowing an exception JMSCC0020: This session is closed.


still same issue.

See tzielke's post above on the subject...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Thu Feb 02, 2017 6:36 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Have you looked at the error logs on both client and server? Any errors noted?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Feb 02, 2017 8:06 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Vitor wrote:


I spent many lessons muttering, "not by me it can't be" under my breath.

Java. Humbug.


Te-He. I was in the same boat until I discovered Laplace Transforms. The Maths Dept hit back by adding to the exam questions. "Not to be solved using Laplace Transforms".

Grrrrrrrrr
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kalam475
PostPosted: Thu Feb 02, 2017 8:13 am    Post subject: Reply with quote

Acolyte

Joined: 16 Jan 2015
Posts: 63

Quote:
Have you looked at the error logs on both client and server? Any errors noted?


In WAS Systemout.log file we are getting the same error i.e 2009 in MQ server error logs there is only mentioning of switching the queue manager apart from that no other no other mention of missing messages.


can anyone please elaborate what @tczielke is suggesting. how the putting a message in another sync queue will help me in this scenario. If i am not wrong what he is suggesting is put the message in actual queue first and put the another message in sync queue and then commit. but what if my queue manager switches to standby after first put in actual queue.

Thanks to all for your help.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Feb 02, 2017 8:48 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Please look at the MQ error logs - on BOTH client platform AND qmgr server platform? Any errors logged?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 02, 2017 2:38 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

kalam475 wrote:
Quote:
Have you looked at the error logs on both client and server? Any errors noted?


In WAS Systemout.log file we are getting the same error i.e 2009 in MQ server error logs there is only mentioning of switching the queue manager apart from that no other no other mention of missing messages.


can anyone please elaborate what @tczielke is suggesting. how the putting a message in another sync queue will help me in this scenario. If i am not wrong what he is suggesting is put the message in actual queue first and put the another message in sync queue and then commit. but what if my queue manager switches to standby after first put in actual queue.

Thanks to all for your help.

So when you read the message from the sync queue (after the MI qmgr switched ) you will either find the message (give it enough TTL) or you won't.
If you won't there is a good chance the 2009 was returned before the commit. If you do the 2009 was returned after the commit...

Now if you can recover automatically the pending transactions from WAS after the switch...

Hope it helps...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Thu Feb 02, 2017 4:37 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

tczielke wrote:
If you really need to know, you PUT your application message to your application queue and PUT another message with a unique identifier (also probably with an expiry) to another sync queue under the same unit of work, and then you commit. If you get a 2009, you check if your identifier message is on the sync queue. If so, your commit to your application queue was good. If not, you have relative assurance your commit to your application queue failed.

Clever!
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Feb 02, 2017 6:25 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Clever indeed.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Feb 03, 2017 3:46 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

And then you remember to schedule something to drain the sync queue....
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 03, 2017 5:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

mqjeff wrote:
And then you remember to schedule something to drain the sync queue....

Wouldn't checking with a destructive get do that for you?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next Page 2 of 3

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Failed to send a message to destination
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.