Project

General

Profile

PBS job not running through web

Added by Jian Shi about 11 years ago

Hi Anchi and Sargis,

My Torques seems working fine. My two test script create correct file and output with qsub.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
[cbis@LeginonCBIS tmp]$ more test.job
#PBS -S /bin/tcsh
#PBS -N TestJob
#PBS -m abe
#PBS -q batch

date > /mnt/cbis_home/jianshi/leginonData/tmp/test.out
sleep 30
date >>/mnt/cbis_home/jianshi/leginonData/tmp/test.out
echo hello >>/mnt/cbis_home/jianshi/leginonData/tmp/test.out
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
[cbis@LeginonCBIS tmp]$ more appionsub.job
#!/bin/tcsh
#PBS -l walltime=2:00:00
#PBS -l nodes=1:ppn=1
#PBS -m abe
#PBS -j oe
#PBS -q batch

#updateAppionDB.py 0 R 1
webcaller.py 'uploadTemplate.py --template=/mnt/cbis_home/jianshi/leginonData/src/AppionSample/align23-average0-10may19r30.mrc
--session=13sep13b --apix=2 --diam=200 --description=command --commit --rundir=/mnt/cbis_home/jianshi/leginonData/tmp --runna
me=template --projectid=1 --expid=119 ' /mnt/cbis_home/jianshi/leginonData/tmp/appionsub.log
#updateAppionDB.py 0 D 1
#echo "test appion" > /mnt/cbis_home/jianshi/leginonData/tmp/appionsub.log
exit
[cbis@LeginonCBIS tmp]$
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

But when I try submit same job through web, I got the following error as attache photo

In fact, I am very confused about where to put .appion.cfg following the wiki. I put it under /usr/lib/python2.6 and content as follows:
[cbis@LeginonCBIS python2.6]$ pwd
/usr/lib/python2.6
[cbis@LeginonCBIS python2.6]$ more .
./ ../ .appion.cfg
[cbis@LeginonCBIS python2.6]$ more .appion.cfg
ProcessingHostType=Torque
Shell=/bin/tcsh
ScriptPrefix=
ExecCommand=/usr/bin/qsub
StatusCommand=/usr/bin/qstat
AdditionalHeaders= -m e, -j oe
PreExecuteLines=
[cbis@LeginonCBIS python2.6]$

Anything am I missing? Thank you very much for your help. I very like to have appion running before you visit Singapore.

Best Regards,
Jian


Replies (9)

RE: PBS job not running through web - Added by Sargis Dallakyan about 11 years ago

Hi Jian,

Please move .appion.cfg to /usr/lib/python26/site-packages. I have updated http://emg.nysbc.org/projects/appion/wiki/Configure_appioncfg following recent Anchi's update.

Also check /var/log/secure on the processing server to see if your user was able to successfully log from the web server.

Best Regards,
Sargis

RE: PBS job not running through web - Added by Jian Shi about 11 years ago

Hi Sargis,

I moved the .appion.cfg, but web-job submission still not working.

I notice the websubmission create the folder and pbs script (sometime), but the job didn't run. However I directly qsub the exact job file, it finishes successfully.
#!/bin/tcsh
#PBS -l walltime=240:00:00
#PBS -l nodes=1:ppn=1
#PBS -m e
#PBS -j oe

updateAppionDB.py 38 R 1
webcaller.py 'uploadTemplate.py --template=/home/leginonData/tmp/groEL_temp.
mrc --session=13sep13a --apix=1 --diam=200 --description=webtest --commit --
rundir=/home/leginonData/tmp/13sep13a/templates/template13oct29m46 --runname
=template13oct29m46 --projectid=1 --expid=118 ' /home/leginonData/tmp/13sep1
3a/templates/template13oct29m46/template13oct29m46.appionsub.log
updateAppionDB.py 38 D 1
exit
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I attached the secure file on the processing server (172.18.140.103), I don't know how to read it though. Seems to it worked. But I notice that I actually can input anything in Appion login GUI to login.

Thanks,
Jian

secure (60.1 KB) secure

RE: PBS job not running through web - Added by Jian Shi about 11 years ago

More test, I was able to run following php script on browser to processing server and get successful connection and correct result (either rsa key or user password). Now I don't understand why I can't submit appion pbs job at all. This morning at least the output directory was created and pbs script was created by web submission, I can submit that script right away in terminal and have successful returns. This afternoon I don't see the script any more. Sorry I was carried away and can't remember what I did in the afternoon.

[root@LeginonCBIS html]# more sshkey.php

$connection = ssh2_connect('juno', 22, array('hostkey'=>'ssh-rsa'));

if (ssh2_auth_pubkey_file($connection, 'cbis',
'/home/cbis/.ssh/id_rsa.pub',
'/home/cbis/.ssh/id_rsa', '')) {
echo "Public Key Authentication Successful\n";
} else {
die('Public Key Authentication Failed');
}
$stream = ssh2_exec($connection, 'df /home/leginonData/tmp/13sep13a');
stream_set_blocking($stream, true);
echo stream_get_contents($stream);
?>
++++++++++++++++++++++

Authentication Successful! Filesystem 1K-blocks Used Available Use% Mounted on leginoncbis:/home/leginonData 1862679552 211274752 1556786176 12% /home/leginonData

RE: PBS job not running through web - Added by Jian Shi about 11 years ago

Hi I read processing/inc/cluster.inc and am confused with the variable username or loginUsername. All the authentication process use username, but the private variable is named loginUserName. And more, does the uppercase matters in function name, one is getUsername and the other place is getUserName.

private $loginUserName;   //Username for shared logins
$this->loginUsername    = $hostconfig['loginusername'];
function getUsername()          { return $this->loginUsername; }
function setUsername($userName)
{
$this->username = $userName;
}
$user = $this->getUserName();

RE: PBS job not running through web - Added by Sargis Dallakyan about 11 years ago

Hi Jian,

Thanks for the updates. I can see from the attached secure file that you are able to login to processing server from the web server. You are correct, you can input anything in Appion login GUI to login; the way this function is implemented currently, it doesn't authenticate you until you submit a job.

Please copy the command it tries to execute from the webbrowser (runJob.py ...) and run it on processing server to see if you get any error messages.

Sargis

RE: PBS job not running through web - Added by Jian Shi about 11 years ago

Hi Sargis,

I copied and ran runJob.py in terminal, it ask the .appion.cfg at /usr/lib/python2.6 instead. After I copy it over, following command actually finished successfully. However the websubmission still failed.

runJob.py uploadTemplate.py --template="/home/leginonData/tmp/groEL_temp.mrc" --session=13sep13a --apix=1 --diam=300 --description="webrun" --commit --rundir=/home/leginonData/tmp/13sep13a/templates/template13oct30e52 --runname=template13oct30e52 --projectid=1 --expid=118 --jobtype=uploadtemplate --ppn=1 --nodes=1 --walltime=240 --jobid=51

Thanks,
Jian

RE: PBS job not running through web - Added by Sargis Dallakyan about 11 years ago

Hi Jian,

We are able to troubleshoot this with Anchi. The problem was that in /var/www/html/myamiweb/config.php PROCESSING_HOST host was set to a PBS work node instead of the head node. It tried to run qsub on a PBS work node that had no pbs_server running and qsub wasn't working there. We have changed PROCESSING_HOST to be leginoncbis where you have running pbs_server. We also change 'loginmethod' => 'SHAREDKEY' to 'loginmethod' => 'USERPASSWORD' in /var/www/html/myamiweb/config.php since you are using username and password to login to processing host (leginoncbis).

After these changes, we were able to run uploadTemplate.py job:

[cbis@LeginonCBIS template13oct31b49]$ more /home/leginonData/tmp/13sep13a/templates/template13oct31b49/uploadTemplate.log
[ cbis@juno: Thu Oct 31 01:59:14 2013 ]
/usr/local/bin/appion/uploadTemplate.py \
  --template=/home/leginonData/tmp/groEL_temp.mrc --session=13sep13a \
  --apix=1 --diam=300 --description=test --commit \
  --rundir=/home/leginonData/tmp/13sep13a/templates/template13oct31b49 \
  --runname=template13oct31b49 --projectid=1 --expid=118 
[Thu Oct 31 01:59:16 2013]
finished run of uploadTemplate

RE: PBS job not running through web - Added by Jian Shi about 11 years ago

Thank you guys so much. It is my shame to misunderstand the instruction. I learnt a lot though the debugging process though. Thanks again and have a good day.

RE: PBS job not running through web - Added by Sargis Dallakyan about 11 years ago

You are welcome. I now understand that it's a bit confusing since PROCESSING_HOST host doesn't do any processing, but runs pbs_sched and pbs_server instead.

    (1-9/9)