E's notes on using DQ2


Warning -- Read this !!

The DQ2 tools and web pages of this document (below) are outdated. I submitted an error report on Savannah and they pointed me to the new web pages (but the old web pages are still active and not updated). I don't understand why the old tools are not disabled, some tools work and others just crash with error messages. I don't understand why the old documentation is not corrected or moved offline.

Links to the latest documentation:

Sections of this web page



Purpose

The issue: I need to get some files from "DQ2". Ayana is putting log files there. Here are her instructions: These instructions are helpful to get started, but I am aparently missing some pieces of the puzzle so they do not work off the bat (not unexpected). I am not at CERN, I am at Oxford. I have not used my Grid certificate... Have to get registered, certified, branded, initiated, ... Here is the process of trial and error and hopefully resolution (I get some files).

Steps to get files from DQ2

There is a lot of information out there on ATLAS and CERN web pages. Problems are redundant information and missing critical steps that more typically apply for users outside of CERN and new users who don't have much working that other users forgot they did). I include a few related links at the bottom of this page where some relevent information was found. No web page I found had anywhere near what I needed to make this work. I was lucky Stefan was here to provide some missing pieces.

-- I am working on pplxgen.physics.ox.ac.uk.
-- I may need AFS file access at CERN (cern.ch token, cvs)

klog -tmp
Password:
Wrote ticket file to /tmp

-- Following the instructions at (similar to Ayana's instructions):
-- https://twiki.cern.ch/twiki/bin/view/Atlas/UsingDQ2

> source /afs/cern.ch/project/gd/LCG-share/sl3/etc/profile.d/grid_env.sh

-- okay I guess, no errors

> voms-proxy-init -voms atlas

Cannot find file or dir: /userdisk3/gallas/.glite/vomses
user certificate not found
        Cert File=/userdisk3/gallas/.globus/usercert.pem
Function: proxy_init_cred

-- From the errors above, 
-- I must need the usercert.pem and vomses file in new directories off my home area.
--
-- The usercert.pem file is some kind of Grid Certificate.
-- I need to find my Grid certificate on my windows machine 
-- (which I have never used ... but I think I got it a few months ago).
-- 
-- I need to make a copy of it on the Linux machine I am working on.
-- Look in my email accounts folder.  
-- I have an email from ca@ca.grid-support.ac.uk
-- which gives details of my CA certificates.
-- 
-- Import it into my Firefox browser by going to the URL:
-- https://ca.grid-support.ac.uk/cgi-bin/pub/pki?cmd=getcert&key=8719&type=CERTIFICATE
-- 
-- Then, in Firefox, 
-- under Tools tab, 
-- click on Options,
-- click on Advanced Options,
-- under Security tab, select View Certificates Button.
-- 
-- Under 'Your Certificates' select the certificate I see: 

- eScienceCA
---- elizabeth gallas .... expires on 24/11/2007

-- Select the 'Backup' button.
-- Create the directory .globus under my login directory.
-- Name the backup file: escience_cert_070118.p12
-- with 'Backup certificate password' / pass##
-- In response, I receive a message that I 
-- 'Successfuly backed up your security certificate(s) and private key(s).'
-- 
-- Great.  what does it mean ?
-- try to run the voms command again.

> voms-proxy-init -voms atlas

Cannot find file or dir: /userdisk3/gallas/.glite/vomses
user certificate not found
        Cert File=/userdisk3/gallas/.globus/usercert.pem
Function: proxy_init_cred

-- Stefan says I need to 'convert the certificate file' (from p12 to pem file):
-- 
-- PK12_FILE="${HOME}/.globus/escience_cert_070118.p12"
-- openssl pkcs12 -nocerts -in ${PK12_FILE} -out ${HOME}/.globus/userkey.pem
-- openssl pkcs12 -nokeys  -clcerts -in ${PK12_FILE} -out ${HOME}/.globus/usercert.pem
-- 

> PK12_FILE="${HOME}/.globus/escience_cert_070118.p12"
> openssl pkcs12 -nocerts -in ${PK12_FILE} -out ${HOME}/.globus/userkey.pem

Enter Import Password:pass##
MAC verified OK
Enter PEM pass phrase:pass##
Verifying password - Enter PEM pass phrase:pass##

> openssl pkcs12 -nokeys -clcerts -in ${PK12_FILE} -out ${HOME}/.globus/usercert.pem

Enter Import Password:pass##

-- okay, so the .globus/userkey.pem file exists now so try this again:
> voms-proxy-init -voms atlas

Cannot find file or dir: /userdisk3/gallas/.glite/vomses
Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
bad file system permissions on private key
    key must only be readable by the user
        File=/userdisk3/gallas/.globus/userkey.pem
Function: proxy_init_cred

-- Stefan says I need to create the .glite/vomses file:
--
-- The vomses file certifies that the user in on the experiment.
--
-- mkdir ${HOME}/.glite
-- cp /afs/cern.ch/project/gd/egee/glite/ui_PPS/glite/etc/vomses .glite/

mkdir ${HOME}/.glite
cp /afs/cern.ch/project/gd/egee/glite/ui_PPS/glite/etc/vomses .glite/

-- okay, so the .glite/vomses file exists now so try this again:

> voms-proxy-init -voms atlas

data format in file: /userdisk3/gallas/.glite/vomses incorrect!
Line: "ops" "lcg-voms.cern.ch" "15009
Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
bad file system permissions on private key
    key must only be readable by the user
        File=/userdisk3/gallas/.globus/userkey.pem
Function: proxy_init_cred


-- all files in .globus should be readable only by me

> cd .globus/
> dir
-rwxrwxrwx    1 gallas   atlas        3182 Jan 18 12:18 escience_cert_070118.p12*
-rw-r--r--    1 gallas   atlas        2182 Jan 18 12:29 usercert.pem
-rw-r--r--    1 gallas   atlas        1926 Jan 18 12:29 userkey.pem
> chmod 400 *.*
> dir
-r--------    1 gallas   atlas        3182 Jan 18 12:18 escience_cert_070118.p12
-r--------    1 gallas   atlas        2182 Jan 18 12:29 usercert.pem
-r--------    1 gallas   atlas        1926 Jan 18 12:29 userkey.pem

-- try again

> voms-proxy-init -voms atlas

data format in file: /userdisk3/gallas/.glite/vomses incorrect!
Line: "ops" "lcg-voms.cern.ch" "15009
Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
Enter GRID pass phrase:

-- xemacs the vomses file:
--   fixing the "ops" line to have a consistent format with the other entries:
-- "ops" "lcg-voms.cern.ch" "15009...
-- try again

>  voms-proxy-init -voms atlas
Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
Enter GRID pass phrase:
Creating temporary proxy .................................... Done
Contacting  lcg-voms.cern.ch:15001 [/C=CH/O=CERN/OU=GRID/CN=host/lcg-voms.cern.ch] "atlas" Failed

Error: atlas: User unknown to this VO.

Trying next server for atlas.
Creating temporary proxy ............................................. Done
Contacting  lcg-voms.cern.ch:15001 [/C=CH/O=CERN/OU=GRID/CN=host/lcg-voms.cern.ch] "atlas" Failed

Error: atlas: User unknown to this VO.

Trying next server for atlas.
Creating temporary proxy ........................................................ Done
Contacting  voms.cern.ch:15001 [/DC=ch/DC=cern/OU=computers/CN=voms.cern.ch] "atlas" Failed

Error: atlas: User unknown to this VO.

Failed to contact servers for atlas.

-- Aparently I am not listed in the VOM for Atlas.
-- Follow a few dead ATLAS documentation links,
-- then I found:
-- http://www.usatlas.bnl.gov/twiki/bin/view/Support/HowToAtlasVO
-- Register through the ATLAS VOMRS (Virtual Organization Management Registration Service)
-- https://lcg-voms.cern.ch:8443/vo/atlas/vomrs?path=/RootNode&action=execute
-- Access to ATLAS grid resources is granted by joining the ATLAS VO
--
-- 1. I am registered with CERN HR
-- 2. I went to https://lcg-voms.cern.ch:8443/vo/atlas/vomrs to become a candidate.  
--    I completed the application for candidate status in the ATLAS VO.
--    Wait for an email.
--    Received email within 10 minutes to go to the next phase (registration phase I)
-- 3. Complete the registration by choosing what 'Group' (and 'Group role') 
--    I think I belong.  Groups and Roles are not described in any way.
-- 
-- Registration (Phase II)
-- You have successfully submitted phase II of ATLAS VO registration!
-- You will receive an email notice from the VOMRS ATLAS Service 
-- indicating that you've been approved (or denied) as a VO member. 
-- This could take up to a few days; it depends on how soon 
-- your representative completes this task. 
-- ...
-- 
-- You are logged in as /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
-- /C=UK/O=eScienceCA/OU=Authority/CN=CA 
-- 
-- The above process took less than 1 day (Jan 18, 2007).  
-- I await an email approving VO membership.
-- 
-- 7pm:
-- I received nearly 50 emails telling me which groups and roles I am
-- assigned or denied.  I have been assigned to the following groups:
-- /atlas/lcg1
-- and 46 denials
-- 

-- try the voms proxy init again...

> voms-proxy-init -voms atlas

Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
Enter GRID pass phrase:
Creating temporary proxy ............................. Done
Contacting  lcg-voms.cern.ch:15001 [/C=CH/O=CERN/OU=GRID/CN=host/lcg-voms.cern.ch] "atlas" Done
Creating proxy ......................................................... Done
Your proxy is valid until Fri Jan 19 07:08:23 2007

-- now continue with the DQ2 stuff

source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN

-- In principle, https://twiki.cern.ch/twiki/bin/view/Atlas/UsingDQ2#2_DQ2_end_user_tools
-- now I can use the following DQ2 end-user tools

    * dq2_get
    * dq2_ls
    * dq2_put
    * dq2_poolFCjobO
    * dq2_register
    * dq2_cleanup
    * dq2_sample 

-- I am going home now


New Day

Let's see if I can get some files today.
> source /afs/cern.ch/project/gd/LCG-share/sl3/etc/profile.d/grid_env.sh

> voms-proxy-init -voms atlas

Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
Enter GRID pass phrase:
Creating temporary proxy ....................................................... Done
Contacting  lcg-voms.cern.ch:15001 [/C=CH/O=CERN/OU=GRID/CN=host/lcg-voms.cern.ch] "atlas" Done
Creating proxy .............................................. Done
Your proxy is valid until Sat Jan 20 03:25:38 2007

> source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN

> dq2_ls -f user.AyanaTamuHolloway.inclJet.test

user.AyanaTamuHolloway.inclJet.test   Total: 148  - Local: 0

dq2_get user.AyanaTamuHolloway.inclJet.test
The following files are not found at CERN.
Use '-r' if you want to copy them over the grid
  streamtest2.inclJet.digit.RDO._00108.pool.root
  streamtest2.inclJet.digit.RDO._00040.pool.root
  streamtest2.inclJet.digit.RDO._00003.pool.root
  streamtest2.inclJet.digit.RDO._00027.pool.root
  streamtest2.inclJet.digit.RDO._00018.pool.root
...
  streamtest2.inclJet.digit.RDO._00074.pool.root
  streamtest2.inclJet.digit.RDO._00060.pool.root
  streamtest2.inclJet.digit.RDO._00128.pool.root
  streamtest2.inclJet.digit.RDO._00145.pool.root
  streamtest2.inclJet.digit.RDO._00042.pool.root
Done
Total:0 - Failed:0

I don't want these files anyway, they are root files.

-- WWW: Use the DQ2 browser now that the port restriction has been lifted
on my Windows machine:
http://panda.atlascomp.org/?overview=dslist&cat=csc&redirect=pandamon
Click on catagory: user  6318 users found
Click on user: AyanaTamuHolloway  15 datasets found
Click on user.AyanaTamuHolloway.streamtest03.mixer.log at  BNLPANDA -
	  290 files found with names like:

Logical file name	Click to check replica at site
streamtest_mixer_00001.log.tgz	BNLPANDA  
streamtest_mixer_00002.log.tgz	BNLPANDA  
streamtest_mixer_00003.log.tgz	BNLPANDA  
streamtest_mixer_00004.log.tgz	BNLPANDA  
streamtest_mixer_00005.log.tgz	BNLPANDA  

-- Okay, get one of these 'files' on disk.
-- See how much space there is on different disks: df -h
-- Ewan says to put them on /var/tmp/
-- Follow https://twiki.cern.ch/twiki/bin/view/Atlas/UsingDQ2#dq2_get

> dq2_get -h

-- get a remote file

> dq2_get -rv streamtest_mixer_00001.log.tgz
http://atlddmpro.cern.ch:8000/dq2/ws_repository/dataset?dsn=streamtest_mixer_00001.log.tgz&version=0
(0, {})
0 {}
ERROR : streamtest_mixer_00001.log.tgz was not found in the DQ2 catalog

-- Write email to Tadashi Maeno .  he wrote back with the solution
-- Now it seems obvious !

dq2_get -rv user.AyanaTamuHolloway.streamtest03.mixer.log streamtest_mixer_00001.log.tgz

-- This was started about 19:30 pm friday night.  
-- An empty file was created Jan 19 20:09 streamtest_mixer_00001.log.tgz
-- So the dq2 get failed.  
-- It produced hundreds of messages on the screen that I do not understand.

DQ2_log1.txt

-- Try to sort through it....
Highlights include messages like:
kill 16742
Timeout
could not finish
retry 0
/afs/.cern.ch/project/gd/LCG-share/3.0.10-1/d-cache/srm/sbin/srm: line 161: /userdisk3/gallas/.srmconfig/config.xml: No such file or directory
mkdir: too few arguments
Try `mkdir --help' for more information.
configuration file not found, configuring srmcp
srm client error: /userdisk3/gallas/.srmconfig/config.xml (No such file or directory)
SRMClientV1 : getRequestStatus: try #0 failed with error
SRMClientV1 : org.dcache.srm.SRMAuthorizationException: user usatlas4 is not found
SRMClientV1 : getRequestStatus: try again

Look in .../Atlas/UsingDQ2#Copy_files_over_the_grid.
Found note to 
I don't have a .srmconfig/config.xml directory or file,
so I will create the directory and file to contain 
<x509_user_trusted_certificates>
/afs/cern.ch/project/gd/LCG-share/certificates
</x509_user_trusted_certificates>
on and try again.


> cd /var/tmp/gallas > source /afs/cern.ch/project/gd/LCG-share/sl3/etc/profile.d/grid_env.sh > voms-proxy-init -voms atlas > source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN > dq2_get -rv user.AyanaTamuHolloway.streamtest03.mixer.log streamtest_mixer_00001.log.tgz cd /var/tmp/gallas source /afs/cern.ch/project/gd/LCG-share/sl3/etc/profile.d/grid_env.sh voms-proxy-init -voms atlas source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN dq2_get -rv user.AyanaTamuHolloway.streamtest03.mixer.log streamtest_mixer_00001.log.tgz -- now I get a seemingly infinite number of of messages like this: -- "bash: unalias: dq2_get: not found" -- Try again. -- Get errors -- "on error, root element "srm-configuration" is not found -- srm client error: null" DQ2_log2.txt -- Less errors this time and did not take 30 minutes, but I still get -- fatal errors an no files appear. -- The most apparent error is: -- Tadashi says to "rm ~/.srmconfig/config.xml" -- because... This is a wrong fix. -- You don't need to create it because you already have X509_CERT_DIR. > rm ~/.srmconfig/config.xml > voms-proxy-init -voms atlas Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas Enter GRID pass phrase: Creating temporary proxy ..................................................... Done Contacting lcg-voms.cern.ch:15001 [/C=CH/O=CERN/OU=GRID/CN=host/lcg-voms.cern.ch] "atlas" Done Creating proxy ................................. Done Your proxy is valid until Mon Jan 22 22:21:51 2007 > dq2_get -rv user.AyanaTamuHolloway.streamtest03.mixer.log streamtest_mixer_00001.log.tgz -- After about an hour, I get fatal errors again (new errors) DQ2_log3.txt


Submit errors to Savannah

I submitted an error report containing the above information in
Savannah.
Then outside of Savannah, the following emails were exchanged:
-------- Original Message --------
Subject: 	RE: [Fwd: [sr #101478] unable to ( use DDM / DQ2 ) dq2_get to get files from BNL to Oxford]
Date: 	Thu, 25 Jan 2007 22:53:46 -0000
From: 	Peter Gronbech 
To: 	Elizabeth Gallas , 
pp_unix_admin ,, 
"Ian McArthur" , 
"Chris Hunter" 

Hi Elizabeth,
I've been having the same problems.
I'm afraid this is part of the ongoing problems I've been having with
copying files to Oxford.
I've been testing copying file from Oxford (which worked well) and
trying to copy files too Oxford (which failed).
 
I am currently investigating why I can get zero bandwidth into Oxford
but 400Mb/s out of Oxford.
 
This is now top priority and I'll let you know as soon as we have some
progress.
Cheers Pete
----------------------------------------------------------------------
Peter Gronbech   Unix Systems Manager and       Tel No. : 01865 273389
              SouthGrid Technical Co-ordinator  Fax No. : 01865 273418

Department of Particle Physics,                         
University of Oxford,                 
Keble Road, Oxford  OX1 3RH, UK  E-mail : p.gronbech1@physics.ox.ac.uk
----------------------------------------------------------------------

-------- Original Message -------- Subject: RE: [Fwd: [sr #101478] unable to ( use DDM / DQ2 ) dq2_get to get files from BNL to Oxford] Date: Fri, 26 Jan 2007 10:05:05 +0000 (GMT) From: Yves Coppens To: Peter Gronbech CC: Elizabeth Gallas , pp_unix_admin , Ian McArthur , Chris Hunter Elizabeth, I can see your certificate DN at Oxford, so this problem can be ruled out. I managed to copy file to the Oxford SE: [yrc@epbf010 yrc]$ lcg-cp --vo dteam file:/home/yrc/testFileCatalog gsiftp://t2se01.physics.ox.ac.uk/dpm/physics.ox.ac.uk/home/dteam/ttttt [yrc@epbf010 yrc]$ dpns-ls -l /dpm/physics.ox.ac.uk/home/dteam/ttttt -rw-rw-r-- 1 24026 2688 922 Jan 26 09:37 /dpm/physics.ox.ac.uk/home/dteam/ttttt My Atlas users have had a lot of problems with DQ2 here. I've attached a file that you could try sourcing instead of the environment files or after. Instead of using DQ2 from CERN or FNAL, you could install it on your UI (which turned out to be the best solution here) instructions (not entirely clear but blame Atlas for this) are on: https://twiki.cern.ch/twiki/bin/view/Atlas/UsingDQ2#Download Let me know how it goes, Yves
On Fri, 26 Jan 2007, Yves Coppens wrote: > Hi Elisabeth, > > I will test the Oxford SE now, but meanwhile could you please tell me how > you set the following environment variables DQ2_USE_SRM and > DQ2_COPY_COMMAND in DQ2? > > Have you tried: > > export DQ2_USE_SRM=False > export DQ2_COPY_COMMAND='lcg-cp -v --vo atlas' > > Thank you, > > Yves



Semi - Success on Oxford PP linux cluster

Note: I am logged into ppslgen.
I downloaded Yves's attached file to my Oxford ~/bin/dq2-env-oxford.sh (inserting the following text): ---- I commented out the final 'exit 0' so I could run it without being logged out (?)
cd /var/tmp/gallas
source ~/bin/dq2-env-oxford.sh

---- I need a certificate...
source /afs/cern.ch/project/gd/LCG-share/current/etc/profile.d/grid_env.sh 
voms-proxy-init --valid 99:59

---- I need some definition of dq2_get
source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN
dq2_get -h

---- get one of Ayana's new datasets rather than the previous test dataset
dq2_get -rv user.AyanaTamuHolloway.streamtest.000000.mixing.digit.log.v12000399 
(previously user.AyanaTamuHolloway.streamtest03.mixer.log)

---- This seems to be working !!!!!!!!!!!!!
---- I get some 'timeout' messages, then retry...
---- As I am watching the directory, I notice there seems to be no order of file retrieval.
---- Started 14-Mar 14:00 (first successful file)
----         14-Mar 15:45 (last successful file)
---- Ended   14-Mar 16:39 (last file date, which failed)

... lots of kill... timeout... retry...
... lots of kill... timeout... retry...
... lots of kill... timeout... retry...
.... then:

Done
Total:300 - Failed:3
   logfile_00132.tgz
   logfile_00225.tgz
   logfile_00257.tgz


---- 
alias dir='ls -xlF'
dir
---- order files by size
dir -sS
---- all files seem normal size except the 3:
   atlas           0 Mar 14 15:06 logfile_00132.tgz
   atlas           0 Mar 14 16:39 logfile_00225.tgz
   atlas           0 Mar 14 15:34 logfile_00257.tgz

---- Try to retrieve the 3 files which failed (0 size)
cd /var/tmp/gallas/streamtest00000/

dq2_get -rv user.AyanaTamuHolloway.streamtest.000000.mixing.digit.log.v12000399 logfile_00132.tgz
---- failed at Oxford and CERN

dq2_get -rv user.AyanaTamuHolloway.streamtest.000000.mixing.digit.log.v12000399 logfile_00225.tgz
---- failed at Oxford 

dq2_get -rv user.AyanaTamuHolloway.streamtest.000000.mixing.digit.log.v12000399 logfile_00257.tgz

---- Here are the types of messages before the final failure:

Okay, so this is declared just as successful at Oxford and CERN (cannot get the same files, so it is not site dependent).
Now, try getting just one file (in fresh window to check what setups really needed, for example is the setup from Yves really needed at Oxford ?).
cd /var/tmp/gallas
mkdir streamtest00003
cd streamtest00003/

source /afs/cern.ch/project/gd/LCG-share/current/etc/profile.d/grid_env.sh
voms-proxy-init --valid 99:59


source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN
dq2_get -h

dq2_get -rv user.AyanaTamuHolloway.streamtest.000003.mixing.digit.log.v12000399 logfile_00900.tgz

Done
Total:1 - Failed:1
   logfile_00900.tgz

---- try again with the setup from Yves Coppens
source ~/bin/dq2-env-oxford.sh
source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN
dq2_get -h

dq2_get -rv user.AyanaTamuHolloway.streamtest.000003.mixing.digit.log.v12000399 logfile_00900.tgz

Done
Total:1 - Failed:0

---- Okay, something in that setup from Yves Coppens is absolutely necessary 
---- before the dq2_user_client/setup.sh.CERN !!!!!!!!!!!!!!!!!!!!!

---- See if I can get another dataset 'streamtest.000008'
mkdir streamtest00008
cd streamtest00008
dq2_get -rv user.AyanaTamuHolloway.streamtest.000008.mixing.digit.log.v12000399


---- See if I can get another dataset 'streamtest.000009'
mkdir streamtest00009
cd streamtest00009
dq2_get -rv user.AyanaTamuHolloway.streamtest.000009.mixing.digit.log.v12000399



Success on lxplus

---- See if I can get dataset user.AyanaTamuHolloway.streamtest03.mixer.log on lxplus into my new scratch0 area today.
ssh gallas@lxplus007.cern.ch

cd
cd scratch0

source /afs/cern.ch/project/gd/LCG-share/current/etc/profile.d/grid_env.sh 
voms-proxy-init --valid 99:59

source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN
dq2_get -rv user.AyanaTamuHolloway.streamtest03.mixer.log

---- yes ! I got all the tgz files ...


---- See if I can get another dataset 'streamtest.000001'
mkdir streamtest00001
cd streamtest00001

source /afs/cern.ch/project/gd/LCG-share/current/etc/profile.d/grid_env.sh
voms-proxy-init --valid 99:59

Cannot find file or dir: /afs/cern.ch/user/g/gallas/.glite/vomses
Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
Enter GRID pass phrase:
Creating proxy ................................ Done
Your proxy is valid until Sun Mar 18 20:32:16 2007

source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN
dq2_get -rv user.AyanaTamuHolloway.streamtest.000001.mixing.digit.log.v12000399

ERROR : No replica location for the dataset. You may be able to copy the dataset
        using 'dq2_get -l', Or dataset registration may be incomplete.
        Submit a report to https://savannah.cern.ch/projects/dq2-ddm-ops/

---- See if I can get another dataset 'streamtest.000002'
mkdir streamtest00002
cd streamtest00002
dq2_get -rv user.AyanaTamuHolloway.streamtest.000002.mixing.digit.log.v12000399

... (timing below)

Total:300 - Failed:0

---- Started 14-Mar 16:40 (first file date/time)
---- Ended   14-Mar 17:27 (last file date/time)

---- There are no abnormally small files.

---- Conclusion: dq2_get faster and more complete on lxplus ? ............

---- See if I can get another dataset 'streamtest.000004'
mkdir streamtest00004
cd streamtest00004
dq2_get -rv user.AyanaTamuHolloway.streamtest.000004.mixing.digit.log.v12000399
Done
Total:299 - Failed:0
[gallas@lxplus202]~/scratch0/streamtest00004% pwd
/afs/cern.ch/user/g/gallas/scratch0/streamtest00004

---- See if I can get another dataset 'streamtest.000005'
mkdir streamtest00005
cd streamtest00005
dq2_get -rv user.AyanaTamuHolloway.streamtest.000005.mixing.digit.log.v12000399

Done
Total:300 - Failed:0

---- See if I can get another dataset 'streamtest.000006'
mkdir streamtest00006
cd streamtest00006
dq2_get -rv user.AyanaTamuHolloway.streamtest.000006.mixing.digit.log.v12000399


---- See if I can get another dataset 'streamtest.000007'
mkdir streamtest00007
cd streamtest00007
dq2_get -rv user.AyanaTamuHolloway.streamtest.000007.mixing.digit.log.v12000399


---- try to retrieve the missing files (20-Mar)

---- setup on lxplus:
source /afs/cern.ch/project/gd/LCG-share/current/etc/profile.d/grid_env.sh
voms-proxy-init --valid 99:59
source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN

---- retrieve on lxplus:
cd ~scratch0/streamtest00001/

dq2_get -rv user.AyanaTamuHolloway.streamtest.000001.mixing.digit.log.v12000399 logfile_00361.tgz
dq2_get -rv user.AyanaTamuHolloway.streamtest.000001.mixing.digit.log.v12000399 logfile_00446.tgz
dq2_get -rv user.AyanaTamuHolloway.streamtest.000001.mixing.digit.log.v12000399 logfile_00481.tgz
dq2_get -rv user.AyanaTamuHolloway.streamtest.000001.mixing.digit.log.v12000399 logfile_00566.tgz
dq2_get -rv user.AyanaTamuHolloway.streamtest.000001.mixing.digit.log.v12000399 logfile_00588.tgz

---- setup on oxford:
source /afs/cern.ch/project/gd/LCG-share/current/etc/profile.d/grid_env.sh
source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN
voms-proxy-init --valid 99:59

cd /var/tmp/gallas/streamtest00000
dq2_get -rv user.AyanaTamuHolloway.streamtest.000000.mixing.digit.log.v12000399 logfile_00132.tgz
dq2_get -rv user.AyanaTamuHolloway.streamtest.000000.mixing.digit.log.v12000399 logfile_00225.tgz
dq2_get -rv user.AyanaTamuHolloway.streamtest.000000.mixing.digit.log.v12000399 logfile_00257.tgz

cd /var/tmp/gallas/streamtest00009
dq2_get -rv user.AyanaTamuHolloway.streamtest.000009.mixing.digit.log.v12000399 logfile_02997.tgz



Get DQ2 dataset summary

Notes:
dataset names: user.AyanaTamuHolloway.streamtest.******.mixing.digit.log.v12000399
Files are retrieved in a seemingly arbitrary order.
dataset on disk first/last file data/time
dir -rlt
first/last file numbers
dir
smallest/largest file size
dir -sS
#File / #Failed Errors
000000 /var/tmp/gallas/streamtest00000 14-Mar 14:00-15:45
16:39 (last failure)
00000 - 00299 64939 - 107371 Total:300 - Failed:3 logfile_00(132,225,257).tgz
DQ2 get failure
00001 ERROR on dataset streamtest00001: logfile_00300 - 00599.tgz. No replica location for the dataset. You may be able to copy the dataset using 'dq2_get -l', Or dataset registration may be incomplete. Submit a report to https://savannah.cern.ch/projects/dq2-ddm-ops/
Submitted bug report to Savannah
Resolved. See next entry.
00001 /afs/cern.ch/user/g/gallas/scratch0/streamtest00001 Mar 16 15:12-20:14 00300 - 00599 69k - 105k Total 300 - Empty 5 logfile_00(361,446,481,566,588).tgz
resolved Mar 20 11:41 - 11:46
00002 /afs/cern.ch/user/g/gallas/scratch0/streamtest00002 Mar 14 16:40 - 17:27 00600 - 00899 67061 - 107153 Total:300 - Failed:0 Complete
00003 /var/tmp/gallas/streamtest00003/ Mar 14 17:48- 19:32 00900 - 01199 60124 - 106744 Total:300 - Failed:0 Complete
00004 /afs/cern.ch/user/g/gallas/scratch0/streamtest00004 Mar 14 19:11 - 20:19 01200 - 01499 69568 - 108037 Total:299 - Failed:0 logfile_01302.tgz
missing from DQ2
00005 /afs/cern.ch/user/g/gallas/scratch0/streamtest00005 Mar 15 17:28 - 18:17 01500 - 01799 64702 - 107466 Total:300 - Failed:0 Complete
00006 /afs/cern.ch/user/g/gallas/scratch0/streamtest00006 Mar 15 17:52 - 18:46 01800 - 02099 66677 - 106656 Total:299 - Failed:0 logfile_1823.tgz
missing from DQ2
00007 /afs/cern.ch/user/g/gallas/scratch0/streamtest00007 Mar 15 18:28 - 19:25 02100 - 02399 77970 - 92587 Total:299 - Failed:0 logfile_02312.tgz
missing from DQ2
00008 /var/tmp/gallas/streamtest00008 Mar 15 19:40 - 20:52 02400 - 02699 65448 - 107174 Total:300 - Failed:0 Complete
00009 /var/tmp/gallas/streamtest00009 Mar 15 16:54 - 18:42 02700 - 02999 64732 - 106960 Total:299 - Failed:1 logfile_02997.tgz
resolved Mar 20 11:41 - 11:46

logfile_02721.tgz
missing from DQ2

Notes: About the files logfile_0(1302, 1823, 2312, 2712).tgz missing from DQ2: Ayana says

-- files, directories and disk space

---- on lxplus:

[gallas@lxplus211]~/scratch0% du -sk ./* | sort -nr
28884   ./streamtest00004
27921   ./streamtest00001
27534   ./streamtest03_mixer
27346   ./streamtest00002
27149   ./streamtest00006
26887   ./streamtest00005
25967   ./streamtest00007
2455    ./LDB_reduce_logs_streamtest_00008.out
2455    ./LDB_reduce_logs_streamtest_00005.out
2455    ./LDB_reduce_logs_streamtest_00003.out
2455    ./LDB_reduce_logs_streamtest_00002.out
2455    ./LDB_reduce_logs_streamtest_00001.out
2447    ./LDB_reduce_logs_streamtest_00009.out
2447    ./LDB_reduce_logs_streamtest_00007.out
2447    ./LDB_reduce_logs_streamtest_00006.out
2447    ./LDB_reduce_logs_streamtest_00004.out
2430    ./LDB_reduce_logs_streamtest_00000.out
3       ./LDB_reduce_logs_streamtest_00000.log
1       ./LDB_reduce_logs_streamtest_00009.log
1       ./LDB_reduce_logs_streamtest_00008.log
1       ./LDB_reduce_logs_streamtest_00007.log
1       ./LDB_reduce_logs_streamtest_00006.log
1       ./LDB_reduce_logs_streamtest_00005.log
1       ./LDB_reduce_logs_streamtest_00004.log
1       ./LDB_reduce_logs_streamtest_00003.log
1       ./LDB_reduce_logs_streamtest_00002.log
1       ./LDB_reduce_logs_streamtest_00001.log

[gallas@lxplus211]~/scratch0% du -sk
198471

---- on ppslgen

cd /var/tmp/gallas/

du -sk
117416  .

du -sk ./* | sort -nr
30512   ./streamtest00000
29116   ./streamtest00008
28940   ./streamtest00003
28836   ./streamtest00009

cd ~/cvsarea/offline/Database/RunLumi/RunLumiPrototype/python/
du -sk ./LDB_reduce_logs* | sort -nr

2460    ./LDB_reduce_logs_streamtest_00008.out
2460    ./LDB_reduce_logs_streamtest_00005.out
2460    ./LDB_reduce_logs_streamtest_00003.out
2460    ./LDB_reduce_logs_streamtest_00002.out
2460    ./LDB_reduce_logs_streamtest_00001.out
2452    ./LDB_reduce_logs_streamtest_00009.out
2452    ./LDB_reduce_logs_streamtest_00007.out
2452    ./LDB_reduce_logs_streamtest_00006.out
2452    ./LDB_reduce_logs_streamtest_00004.out
2436    ./LDB_reduce_logs_streamtest_00000.out
24      ./LDB_reduce_logs.py
4       ./LDB_reduce_logs_streamtest_00009.log
4       ./LDB_reduce_logs_streamtest_00008.log
4       ./LDB_reduce_logs_streamtest_00007.log
4       ./LDB_reduce_logs_streamtest_00006.log
4       ./LDB_reduce_logs_streamtest_00005.log
4       ./LDB_reduce_logs_streamtest_00004.log
4       ./LDB_reduce_logs_streamtest_00003.log
4       ./LDB_reduce_logs_streamtest_00002.log
4       ./LDB_reduce_logs_streamtest_00001.log
4       ./LDB_reduce_logs_streamtest_00000.log


ls -1 streamtest00000/ | wc -l
    300
ls -1 streamtest00001/ | wc -l
    300
ls -1 streamtest00003/ | wc -l
    300
ls -1 streamtest00008/ | wc -l
    300
ls -1 streamtest00009/ | wc -l
    299

---- Look at one file
tar -zxf logfile_00599.tgz




Getting grid/voms proxy information

At Oxford:


Forgot my pass phrase - August 2008

-- move files from my lxplus .globus/ directory to .globus_old/
-- look at directory contents
dir .globus*

	.globus:
	total 0

	.globus_old:
	total 13
	-r--------  1 gallas zp 3182 Jan 30  2007 escience_cert_070118.p12
	-r--------  1 gallas zp 3182 Jan 30  2007 MyKeys.p12
	-r--r--r--  1 gallas zp 2182 Jan 30  2007 usercert.pem
	-r--------  1 gallas zp 1926 Jan 30  2007 userkey.pem

-- extract certificate from my browser,
-- put on lxplus in .globus/
cd
dir .globus*

	.globus:
	total 4
	-rw-r--r--  1 gallas zp 3182 Jun 27 17:43 cert_file1.p12
	
-- 'Convert the certificate file' (from p12 to pem file) / _cert1:
PK12_FILE="${HOME}/.globus/cert_file1.p12"
openssl pkcs12 -nocerts -in ${PK12_FILE} -out ${HOME}/.globus/userkey.pem

	Enter Import Password:
	MAC verified OK
	Enter PEM pass phrase:
	Verifying password - Enter PEM pass phrase:

-- okay, so the .globus/userkey.pem file exists now
dir .globus*

	.globus:
	total 6
	-rw-r--r--  1 gallas zp 3182 Jun 27 17:43 cert_file1.p12
	-rw-r--r--  1 gallas zp 1926 Aug  4 14:40 userkey.pem

-- create the usercert.pem file
openssl pkcs12 -nokeys -clcerts -in ${PK12_FILE} -out ${HOME}/.globus/usercert.pem

dir .globus*

	.globus:
	total 9
	-rw-r--r--  1 gallas zp 3182 Jun 27 17:43 cert_file1.p12
	-rw-r--r--  1 gallas zp 2182 Aug  4 14:42 usercert.pem
	-rw-r--r--  1 gallas zp 1926 Aug  4 14:40 userkey.pem

-- need the .glite/vomses file:
cd
mkdir ${HOME}/.glite
cp -r /afs/cern.ch/project/gd/egee/glite/ui_PPS/glite/etc/vomses .glite/
dir ../.glite/vomses/

	total 15
	-rw-r--r--  1 gallas zp  93 Aug  4 16:14 alice-lcg-voms.cern.ch
	-rw-r--r--  1 gallas zp  85 Aug  4 16:14 alice-voms.cern.ch
	-rw-r--r--  1 gallas zp  93 Aug  4 16:14 atlas-lcg-voms.cern.ch
	-rw-r--r--  1 gallas zp  85 Aug  4 16:14 atlas-voms.cern.ch
	-rw-r--r--  1 gallas zp 113 Aug  4 16:14 biomed-cclcgvomsli01.in2p3.fr
	-rw-r--r--  1 gallas zp  89 Aug  4 16:14 cms-lcg-voms.cern.ch
	-rw-r--r--  1 gallas zp  81 Aug  4 16:14 cms-voms.cern.ch
	-rw-r--r--  1 gallas zp 117 Aug  4 16:14 diligent-cert-voms-01.cnaf.infn.it
	-rw-r--r--  1 gallas zp  93 Aug  4 16:14 dteam-lcg-voms.cern.ch
	-rw-r--r--  1 gallas zp  85 Aug  4 16:14 dteam-voms.cern.ch
	-rw-r--r--  1 gallas zp  91 Aug  4 16:14 lhcb-lcg-voms.cern.ch
	-rw-r--r--  1 gallas zp  83 Aug  4 16:14 lhcb-voms.cern.ch
	-rw-r--r--  1 gallas zp  89 Aug  4 16:14 ops-lcg-voms.cern.ch
	-rw-r--r--  1 gallas zp  81 Aug  4 16:14 ops-voms.cern.ch
	-rw-r--r--  1 gallas zp 113 Aug  4 16:14 switch-cert-voms-01.cnaf.infn.it

-- try this again:
voms-proxy-init -voms atlas

	ERROR: Couldn't find valid credentials to generate a proxy.
	Use --debug for further information.

-- try this again (with the debug arg):
voms-proxy-init -voms atlas --debug

	Detected Globus version: 22
	Unspecified proxy version, settling on Globus version: 2
	Number of bits in key :512
	Using configuration file /afs/cern.ch/user/g/gallas/.glite/vomses
	Using configuration file /afs/cern.ch/project/gd/LCG-share/3.0.24-1/glite/etc/vomses

	ERROR: Couldn't find valid credentials to generate a proxy.
	Use --debug for further information.
	Wrong permissions on file: /afs/cern.ch/user/g/gallas/.globus/userkey.pem

-- all files in .globus should be readable only by me
cd .globus/
	[lxplus224] /afs/cern.ch/user/g/gallas/.globus > dir
	total 9
	-rw-r--r--  1 gallas zp 3182 Jun 27 17:43 cert_file1.p12
	-rw-r--r--  1 gallas zp 2182 Aug  4 14:42 usercert.pem
	-rw-r--r--  1 gallas zp 1926 Aug  4 14:40 userkey.pem

chmod 400 *.*
dir

	total 9
	-r--------  1 gallas zp 3182 Jun 27 17:43 cert_file1.p12
	-r--------  1 gallas zp 2182 Aug  4 14:42 usercert.pem
	-r--------  1 gallas zp 1926 Aug  4 14:40 userkey.pem

-- try again
voms-proxy-init -voms atlas

	Enter GRID pass phrase:
	Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
	Cannot find file or dir: /afs/cern.ch/user/g/gallas/.glite/vomses
	Creating temporary proxy ................................ Done
	Contacting  voms.cern.ch:15001 [/DC=ch/DC=cern/OU=computers/CN=voms.cern.ch] "atlas" Failed

	Error: Could not establish authenticated connection with the server.
	    globus_gss_assist token :-1: read failure: unknown

	Trying next server for atlas.
	Creating temporary proxy ................................................................ Done
	Contacting  lcg-voms.cern.ch:15001 [/DC=ch/DC=cern/OU=computers/CN=lcg-voms.cern.ch] "atlas" Failed

	Error: Could not establish authenticated connection with the server.
	    globus_gss_assist token :-1: read failure: unknown

	None of the contacted servers for atlas were capable
	of returning a valid AC for the user.

-- maybe I am not in the atlas VO
-- look at www
http://www.usatlas.bnl.gov/twiki/bin/view/Support/HowToAtlasVO

 cp /afs/cern.ch/project/gd/egee/glite/ui_PPS/glite/etc/vomses/atlas-* .glite/
[lxplus224] /afs/cern.ch/user/g/gallas > dir .glite/
total 2
-rw-r--r--  1 gallas zp 93 Aug  4 15:10 atlas-lcg-voms.cern.ch
-rw-r--r--  1 gallas zp 85 Aug  4 15:10 atlas-voms.cern.ch

-- I wrote an email to John Hover because I could also not connect to:
https://lcg-voms.cern.ch:8443/vo/atlas/vomrs

-- but in the meantime, 
-- I exported new pem files I had gotten in email 
--    Subject "New rollover certificates for download"
--    Date:    Wed, 23 Jul 2008 10:19:19 +0100
-- one new pem file to my browser and the other pem file .globus area
--   (save as file, secure file transfer to lxplus)

dir .globus

	total 10
	-r--------  1 gallas zp 3182 Jun 27 17:43 cert_file1.p12
	-rw-r--r--  1 gallas zp 1785 Aug  4 15:46 PEM_format_5428.pem
	-rw-r--r--  1 gallas zp 1785 Aug  4 15:46 usercert.pem
	-r--------  1 gallas zp 1926 Aug  4 14:40 userkey.pem

-- try again...
voms-proxy-init -voms atlas
        
        Enter GRID pass phrase:
        Your identity: /C=UK/O=eScience/OU=Oxford/L=OeSC/CN=elizabeth gallas
        Creating temporary proxy ........................................................................................ Done
        Contacting  lcg-voms.cern.ch:15001 [/DC=ch/DC=cern/OU=computers/CN=lcg-voms.cern.ch] "atlas" Done
        Creating proxy ................................................. Done
        Your proxy is valid until Tue Aug  5 04:14:52 2008


Getting DQ2 data - August 2008

source /afs/cern.ch/project/gd/LCG-share/sl3/etc/profile.d/grid_env.sh

voms-proxy-init -voms atlas

source /afs/usatlas.bnl.gov/Grid/Don-Quijote/dq2_user_client/setup.sh.CERN

dq2_get -h

    NAME
        dq2_get - provide access to DQ2 datasets 
    SYNOPSIS
        dq2_get [ -h | --help]
                [ -v | --verbose ]
                [ -n | --nfiles ]
                [ -r | --remote ]
                [ -a | --all ]
                [ -g | --gsiftp ]
                [ -c | --choose ]
                [ -p | --parallel n ]                
                [ -t | --timeout n ]                
                [ -d | --destination destination ]
                [ -s | --source sourceSite ]
                [ --srmstreams n ]
                [ --nskipfiles n ]
                datasetname
                [lfn1 [lfn2 [...]]]
    DESCRIPTION
        For datasets already present on a local storage element (SE) data is
        copied to the local directory or to another directory in the SE.
    OPTIONS
        -h | --help             Print this message
        -v | --verbose          Verbosity
        -n | --nfiles           Copy N files
        -r | --remote           Copy files over the grid if files are not found in the local SE
        -a | --all              Scan all remote sites to find replicas
        -g | --gsiftp           Use GSIFTP for 3rd-party transfers
        -c | --choose           Choose appropriate site automatically when copy files over the grid
        -p | --parallel         Number of copy threads (default:3)
        -t | --timeout          Timeout limit in second for each file transfer (default:1800)
        -d | --destination      Directory in the storage element where files will be put.
                                Files will be copied to local directory, if omitted.
        -s | --source           Specify source site from which files get copied
        --srmstreams            Number of SRM streams (default:1)
        --nskipfiles            Skip first n files

dq2_ls -f fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10


    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10   Total: 10  - Local: 10

    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0001.1
    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0002.1
    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0003.1
    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0004.1
    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0005.1
    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0006.1
    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0007.1
    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0008.1
    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0009.1
    fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0010.1

cd /tmp/gallas
dq2_get --nfiles=2 fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10

dq2_get -rv fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10 fdr08_run2.0052290.physics_Muon.merge.AOD.o3_f8_m10._0001.1

Fatal errors running dq2_get !!! dq2_get is outdated !!!
Use the new DDM / DQ2 documentation:


Using DQ2 - May 2009



Miscellaneous related links

GRID.commands.html Someone else's collection of GRID commands
ATLAS Computing TWiki Can't find DQ2 here but this page gives links to other pages which have information on accessing DQ2.
/Atlas/DDM The new DDM software is named DQ2. Great.
/Atlas/UsingDQ2 UsingDQ2
/Atlas/AthenaUsingDQ2 AthenaUsingDQ2
... join the ATLAS VO (Virtual Organization)
ATLAS VO Registration Home
VOM Help ???
Natnl Grid Serv Cert Auth website
DQ2 data set browser ??? -- this might work as long as your Windows administrator has not blocked the port number for the server which this connects to
AMI dataset search interface
LHC Computing Grid web page.
ATLAS VO Registration Service


Miscellaneous unrelated but useful links

ATLAS Workbook Account setup


Elizabeth Gallas (ATLAS)
Last modified: Wed Nov 23 13:11:27 GMT 2011