To publish accounting data for a site you need to install a MON box and configure apel.
Following boxes should be configured: MON box, lcg-CE and Torque-server(if on separate box).

MON box configuration:

1. Install Mon box and set the variables in site-info.def file.

MON_HOST=myMON.$MY_DOMAIN
CE_HOST=myCE.$MY_DOMAIN
REG_HOST=pps-rgma-server.egee.cesga.es  (Check according to your site)

2. Set the MYSQL and APEL password in site-info.def file. Don't set the default values!!! e.g

MYSQL_PASSWORD=set_this_to_a_good_password
APEL_DB_PASSWORD="ThisIsNotTheREal"

3. Check the APEL rpms. Install if its not there (CHECK the version of the rpms!!!)

glite-apel-condor-2.0.6-1
glite-apel-pbs-2.0.5-1
glite-apel-sge-2.0.6-1
glite-apel-core-2.0.9-7
glite-apel-publisher-2.0.9-3

4. Run the configuration on MON box and try to connect to the MYSQL database. e.g

mysql> use mysql
mysql> select * from db;
+-----------------------+---------------+------------+-------------+-------------+-------------+-------------+-------------+-----------+------------+--- --------------+------------+------------+-----------------------+------------------+
| Host                  | Db            | User       | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv | Re ferences_priv | Index_priv | Alter_priv | Create_tmp_table_priv | Lock_tables_priv |
+-----------------------+---------------+------------+-------------+-------------+-------------+-------------+-------------+-----------+------------+--- --------------+------------+------------+-----------------------+------------------+

| lxb2006.cern.ch       | accounting    | accounting | Y           | Y           | Y           | Y           | Y           | Y         | N          | Y               | Y          | Y          | Y                     | Y                

+-----------------------+---------------+------------+-------------+-------------+-------------+-------------+-------------+-----------+------------+--- --------------+------------+------------+-----------------------+------------------+

mysql> select * from user;
Note the entry for CE in the user table.

5. Run the publisher as root on MON box.

   env RGMA_HOME=/opt/glite APEL_HOME=/opt/glite /opt/glite/bin/apel-publisher -f /opt/glite/etc/glite-apel-publisher/publisher-config-yaim.xml 2>&1 | tee -a /var/log/apel.log

If you have more then one CE and Torque-server is on separate box. Then you need to give user access to all the CEs and Torque-server to connect to MYSQL database on MON box. It can be done as follows:

mysql --pass="$MYSQL_PASSWORD" --exec "grant all on accounting.* to 'accounting'@'$CE_HOST' identified by '$APEL_DB_PASSWORD'"
For example,
mysql --pass="$MYSQL_PASSWORD" --exec "grant all on accounting.* to 'accounting'@'lxb2006.cern.ch' identified by 'lxb2006acc'"
Replace $CE_HOST by CE name and $APEL_DB_PASSWORD by the password that you will set on CE.

Note: choose different apel passwd for each CE and torque-server( if the server is not on CE).

Run the publisher as root on MON box or wait until cronjob activate.

See the logs at /var/log/apel.log and note the strange errror messages.

CE and Torque-server configuration:

1. Install the apel rpms (if its not there): (CHECK the version of the rpms!!!)

glite-apel-pbs-2.0.5-1
glite-apel-core-2.0.9-7

2. Set the MYSQL and APEL passwd in site-info.def file
MYSQL_PASSWORD=set_this_to_a_good_password >>> it should be the same as on MON box
APEL_DB_PASSWORD="your passwd"

The apel passwd should be different for torque-server if its not on CE.

3. Run the configuration on CE. Try to connect to the MYSQL database to check the access to the database.

mysql -u accounting -h MON_HOST -p

4. There is a cronjob for apel-pbs-parser on CE.
$ ll /etc/cron.d/edg-apel-pbs-parser
-rw-r--r-- 1 root root 215 Feb 11 14:45 /etc/cron.d/edg-apel-pbs-parser

If you want to have a quick look, run the apel-pbs-parser by hand.

env RGMA_HOME=/opt/glite APEL_HOME=/opt/glite /opt/glite/bin/apel-pbs-log-parser -f /opt/glite/etc/glite-apel-pbs/parser-config-yaim.xml >> /var/log/apel.log 2>&1
 

Note for strange error messages in /var/log/apel.log

POSSIBLE ERROR MESSG COULD BE:

                                                                                                                                                     
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at org.glite.apel.pbs.ApelLogParser.<clinit>(ApelLogParser.java:34)
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at org.glite.apel.pbs.ApelLogParser.<clinit>(ApelLogParser.java:34)
  
solution: You need to install package: log4j

                                                                                                                                                       
Mon Feb 11 00:35:02 UTC 2008: apel-pbs-log-parser - program aborted
org.glite.apel.core.ApelException: Unable to setup a database connection: null,  message from server: "Host 'lxb2006.cern.ch' is not allowed to connect to
this MySQL server"
        at org.glite.apel.core.db.MySQLImpl.<init>(MySQLImpl.java:86)
        at org.glite.apel.core.processor.DBProcessor.<init>(DBProcessor.java:29)
        at org.glite.apel.pbs.ApelLogParser.run(ApelLogParser.java:72)
        at org.glite.apel.pbs.ApelLogParser.main(ApelLogParser.java:283)

That might be the apel do not configured correctly and therefore don't have access to the MYSQL database.

solution: You need to run the following command on Mon box:

mysql --pass="$MYSQL_PASSWORD" --exec "grant all on accounting.* to 'accounting'@'lxb2006.cern.ch' identified by 'lxb2006acc';"

where "lxb2006acc" is the APEL_DB_PASSWORD on CE.

If all went fine then wait for at least one/two day to see the publishing data on accounting portal:

http://www3.egee.cesga.es/gridsite/accounting/CESGA/pps_view.html

You can find more details in APEL docs:

https://wiki.egi.eu/wiki/APEL

-- FaridaNaz - 03 Mar 2008

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2012-10-04 - AntonJGamel
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LCG All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback