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 API Support » MQCONN: CompCode = 2, Reason Code = 2059,Message=Error in th

Post new topic  Reply to topic Goto page 1, 2  Next
 MQCONN: CompCode = 2, Reason Code = 2059,Message=Error in th « View previous topic :: View next topic » 
Author Message
praveenkumbam123
PostPosted: Tue Jul 18, 2006 9:08 pm    Post subject: MQCONN: CompCode = 2, Reason Code = 2059,Message=Error in th Reply with quote

Novice

Joined: 18 Jul 2006
Posts: 10
Location: Malaysia

I am getting an error "MQCONN: CompCode = 2, Reason Code = 2059,Message=Error in the application"while trying to open the MQ API.
Presently we are using version 6.0 using with vb.net.my application is local to the server.i am using server bindings.this is the code i am using.
qMgr = New MQQueueManager(strQManager)
openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING
mqQ = qMgr.AccessQueue(strRemoteQ, openOptions)

MQMsg = New MQMessage
MQMsg.WriteBytes(msg)
MQMsg.Format = MQC.MQFMT_STRING

pmo = New MQPutMessageOptions
mqQ.Put(MQMsg, pmo)
Return True
Catch ex As MQException
Dim Err As String = Region & " DRSS MQQueueManager::AccessQueue ended with :" + ex.Message
Err = Err + ex.Reason.ToString
strCurrentStatusMsg = Err
Return False
'Return True
Finally
qMgr = Nothing
MQMsg = Nothing
pmo = Nothing
End Try
please help me correct my problem
thanks in advance.
praveen
_________________
praveen
Back to top
View user's profile Send private message Yahoo Messenger
elvis_gn
PostPosted: Tue Jul 18, 2006 9:48 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi praveenkumbam123,

Error 2059 means that the QM name ur using does not exist...

Quote:
C:\Documents and Settings\elvis>mqrc 2059

2059 0x0000080b MQRC_Q_MGR_NOT_AVAILABLE

C:\Documents and Settings\elvis>


Regards.
Back to top
View user's profile Send private message Send e-mail
praveenkumbam123
PostPosted: Tue Jul 18, 2006 10:09 pm    Post subject: Reply with quote

Novice

Joined: 18 Jul 2006
Posts: 10
Location: Malaysia

Hi Elvis,

"NDPSMQ1" queue manager is up and running.
recently they installed version 6 in test server.
is there any problem with my code?
is there any problem in instaletion?
please help to correct my problem
thanks advance

regards
praveen
_________________
praveen
Back to top
View user's profile Send private message Yahoo Messenger
elvis_gn
PostPosted: Tue Jul 18, 2006 10:29 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi praveenkumbam123,

Put a println statement before and after the below line of code, and print the name of the queue manager that your application is trying to connect to
Code:
qMgr = New MQQueueManager(strQManager)


Most probably your QM name used in the app is wrong....

Regards.
Back to top
View user's profile Send private message Send e-mail
praveenkumbam123
PostPosted: Tue Jul 18, 2006 10:59 pm    Post subject: Reply with quote

Novice

Joined: 18 Jul 2006
Posts: 10
Location: Malaysia

Hi Elvis,
this is my queue manager name:NDPSMQ1
i am passing correct one.
the server is up and running.
here i am not using client connection bcoz i am working on same server with my application.so no need to pass hostname and channel info.
can i restart the server once?
evrything fine in my code part.

thanks in advance

regards
praveen
_________________
praveen
Back to top
View user's profile Send private message Yahoo Messenger
praveenkumbam123
PostPosted: Tue Jul 18, 2006 11:15 pm    Post subject: Reply with quote

Novice

Joined: 18 Jul 2006
Posts: 10
Location: Malaysia

CompCode = 2, Reason Code = 2059,
ex.Message=Error in the application
i am not getting mesage=MQRC_Q_MGR_NOT_AVAILABLE
i am getting message=Error in the application
_________________
praveen
Back to top
View user's profile Send private message Yahoo Messenger
elvis_gn
PostPosted: Tue Jul 18, 2006 11:22 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi praveenkumbam123,

Which line of code is the application failing at ? Did you check by putting print statements...

Code:
mqQ = qMgr.AccessQueue(strRemoteQ, openOptions)

Are u trying to access some remote Queue...?? but this would have anyway thrown a different error...

Can you please do a dspmq and show us the output.

Regards.
Back to top
View user's profile Send private message Send e-mail
praveenkumbam123
PostPosted: Tue Jul 18, 2006 11:39 pm    Post subject: Reply with quote

Novice

Joined: 18 Jul 2006
Posts: 10
Location: Malaysia

C:\Documents and Settings\servicemq_admin>dspmq
QMNAME(NDPSMQ1) STATUS(Running)

C:\Documents and Settings\servicemq_admin>

I am getting error here with this line
qMgr = New MQQueueManager(strQManager)

here it throwing exception error
CompCode = 2, Reason Code = 2059,Message=Error in the application
_________________
praveen
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Tue Jul 18, 2006 11:40 pm    Post subject: Reply with quote

Grand High Poobah

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

Hi praveenkumbam123

Are you quite certain you're using the server bindings? I know it's a odd thing to ask and I apologise, but is there any chance your application could have accidently been bound as a client?

My reasoning (such as it is) is that if the wrong name was being specified in a server bound program I would have expected a 2058 rather than a 2059. Possible problem with that - I've never used .NET!

But, using VB6 I can prove it does throw a 2058 - no such queue manager. The same harness recompiled as a client throws 2059 - there might be such a queue manager somewhere but I can't find it.

It's a plausable theory. Like a lot of mine. Right up to the point where they prove to be wrong!

Worth 10 seconds of your time to check though
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
praveenkumbam123
PostPosted: Tue Jul 18, 2006 11:46 pm    Post subject: Reply with quote

Novice

Joined: 18 Jul 2006
Posts: 10
Location: Malaysia

Imports IBM.WMQ
Imports System
Module Module2
Private qManager As String = "NDPSMQ1"
Private qMgr As MQQueueManager
Dim localque As String = "SMQ.NDPSMQ1.APCC01"
Dim remoteque As String = "EMS.NAPDRSS01.APCC01"
Dim mqQ As MQQueue
Sub main()
Try
'Wri(qManager)
MsgBox(qManager)
qMgr = New MQQueueManager(qManager) here iam getting error Dim openOptions As Integer = MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_OUTPUT
mqQ = qMgr.AccessQueue(localque, openOptions)
Dim hello_world As MQMessage = New MQMessage
hello_world.WriteUTF("Hello World!")
Dim pmo As MQPutMessageOptions = New MQPutMessageOptions
mqQ.Put(hello_world, pmo)
Dim retrievedMessage As MQMessage = New MQMessage
retrievedMessage.MessageId = hello_world.MessageId
Dim gmo As MQGetMessageOptions = New MQGetMessageOptions
mqQ.Get(retrievedMessage, gmo)
Dim msgText As String = retrievedMessage.ReadUTF()
Console.WriteLine("The message is:{0}", msgText)
mqQ.Close()
qMgr.Disconnect()
Catch ex As MQException
If ex.Source = "amqmdnet" Then
If ex.CompCode = 2 Then
If ex.ReasonCode = 2059 Then
If ex.Message = "MQRC_Q_MGR_NOT_AVAILABLE" Then

Console.WriteLine("A WebSphere MQ error occurred:{0}", ex.Message)
End If
End If
End If
End If
Catch ex As MQException
Console.WriteLine("A System error occurred:{0}", ex.ToString())
End Try
End Sub
End Module
_________________
praveen
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Tue Jul 18, 2006 11:58 pm    Post subject: Reply with quote

Grand High Poobah

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

Like I said, I don't speak .NET

Where does it say it's using server bindings? In VB6 it's not specified in the code because it's a link option like in C.

(So I only know obsolete languages. )
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
praveenkumbam123
PostPosted: Wed Jul 19, 2006 12:29 am    Post subject: Reply with quote

Novice

Joined: 18 Jul 2006
Posts: 10
Location: Malaysia

Hi Vitor,

Thanks for your replay.
Can you give some light on client bindings and server bindings.
first time i am working on MQ components.
here my secnario is i am working on server where websphere is installed.
so i am not passing hostname and channel info.just i am passing queue manager name.
i am surprised with error message="Error in the application"
i never see this type of error.
but reason code=2059
and source=amqmdnet

thanks
_________________
praveen
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Wed Jul 19, 2006 12:38 am    Post subject: Reply with quote

Grand High Poobah

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

For the 3rd time - I don't speak .NET, I don't know how to write it or build it! Hopefully someone else who's passing will give better info.

Anyway, your 1st post said:

praveenkumbam123 wrote:
i am using server bindings


Now either you are or you are not. Are you saying you think your program has server bindings or you're trying to use server bindings but have taken no action to set this up other than running it on a local queue manager?

Okay, now in my world (which is not yours) there are 2 distinct MQ libraries - one server side, one client side. To use server bindings you link to one, to use client you link to the other. Hence if your VB is linked client side (which is the default one VB6) it would cause the code you're getting.

Simplest solution I can think of is to set up a client connection (an MQSERVER variable or whatever's best for you) to the queue manager you want to use. If your program starts working (or stops throwing a 2059) it's bound as a client!!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
praveenkumbam123
PostPosted: Wed Jul 19, 2006 1:48 am    Post subject: Reply with quote

Novice

Joined: 18 Jul 2006
Posts: 10
Location: Malaysia

Hi all,

i have some doubts in web sphere v 6.0 configuration.
actually in my server my admin is created one queue Manager(NDPSMQ1) for testing to the application, and also he created local queue and remote queue.
so he is not created any channel.
listner is running on deafult port 1414.

i am trying to connect queue manager, but its throwing error.
here i am passing queue manager name,but i am not passing channel name or host name bcoz my application is on same server.

error code is 2059 and message is Error in the Application
here i am using vb.net.
is it compulsory to create channel?

thanks in advance[/b]
_________________
praveen
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Wed Jul 19, 2006 1:59 am    Post subject: Reply with quote

Grand High Poobah

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

If he only created one queue manager, where's the remote queue pointing......?

It's not compulsory to create a channel if you're using server bindings.

You need to check that, not just keep reposting the error you're getting from your program!

There's no point us proposing solutions if you don't try them & we're wrong (bit of a royal "we" there I'm afraid ). Define a client connection using the default channels (which would have been created automatically with the queue manager) and see if that helps.

You might also want to try skimming through the "Using .NET" manual, which contains a wealth of information on connection. Interestingly, my quick (and as I've said before unskilled) pass through it revealed no reference to server bindings at all, but a lot of stuff about clients.

Can you run a .NET program as server side? Anyone?
_________________
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 » IBM MQ API Support » MQCONN: CompCode = 2, Reason Code = 2059,Message=Error in th
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.