IBM MQSeries problem: the remote host closes the connection when writing a message (error 10054)

I am trying to write to an IBM MQSeries host using

public void WriteMessage(string message) { queueMessage = new MQMessage(); queueMessage.WriteString(message); queueMessage.Format = MQC.MQFMT_STRING; queuePutMessageOptions = new MQPutMessageOptions(); queue.Put(queueMessage, queuePutMessageOptions); } 

My errorcatch gives me an error:

Application error

This, of course, does not show. So I checked the event log on the server and this showed me an error:

An error occurred while retrieving data from stx041774 (192.168.225.51) TCP / IP. This may be due to communication failure.

 The return code from the TCP/IP (recv) call was 10054 (X'2746'). 

Record these values ​​and inform your system administrator.

I looked at 10054 and said:

An existing connection was forcibly closed by the remote host.

Does anyone know what I can do to make this work? Perhaps there is an MQC option that I should set for recording? Since I have no idea what to do with the parameters, I'm not even sure if this is a problem.

+4
source share
1 answer

I solved this problem with the mqc.mqoo_output option:

 queue = qManager.AccessQueue(QueueName, MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING); 
+3
source

Source: https://habr.com/ru/post/1300716/


All Articles