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 » mq error code 2380

Post new topic  Reply to topic
 mq error code 2380 « View previous topic :: View next topic » 
Author Message
gopalsamant
PostPosted: Sun Oct 03, 2004 9:59 pm    Post subject: mq error code 2380 Reply with quote

Novice

Joined: 24 Sep 2004
Posts: 17

hi, i am getting mq2380 error code when i try to communicate, what could be the reason.
Back to top
View user's profile Send private message
siliconfish
PostPosted: Sun Oct 03, 2004 10:03 pm    Post subject: Reply with quote

Master

Joined: 12 Aug 2002
Posts: 203
Location: USA

try "mqrc 2380" and look for the error info in the documentation.
Check the error logs for more information.
Back to top
View user's profile Send private message
gopalsamant
PostPosted: Sun Oct 03, 2004 10:14 pm    Post subject: Reply with quote

Novice

Joined: 24 Sep 2004
Posts: 17

Could not find any such error
Back to top
View user's profile Send private message
kirani
PostPosted: Sun Oct 03, 2004 10:32 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

All MQ error codes and their error descriptions can be found in Messages manual for WMQ.
Quote:

2380: MQRC_SCO_ERROR
On an MQCONNX call, the MQSCO structure is not valid for one of the following reasons:
. The StrucId field is not MQSCO_STRUC_ID.
. The Version field is not MQSCO_VERSION_1.
This reason code occurs in the following environments: AIX, HP-UX, Linux, Solaris, Windows.
Corrective action: Correct the definition of the MQSCO structure.

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
gopalsamant
PostPosted: Mon Oct 04, 2004 2:05 am    Post subject: Reply with quote

Novice

Joined: 24 Sep 2004
Posts: 17

Thabks for the Infor Kiran, Can you please provide me with some link to download this manual.
Back to top
View user's profile Send private message
JasonE
PostPosted: Mon Oct 04, 2004 3:00 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Er... Top of this page, Documentation -> Messages
Back to top
View user's profile Send private message
gopalsamant
PostPosted: Tue Oct 05, 2004 12:34 am    Post subject: Reply with quote

Novice

Joined: 24 Sep 2004
Posts: 17

Guys, Here is my code in the C client program. I am trying to enable SSL and i am getting error 2380. Please help.

MQSCO sco = {MQSCO_DEFAULT}; /*SSL Configuration Options */
MQCNO cno = {MQCNO_DEFAULT}; /*Connect Options for SSL */

/* Intializing the parameters of structure for SSL */
strcpy(sco.StrucId,MQSCO_STRUC_ID) ;
sco.Version = MQSCO_VERSION_1;
strcpy(sco.KeyRepository, "/cq1/bin/ssl/keyStore");
sco.KeyRepository[21]='\0';

strcpy(cno.StrucId, MQCNO_STRUC_ID) ;
cno.Version = MQCNO_VERSION_4 ;
cno.Options = MQCNO_NONE ;
cno.SSLConfigPtr = &sco ;
cno.SSLConfigOffset = 0 ;
Back to top
View user's profile Send private message
JasonE
PostPosted: Tue Oct 05, 2004 12:58 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

strcpy(sco.StrucId,MQSCO_STRUC_ID) ;
A bit dodgy - since its a 4 byte field, filled with a 4 byte constant, you should use strncpy(sco.StrucId,MQSCO_STRUC_ID, 4);

sco.KeyRepository[21]='\0';
Not required, as you have used strcpy

Cant quite see why you are getting the error though. There's only 2 places you can get this r/c, one is if the eyecatcher is wrong, the other is if the SCO version field is not 1. Try running it under a debugger and see what the MQSCO control block looks like before the call (fiurst 8 bytes).
Back to top
View user's profile Send private message
gopalsamant
PostPosted: Tue Oct 05, 2004 6:15 pm    Post subject: Reply with quote

Novice

Joined: 24 Sep 2004
Posts: 17

Still the same. what do you mean eyecatcher. how do i check whether it is wrong or not.
Back to top
View user's profile Send private message
JasonE
PostPosted: Wed Oct 06, 2004 1:06 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

if you look at a hex dump of the first 8 chars, they should be SCO<space> <version> (layout depends on endianness of the structure, but it is usually:

53 43 4F 20 01 00 00 00 or 53 43 4F 20 00 00 00 01 on ascii platforms

You also need to ensure you are passing in the right pointer to it from the cno structure - it looks ok in the code, but you can check under a debugger (Confirm a 4 byte alignment as well)

If you can narrow the program down to the smallest possible (ie just the failing mqconnx) and post it in here, I'll give it a try! (on windows).
Back to top
View user's profile Send private message
gopalsamant
PostPosted: Thu Oct 07, 2004 1:51 am    Post subject: Reply with quote

Novice

Joined: 24 Sep 2004
Posts: 17

Hi All, thanks for all the help.
Now i am getting 2381 error. not sure what it is. could not find any document that explains that, please help
Back to top
View user's profile Send private message
JasonE
PostPosted: Thu Oct 07, 2004 2:25 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

MQRC 2381

2381 0x0000094d MQRC_KEY_REPOSITORY_ERROR
Back to top
View user's profile Send private message
gopalsamant
PostPosted: Thu Oct 07, 2004 6:40 pm    Post subject: Reply with quote

Novice

Joined: 24 Sep 2004
Posts: 17

Thanks again, here is what i have. i have a file keystore at /cq1/bin/ssl and here is my code for key repository. it is still giving me 2381 error. i have tried changing the path to /cq1/bin/ssl/keystore but still the same error. Below is my code......... please help.
strncpy(sco.StrucId,MQSCO_STRUC_ID,4) ;
sco.Version = MQSCO_VERSION_1;
strcpy(sco.KeyRepository, "/cq1/bin/ssl");
strcpy(sco.CryptoHardware," ");

strcat(qcd.ChannelName,ls_channel);
strcat(qcd.ConnectionName,ls_host);
strcat(qcd.ConnectionName,"(");
strcat(qcd.ConnectionName,ls_port);
strcat(qcd.ConnectionName,")");
strcat(qcd.SSLCipherSpec,"RC4_MD5_US");

strncpy(cno.StrucId, MQCNO_STRUC_ID,4) ;
cno.Version = MQCNO_VERSION_4 ;
cno.Options = MQCNO_NONE ;
cno.ClientConnPtr = &qcd ;
strcpy(cno.ConnTag,MQCT_NONE) ;
cno.SSLConfigPtr = &sco ;


MQCONNX (QMName, /* queue manager */
&cno, /* Connection Options */
&Hcon, /* connection handle */
&CompCode, /* completion code */
&CReason); /* reason code */
Back to top
View user's profile Send private message
JasonE
PostPosted: Fri Oct 08, 2004 2:03 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Modified code, works fine here:

Code:

#include <cmqc.h>
#include <cmqxc.h>
#include <stdio.h>
void main() {
   MQCD qcd = { MQCD_DEFAULT };
   MQSCO sco = { MQSCO_DEFAULT };
   MQCNO cno = { MQCNO_DEFAULT };
   MQCHAR48 QMName;
   MQHCONN  Hcon;                   
   MQLONG   CompCode;               
   MQLONG   CReason;               

   strcpy(QMName, "QM");
   strncpy(sco.StrucId,MQSCO_STRUC_ID,4) ;
   sco.Version = MQSCO_VERSION_1;
   strcpy(sco.KeyRepository, "C:\\MQ\\testprgs\\ssl\\key");
   strcpy(sco.CryptoHardware," ");

[color=blue]   qcd.ChannelType = MQCHT_CLNTCONN;
   qcd.TransportType = MQXPT_TCP;[/color]

   strcat(qcd.ChannelName,"SSL.ADMIN.SVRCONN");
   strcat(qcd.ConnectionName,"127.0.0.1");
   strcat(qcd.ConnectionName,"(");
   strcat(qcd.ConnectionName,"1414");
   strcat(qcd.ConnectionName,")");
   strcat(qcd.SSLCipherSpec,"RC4_MD5_US");

   strncpy(cno.StrucId, MQCNO_STRUC_ID,4) ;
   cno.Version = MQCNO_VERSION_4 ;
   cno.Options = MQCNO_NONE ;
   cno.ClientConnPtr = &qcd ;
   strcpy(cno.ConnTag,MQCT_NONE) ;
   cno.SSLConfigPtr = &sco ;


   MQCONNX (QMName, /* queue manager */
   &cno, /* Connection Options */
   &Hcon, /* connection handle */
   &CompCode, /* completion code */
   &CReason); /* reason code */
 
   printf("cc:%d, rc:%d\n", CompCode, CReason);
}


2381 (KEY_REPOSITORY_ERROR) implies the path to the key repository is incorrect - are you sure you have supplied it correct (where exactly is the key repository you have set up called - your pgm supplied "/cq1/bin/ssl"
Back to top
View user's profile Send private message
gopalsamant
PostPosted: Fri Oct 08, 2004 2:08 am    Post subject: Reply with quote

Novice

Joined: 24 Sep 2004
Posts: 17

Thanks for all the help guys. It is working now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » mq error code 2380
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.