|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Total Newbie cannot get message from Queue |
« View previous topic :: View next topic » |
Author |
Message
|
JamesD |
Posted: Wed May 17, 2006 12:59 pm Post subject: Total Newbie cannot get message from Queue |
|
|
Newbie
Joined: 17 May 2006 Posts: 6
|
Hello All. I am trying to get messages, from a client. I can do it by using the sample program, but I am trying to do it using 'C' code.
All I keep geting is:
Sample AMQSGET0 start
MQCONN ended with reason code 2059
Press any key to continue
And the Errors file has the message:
5/17/2006 15:57:03
AMQ9202: Remote host 'OA-DEGAS (192.168.0.7) (1414)' not available, retry
later.
EXPLANATION:
The attempt to allocate a conversation using TCP/IP to host 'OA-DEGAS
(192.168.0.7) (1414)' was not successful. However the error may be a
transitory one and it may be possible to successfully allocate a TCP/IP
conversation later.
ACTION: Try the connection again later. If the failure persists, record the error values and contact your systems administrator. The return code from TCP/IP is 10060 (X'274C'). The reason for the failure may be that this host cannot reach the destination host. It may also be possible that the listening program at host 'OA-DEGAS (192.168.0.7) (1414)' was not running. If this is the case, perform the relevant operations to start the TCP/IP listening program, and try again.
I have tried this a hundred times (literally) and gotten the same result. The listener is running. And I can run the example program over and over with no problems.
Please Help,
Jim
Here is my code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* includes for MQI */
#include <cmqc.h>
#include "C:\MQClient\Tools\c\include\cmqxc.h"
// int main(int argc, char **argv)
int main()
{
/* Declare MQI structures needed */
MQOD mqod = {MQOD_DEFAULT}; /* Object Descriptor*/
MQMD mqmd = {MQMD_DEFAULT}; /* Message Descriptor */
MQGMO mqgmo = {MQGMO_DEFAULT}; /* get message options */
/** note, sample uses defaults where it can **/
MQCNO mqcno = {MQCNO_DEFAULT}; /*Connection Options*/
MQCD mqcd = {MQCD_CLIENT_CONN_DEFAULT}; /*Client Connection*/
MQHCONN hConn; /* connection handle*/
MQHOBJ hObject; /* object handle*/
MQLONG iOpenOptions; /* MQOPEN options*/
//MQLONG C_options; /* MQCLOSE options*/
MQLONG iCompCode; /* completion code*/
//MQLONG iOpenCode; /* MQOPEN completion code*/
MQLONG iReason; /* reason code for MQCONN */
//MQLONG CReason; /* reason code for MQCONN*/
MQBYTE buffer[1000]; /* message buffer */
MQLONG buflen; /* buffer length */
MQLONG iMessageLength; /* message length received */
MQCHAR48 qmgrName; /* queue manager name */
mqcno.Version = MQCNO_VERSION_2;
mqcno.ClientConnPtr = &mqcd;
mqcd.TransportType=MQXPT_TCP;
mqcd.ChannelType=MQCHT_CLNTCONN;
strcpy(qmgrName, "QM_oa_degas");
strcpy(mqcd.ChannelName ,"SYSTEM.DEF.SVRCONN");
strcpy(mqcd.ConnectionName ,"192.168.0.7(1414)");
printf("Sample AMQSGET0 start\n");
MQCONNX(qmgrName, /* queue manager */
&mqcno, /*connection options*/
&hConn, /* connection handle */
&iCompCode, /* completion code */
&iReason); /* reason code */
if (iCompCode == MQCC_FAILED)
{
printf("MQCONN ended with reason code %d\n", iReason);
return (iReason );
} |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed May 17, 2006 2:35 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Try this from the MQClient machine and tell me what you get:
amqscnxc -c SYSTEM.DEF.SVRCONN -x 192.168.0.7
Then try this from a command prompt on the client machine and tell me what you get:
telnet 192.168.0.7 1414 _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|