TIBCO-AMX-SV-800012: Could not send message [xx-xx-xx-xx] to address [queue:AMX_SV.yyyy] Caused by: javax.jms.IllegalStateException: Producer is closed.

TIBCO-AMX-SV-800012: Could not send message [xx-xx-xx-xx] to address [queue:AMX_SV.yyyy] Caused by: javax.jms.IllegalStateException: Producer is closed.

book

Article ID: KB0093676

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix Service Grid -
Not Applicable -

Description

Resolution:

The error message indicates TIBCO ActiveMatrix ("AMX") platform JMS (Java Messaging Service) Client is not able to deliver a message to the virtualization queue in EMS as the Producer is already closed. As a consequence "Producer is closed" error is thrown while attempting to deliver the message.


 Error stack trace.

-----------------------------------------------------------------------------------------------------
Caused by: javax.jms.IllegalStateException: Producer is closed
   at com.tibco.tibjms.TibjmsMessageProducer._publish(TibjmsMessageProducer.java:180)
   at com.tibco.tibjms.TibjmsMessageProducer.send(TibjmsMessageProducer.java:520)

-----------------------------------------------------------------------------------------------------


In most cases this issue is due to a connection problem with the EMS Server, such as a connection lost due to a network problem or an EMS Fault Tolerance Fail-over. In AMX, the properties "reconnect_attempt_count" and "reconnect_Attempt_delay" are set via the EMS configuration in Admin UI  (Admin UI -> Infrastructure -> Environments -> <<EnvironmentName>> -> Configuration -> Messaging Bus). Depending on the configuration set at the EMS level, the TIBCO ActiveMatrix Service Grid Client will try to reconnect to the EMS server in case of a connection problem.

- reconnect_attempt_count: When attempting to reconnect, the client iterates through its URL list until it reestablishes a connection with an EMS server. This property determines the maximum number of iterations.
- reconnect_attempt_delay: When attempting to reconnect, the client sleeps for this interval (in milliseconds) between iterations through its URL list.

Ideally, if the EMS server recovers by (reconnect_attempt_count*reconnect_attempt_delay) milliseconds, the TIBCO ActiveMatrix Service Grid Client should be able to reconnect to the the EMS server. An examination of the EMS server log can reveal why the producer is closed. You can enable the following logging in EMS server to obtain more information. The EMS server side logging is enabled via the tibemsadmin tool command without restarting the EMS server.


set server log_trace=DEFAULT,+CONNECT,+PRODCONS

The logging should provide user connections, producer and consumer related information in the EMS server. If more information on the client side is needed, you can enable the following logging as well. (Don't enable client trace unless it’s absolutely required, as this can introduce lots of logging on the client side).

set server client_trace=enabled

Check whether EMS was recovered by (reconnect_attempt_count*reconnect_attempt_delay) milliseconds. If not, then specify a suitable reconnect_attempt_count and reconnect_attempt_delay. If EMS is recovered in time and you still notice this issue, check if there are any problems with the client connections reported in the EMS server log. One of the most common errors is  “reconnect failed: connection unknown for id=xxxxx”. This message indicates that the EMS server does not have or no longer has the client connections information when the client attempts to reconnect. This can happen if “ft_reconnect_timeout” is not high enough and the server has already purged the connection before the client attempts to reconnect. Adjusting “ft_reconnect_timeout” should be considered. 

Issue/Introduction

TIBCO-AMX-SV-800012: Could not send message [xx-xx-xx-xx] to address [queue:AMX_SV.yyyy] Caused by: javax.jms.IllegalStateException: Producer is closed.