[
https://issues.apache.org/jira/browse/AIRAVATA-1459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14153670#comment-14153670
]
Lahiru Gunathilake edited comment on AIRAVATA-1459 at 9/30/14 8:00 PM:
-----------------------------------------------------------------------
I think there is an issue with the following code where when the lock is not
recieved to add the string to the map and if the delivery object timeout we do
not have that message anymore. So I fixed it with the code at the bottom. I
guess this could be the case (after looking at the logs, that is what I
suspect).
Old Code
------------
QueueingConsumer.Delivery delivery = consumer.nextDelivery();
logger.info("---------------- Job Finish message
received:" + new String(delivery.getBody()) + " --------------");
synchronized (completedJobsFromPush) {
completedJobsFromPush.add(new
String(delivery.getBody()));
}
ch.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
New Code
--------------
QueueingConsumer.Delivery delivery = consumer.nextDelivery();
String message = new String(delivery.getBody());
//immediately read it to a string, even lock aquire delays doesn't matter
logger.info("---------------- Job Finish message
received:" + message + " --------------");
synchronized (completedJobsFromPush) {
completedJobsFromPush.add(message));
}
ch.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
was (Author: lahiru):
I think there is an issue with the following code where when the lock is not
recieved to add the string to the map and if the delivery object timeout we do
not have that message anymore. So I fixed it with the code at the bottom. I
guess this could be the case (after looking at the logs, that is what I
suspect).
Old Code
------------
QueueingConsumer.Delivery delivery = consumer.nextDelivery();
logger.info("---------------- Job Finish message
received:" + new String(delivery.getBody()) + " --------------");
synchronized (completedJobsFromPush) {
completedJobsFromPush.add(new
String(delivery.getBody()));
}
ch.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
New Code
--------------
QueueingConsumer.Delivery delivery = consumer.nextDelivery();
String message = new String(delivery.getBody());
//immediately read it to a string, even lock aquire delays doesn't matter
logger.info("---------------- Job Finish message
received:" + message + " --------------");
synchronized (completedJobsFromPush) {
completedJobsFromPush.add(new
String(delivery.getBody()));
}
ch.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
> RabbitMQ message not updating status
> ------------------------------------
>
> Key: AIRAVATA-1459
> URL: https://issues.apache.org/jira/browse/AIRAVATA-1459
> Project: Airavata
> Issue Type: Bug
> Components: Airavata Job Monitor, GFac
> Affects Versions: 0.14
> Reporter: Raminderjeet Singh
> Priority: Critical
> Attachments: screenshot-1.png
>
>
> GFAC received the completion status of the job from RabbitMQ but still
> monitor did not terminate the job. Monitor waited for configured time to
> terminate the job. See trace below. I can attach full logs if it will help to
> debug.
> 2014-09-30 15:01:46,632 [Thread-10] INFO
> org.apache.airavata.gfac.monitor.impl.push.amqp.SimpleJobFinishConsumer -
> ---------------- Job Finish message received:us3,1036070603 --------------
> 2014-09-30 15:01:57,564 [Thread-11] INFO
> org.apache.airavata.gsi.ssh.impl.GSISSHAbstractCluster - StandardError
> Returned:
> 2014-09-30 15:01:57,564 [Thread-11] ERROR
> org.apache.airavata.gsi.ssh.api.job.PBSOutputParser - Couldn't find the
> status of the Job with JobName: 1036070603Job Id: 195192.alamo.uthscsa.edu
> 2014-09-30 15:01:57,564 [Thread-11] INFO
> org.apache.airavata.gsi.ssh.api.job.PBSOutputParser - 195193.alamo.uth
> us3 default 384558793 16802 8 -- -- 1500: R 00:00
> 2014-09-30 15:01:57,564 [Thread-11] INFO
> org.apache.airavata.gsi.ssh.api.job.PBSOutputParser - 195194.alamo.uth
> us3 default 1392242814 1367 8 -- -- 1500: R 00:00
> 2014-09-30 15:01:57,565 [Thread-11] INFO
> org.apache.airavata.gsi.ssh.api.job.PBSOutputParser - 195195.alamo.uth
> us3 default 1139492907 6263 8 --
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)