Project

General

Profile

Actions

Bug #2155

closed

ldv-online client should work forever

Added by Evgeny Novikov over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Urgent
Category:
Infrastructure
Start date:
12/28/2011
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:
435dc6e

Description

At the moment because of some computer or network problems ldvnode loses connection and a ldv-online client dies with:

Logger: INFO: NO tasks...                                                                               
Logger: ERROR: VCLIENT: Can't connect to server. Is it really running?                                  
java.net.ConnectException: Connection timed out                                                         
        at java.net.PlainSocketImpl.socketConnect(Native Method)                                        
        ...                                                    
        at org.linuxtesting.ldv.online.vs.client.VClientProtocol.VSGetTask(VClientProtocol.java:40)     
        at org.linuxtesting.ldv.online.vs.client.VClient.main(VClient.java:31)   

I assume that first of all the ldv-online client should be automatically restarted if it fails (say, we should check it every 5 minutes). Also it shouldn't shut down in case when server becomes unavailable for some time.


Related issues 2 (1 open1 closed)

Related to Linux Driver Verification - Bug #2160: ldv-online client hangs sometimesOpenEvgeny Novikov01/06/2012

Actions
Blocks Linux Driver Verification - Feature #2091: Move ldv-online to a new linuxtesting siteClosedEvgeny Novikov12/12/2011

Actions
Actions #1

Updated by Evgeny Novikov over 12 years ago

  • Status changed from Open to Resolved
  • Published in build set to 435dc6e

Evgeny Novikov wrote:

I assume that first of all the ldv-online client should be automatically restarted if it fails (say, we should check it every 5 minutes).

This was fixed by means of cron script (it checks even every 3 minutes of ldv-online presence):

ldvnode:/home/ldv # crontab -u ldv -l
...
*/3 * * * * /home/ldv/ldv-online-client-restart.pl >> /home/ldv/cron.log 2>&1

(crontab -u ldv -e - to edit this cron script).

ldv/ldv-online-client-restart.pl is so (I put sources here to know about them):

#!/usr/bin/perl
# Check if there is an ldv online client instance running. Restart if no.
if (!`ps aux | grep vsClient.jar | grep -v grep`)
{
  print("ldv-online client died, try to restart it!\n");
  `/home/ldv/ldv-new/ldv-tools-inst/bin/ldv_client`
    or die("Can't run ldv-online client");
  print("ldv-online client is running now!\n");
}
else
{
  print("ldv-online client works!\n");
}

After that cron log is so:
ldvnode:/home/ldv # cat /home/ldv/cron.log
ldv-online client works!
ldv-online client works!
ldv-online client works!
ldv-online client works!
ldv-online client works!
ldv-online client died, try to restart it!
ldv-online client is running now!
ldv-online client died, try to restart it!
ldv-online client is running now!
ldv-online client died, try to restart it!
ldv-online client is running now!
ldv-online client died, try to restart it!
ldv-online client is running now!
ldv-online client died, try to restart it!
ldv-online client is running now!
ldv-online client died, try to restart it!
ldv-online client is running now!
ldv-online client works!
ldv-online client works!

Also it shouldn't shut down in case when server becomes unavailable for some time.

One can see continuous "ldv-online client died, try to restart it!" messages above, in fact this was because of a bug in ldv-online client:

Exception in thread "main" java.lang.NullPointerException                                                           
        at org.linuxtesting.ldv.online.vs.client.VClientProtocol.VSGetTask(VClientProtocol.java:64)                 
        at org.linuxtesting.ldv.online.vs.client.VClient.main(VClient.java:31)

I has fixed it with help of Vadim in commit 435dc6e.

Actions #2

Updated by Evgeny Novikov over 12 years ago

  • Status changed from Resolved to Closed

It really works now forever. I put corresponding scripts into the ldv-meta repository under the directory online.

Actions

Also available in: Atom PDF