手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表Tag:websphere

连接mq出现2538、2539错误

最近在一个合作项目中需要连接ibm的websphere,经常连着连着就报错了。

比如2533错误:Reason:2033 Text:No message available.  没信息了。。。。

再比如2538错误:Connx CompCode:2 Reason:2538 Text:An MQCONN call was issued from a client to connect to a queue manager but the attempt to allocate a conversation to the remote system failed

这2538就是TMD连接不上服务器,后来问了对方,原来,对方挂了。我晕

今天又是2538,再一问,我靠,换IP了。。真受不了

然后改好IP,再连接,结果。。。2539出现了:Reason:2539 Text:An MQCONN call was issued from a client to connect to a queue manager but the attempt to establish communication failed

查了下2539对应的错误:

XML/HTML代码
  1. 2539 (09EB) (RC2539): MQRC_CHANNEL_CONFIG_ERROR  
  2.   
  3. Explanation  
  4.   
  5. An MQCONN call was issued from a client to connect to a queue manager but the attempt to establish communication failed. Common causes of this reason code are:  
  6.   
  7. a.The server and client cannot agree on the channel attributes to use.  
  8. b.There are errors in one or both of the QM.INI or MQCLIENT.INI configuration files.  
  9. c.The server machine does not support the code page used by the client.  

有三种可能。。。现在就等对方折腾了。不过查了下,关于第三种,code page不一样的错误,在http://www.cnblogs.com/fromchaos/archive/2010/02/24/1672736.html,有个解释。为了方便我就复制部分东西过来了

XML/HTML代码
  1. 选择客户机或服务器编码字符集标识(CCSID)  
  2.   
  3. 客户机代码假设通过客户机中 MQI 的字符数据位于机器所配置的 CCSID 中。如果此 CCSID 是一个不支持的 CCSID 或不是必需的 CCSID,可以用 MQCCSID 环境变量覆盖它,例如,在 Windows® 上:  
  4.   
  5. SET MQCCSID=850  
  6. 更新开始或者,在 UNIX® 系统上:  
  7. export MQCCSID=850  

如果是CCSID的问题我只要加在rc.local就好了,不过目前还不知道对方是不是这个错误。。。最后再转一下上述文章的最后一段,关于CCSID的说明

XML/HTML代码
  1. IBM Coded Character Set Identifiers (CCSID)码表  
  2.   
  3. A CCSID is a Coded Character Set Identifier. The Unicode standard defines a Coded Character Set as "A character set in which each character is assigned a numeric code value." This means that a CCSID is a number that defines a numeric ordering of characters. The IBM ® Character Data Representation Architecture (CDRA) as defined in SC09-1390, defines CCSIDs that are used with IBM to represent character data. This architecture defines Single Byte Character Set (SBCS) CCSIDs, Multiple Byte Character Set (MBCS) CCSIDs, and Mixed CCSIDs which are a combination of SBCS and MBCS data. MBCS CCSIDs are usually used for languages, such as Chinese, Japanese, and Korean, that define a larger number of characters than can be represented in a single byte.   
  4. CCSID是一个字符集的标识。作为unicode标准通过定义一个字符集内每个字符要对应那个数字值的方式定义了一个字符集。这说明CCSID就是一个定义字符集顺序的标识数码罢了。IBM的字符标识架构在文档 SC09-1390(http://www-304.ibm.com/jct03002c/software/globalization/cdra/index.jsp;http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/FOCREF00/CCONTENTS)中做了定义,CCSID是IBM用来标识字符序列的标识代码。这个架构定义了SDCS(单字符集)的CCSID值,MBCS(多字符集)的CCSID值和混合单字符多字符集的混合CCSID值。多字符集的CCSID一般用于语言,比如中文,日文,韩文,这些语言的字符量很大,无法用单字节的码值来代表。  
  5.   
  6. All SBCS CCSIDs define a similar basic set of characters, although they might define them in different numeric ordering. For instance all SBCS EBCDIC CCSIDs define the number "1" as x'F0' and all SBCS ASCII CCSIDs define the number 1 as x'30'.  
  7.   
  8. CCSID间的转换有多种类型。其中一种转换就是从一种CCSID到另一种CCSID的转换,举例来说从ASCII(CCSID 1252)到EBCDIC(CCSID 37)。另一种是从串数据到另一种数据类型的转换。举例来说转换字符串数据到数值。在所有的这种类型的转换中都必须标识CCSID值来保证转换的正确进行。  
  9.   
  10. 但是转换是有要求的,第一种转换的前提是转到的 CCSID的类型中要包含转换前的CCSID类型中要转换的字符,比如,如果从CCSID1381(S-CHGBPC-DATA) 类型的简体中文的PC编码中的一个中文字符"中"字到其他CCSID编码转换到的编码起码要求这个CCSID编码的字符集中包含同样的"中"字。  
  11.   
  12. 我从IBM找到的对CCSID说明的列表如下:  
  13.   
  14. 摘录自http://www-304.ibm.com/jct03002c/software/globalization/ccsid/ccsid_registered.jsp,如果需要详细信息,请自行查询。  

做个笔记,从去年开始,不停的在与第三方对接程序。有时候真心想骂娘,后来想想,大家都是混口饭吃嘛。而且人家还是上游单位,混的比你好多了。。不要与他们一般见识 。

Tags: websphere

转:WebSphere MQ7 在Ubuntu上的安装

 先申明。。。参考本文,我并没有成功的搭建成功。因为我在执行第一个rpm --nodeps -ivh Runtime的时候。不是按照预想的安装在了/opt/mqm下面,而是提示我安装在/ filesystem下。所以我就没有办法下一步。因为在执行第二个安装的时候,它提示我没有在/opt/mqm下找到runtime。。。

不过我还是做个记录,因为我是debian系统。也许ubuntu下就会成功呢??原文来自:http://qtlkw.iteye.com/blog/744052

我转贴的并不全。下面的一些介绍我没有转,如果有兴趣可以移步原文,以下是转贴:

可参照文档http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amq1ac.doc/lq10120_.htm 和http://blog.csdn.net/lang_ysh/archive/2010/03/18/5391971.aspx 

1. Download WebSphere MQ7 tar.gz
2. run tar -zxvf CZ4VDML.tar.gz
3(optional). 创建WebSphere MQ 必需的文件系统,命令如下:
   # for product code
   mkdir /opt/mqm
   # for working data
   mkdir /var/mqm
   网上看到说MQ安装时候默认的目录就是这两个
4. 创造MQ用户和用户组,命令如下:
   groupadd mqm
   useradd -d /var/mqm -g mqm -G mqm mqm
   # change password to "password"
   passwd mqm
5. 为mqm用户组添加root组
   cd /etc
   vi group
   找到mqm:x:1003:mqm增加",root",修改成: mqm:x:1003:mqm,root
6(optional). 调整系统参数(视需要而定,我安装时并没修改)
   make following kernel changes (/etc/sysctl.conf ):
   kernel.msgmni = 1024
   kernel.shmmni = 4096
   kernel.shmall = 2097152
   kernel.sem = 500 256000 250 1024
   fs.file-max = 32768
   net.ipv4.tcp_keepalive_time = 300

   To load these sysctl values immediately, enter the command sysctl -p.
   If you do not issue the sysctl -p command, the new values are loaded when the system is rebooted.
7. 安装rpm
   sudo apt-get install rpm
8. 转到WebSphere MQ解压后的目录中,获得WebSphere MQ授权,命令如下:
   ./mqlicense.sh -text_only
   阅读全文后,选择1接受授权。
9. 安装WebSphere MQ客户端和服务端,命令如下:
        rpm --nodeps -ivh MQSeriesRuntime-7.0.1-0.i386.rpm
        rpm --nodeps -ivh MQSeriesSDK-7.0.1-0.i386.rpm
        rpm --nodeps -ivh MQSeriesJava-7.0.1-0.i386.rpm
        rpm --nodeps -ivh MQSeriesClient-7.0.1-0.i386.rpm
        rpm --nodeps -ivh MQSeriesSamples-7.0.1-0.i386.rpm

        rpm -nodeps -ivh MQSeriesServer-7.0.1-0.i386.rpm(如果只装客户端,这个没必要安装)
   原因: 不加-nodeps会报: 
   root@localhost:/apps# rpm -ivh MQSeriesRuntime-7.0.1-0.i386.rpm
   error: Failed dependencies:
          /bin/sh is needed by MQSeriesRuntime-7.0.1-0.i386
10. 安装校验
    rpm -qa | grep MQSeries
    MQSeriesSDK-7.0.1-0
    MQSeriesClient-7.0.1-0
    MQSeriesServer-7.0.1-0
    MQSeriesRuntime-7.0.1-0
    MQSeriesJava-7.0.1-0
    MQSeriesSamples-7.0.1-0

    安装MQ Explorer还需要安装其它的包:

    MQSeriesConfig-7.0.1-0.i386.rpm

    MQSeriesEclipseSDK33-7.0.1-0.i386.rpm

    MQSeriesJRE-7.0.1-0.i386.rpm

至此MQ安装完成。

--END--

Tags: websphere