Author |
Message
|
Cybu |
Posted: Thu Apr 26, 2007 12:26 am Post subject: The return code from the TCP/IP (read) call was 3426 |
|
|
Newbie
Joined: 26 Apr 2007 Posts: 5
|
Hey there all ...
I have a pretty weird problem with Mq.
My setup is like this : I like to put/read messages from an iSeries with Websphere Mq 6 (with TCP/IP listener et all) from a Pc.
This is my code :
Code: |
public static void main(String[] args) throws MQException {
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES_CLIENT);
MQEnvironment.hostname = "xxx.xxx.x.x";
MQEnvironment.port = 1414;
MQEnvironment.channel = "SYSTEM.ADMIN.SVRCONN";
MQQueueManager queueManager = new MQQueueManager("MyQueueManager");
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT
| MQC.MQOO_INQUIRE | MQC.MQOO_SET_IDENTITY_CONTEXT | MQC.MQOO_BROWSE;
MQQueue queue = queueManager .accessQueue("MyQueue", openOptions, null, null, null);
String a = "This is a test";
byte[] b = a.getBytes("Cp500");
MQMessage qMessage = new MQMessage();
qMessage.correlationId = MQC.MQCI_NONE;
qMessage.messageId = MQC.MQMI_NONE;
qMessage.write(b);
MQPutMessageOptions pmo = new MQPutMessageOptions();
queue.put(qMessage, pmo);
:
:
|
This gives no erros but the message isn't put on the queue !
When I look into the Mq Logs on the iSeries I get this:
Code: |
04/26/07 09:53:36 - Process(1205.75) User(QMQM) Jobname(010426/QMQM/AMQRMPPA )
AMQ9208: Error on receive from host xxxxxxxx (xxx.xxx.x.xx).
EXPLANATION:
Cause . . . . . : An error occurred receiving data from pcnicolas
(xxx.xxx.x.xx) over TCP/IP. This may be due to a communications failure.
Recovery . . . : The return code from the TCP/IP (read) call was 3426
(X'X'00000D62''). Record these values and tell the systems administrator.
----- amqccita.c : 3224 -------------------------------------------------------
|
The weird stuff is if I do a read immediately after that write it gets the message ...
when I put something on the queue using WebsphereMq Explorer I can read the message but it doesn't remove the message from the queue !
Does this have anything to do with the channel I'm using (just guessing here) |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 26, 2007 1:47 am Post subject: Re: The return code from the TCP/IP (read) call was 3426 |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Cybu wrote: |
The weird stuff is if I do a read immediately after that write it gets the message ...
|
Do you get the message, or do you get the uncleared contents of the buffer you used to do the put?
The TCP/IP code is almost certainly connected to the problem, and it may be the channel you're using. As you told us nothing about this channel, like how it's defined, it's hard to be more definative.....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Cybu |
Posted: Thu Apr 26, 2007 1:58 am Post subject: |
|
|
Newbie
Joined: 26 Apr 2007 Posts: 5
|
Quote: |
Do you get the message, or do you get the uncleared contents of the buffer you used to do the put? |
Good question ... I don't know actually ...
I use this code to read
Code: |
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQC.MQGMO_SYNCPOINT | MQC.MQGMO_LOGICAL_ORDER
| MQC.MQGMO_WAIT | MQC.MQGMO_COMPLETE_MSG | MQC.MQGMO_CONVERT;
gmo.waitInterval = MQC.MQWI_UNLIMITED;
MQMessage myMessage = new MQMessage();
myMessage.clearMessage();
myMessage.correlationId = MQC.MQCI_NONE;
myMessage.messageId = MQC.MQMI_NONE;
queue.get(myMessage, gmo); |
So I would think I read from the queue itself. So it is theoretically impossible that if I don't actually write anything to the queue I get an answer from this.
Quote: |
As you told us nothing about this channel, like how it's defined, it's hard to be more definative |
/me = n00b
Code: |
Channel name . . . . . . . . . : SYSTEM.ADMIN.SVRCONN
Message Queue Manager name . . : MyQueueManager
Channel type . . . . . . . . . : *SVRCN
Transport type . . . . . . . . : *TCP
Text 'description' . . . . . . : Auto-defined by
Message channel agent user ID :
Security exit . . . . . . . . :
Library . . . . . . . . . . :
Security exit user data . . . :
Send exit . . . . . . . . . . :
Library . . . . . . . . . . :
Send exit user data . . . . . :
Receive exit . . . . . . . . . :
Library . . . . . . . . . . :
Receive exit user data . . . . :
Put Authority . . . . . . . . : *DFT
Maximum message length . . . . : 4194304
Heartbeat Interval . . . . . . : 300
Last alter date . . . . . . . : 2007-04-23
Last alter time . . . . . . . : 10.05.25
SSL CipherSpec . . . . . . . . : *NONE
Keep Alive Interval . . . . . : *AUTO
Header Compression . . . . . . : *NONE
Message Compression . . . . . : *NONE
Channel Monitoring . . . . . . : *QMGR
Channel Statistics . . . . . . : *QMGR
|
|
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 26, 2007 2:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Do not use the admin channel for an application programme.
Specify a client connection setup and use that for your program. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Cybu |
Posted: Thu Apr 26, 2007 2:17 am Post subject: |
|
|
Newbie
Joined: 26 Apr 2007 Posts: 5
|
I have tried to make a new channel ... But the result is the same (which isn't much of a surprise since the properties of both channels are the same)
Is there some flag I have to change ? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 26, 2007 2:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Cybu wrote: |
Is there some flag I have to change ? |
No. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Cybu |
Posted: Thu Apr 26, 2007 4:27 am Post subject: |
|
|
Newbie
Joined: 26 Apr 2007 Posts: 5
|
Using the other channel might be better code practice but I'm still facing the same problem  |
|
Back to top |
|
 |
Cybu |
Posted: Fri Apr 27, 2007 1:52 am Post subject: |
|
|
Newbie
Joined: 26 Apr 2007 Posts: 5
|
Good new everybody !
I just created a new queue and apparently I can write and read properly now. So I assume it was a rights-problem (damn you to hell iSeries with your 1000 rights)
Anyhoo ... it worked ... thanks for the tips |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 27, 2007 2:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You got a TCP/IP error from MQ Security.....
Oh well. All's well that ends well.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|