Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Code Block
[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ ant -f build-sqlma.xml build-sqlma
Buildfile: build-sqlma.xml

build-sqlma:

clean-all:

clean-jar-generic:

compile-generic:
    [javac] Compiling 242 source files to \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/build
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

jar-generic:
      [jar] Building jar: \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/build/perfSONAR-generic.jar

clean-jar-sqlma:

compile-sqlma:

compile-rrdma:
    [javac] Compiling 28 source files to \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/build
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
     [copy] Copying 2 files to \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/build/org/perfsonar/service/web/wsdd

jar-sqlma:

clean-jar-rrdma:

compile-rrdma:

jar-rrdma:
      [jar] Building jar: \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/build/perfSONAR-rrdma.jar
     [copy] Copying 1 file to \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/build

BUILD SUCCESSFUL
Total time: 14 seconds

Yippee!

SQL-MA Deployment

Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ ant -f build-sqlma.xml deploy-sqlma
Buildfile: build-sqlma.xml

does-jar-generic-exist:

copy-generic-jar:
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib

copy-jars-for-service:
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib

copy-jars-for-sqlma:
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib
     [copy] Copying 6 files to /opt/axis/current/WEB-INF/classes
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/classes
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/classes

does-jar-sqlma-exist:

copy-sqlma-jar:
     [copy] Copying 1 file to /opt/axis/current/WEB-INF/lib

     [echo] ------------------------------ WARNING ---------------------------

     [echo] Restart your application server (container of perfSONAR service)!!!

     [echo] ------------------------------------------------------------------

deploy-sqlma:
     [java] Processing file ../build/org/perfsonar/service/web/wsdd/ma-service-deploy.wsdd
     [java] <Admin>Done processing</Admin>

BUILD SUCCESSFUL
Total time: 7 seconds

Restarted Tomcat (as root as it's running on port 80):

Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ \
sudo /opt/tomcat/current/bin/catalina.sh stop
Using CATALINA_BASE:   /opt/tomcat/current
Using CATALINA_HOME:   /opt/tomcat/current
Using CATALINA_TMPDIR: /opt/tomcat/current/temp
Using JRE_HOME:       /usr/local/java/current
[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ \
sudo /opt/tomcat/current/bin/catalina.sh start
Using CATALINA_BASE:   /opt/tomcat/current
Using CATALINA_HOME:   /opt/tomcat/current
Using CATALINA_TMPDIR: /opt/tomcat/current/temp
Using JRE_HOME:       /usr/local/java/current
[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ 

Looking at the Axis List page gives

Image Added Image Added

SQL-MA Testing

Runnging a simple test results in failure:

Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$  ant -f build-sqlma.xml run-mysql-sqlma-test1
Buildfile: build-sqlma.xml

run-mysql-sqlma-test1:

BUILD FAILED
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/ant/sqlma/sqlma-test-run-targets.xml:28:\
 java.sql.SQLException: Access denied for user 'perfsonar_ma'@'localhost' (using password: YES)

Total time: 3 seconds

Added a link to the mysql socket through /tmp - i should actually hardcode the configs to point to the appropiate file.

ln -sf /var/lib/mysql/mysql.sock /tmp/mysql.sock

Running the thing through mysql results in the same error - suggesting a database configuration error:

Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11 to server version: 5.0.24-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use perfsonar_ma
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'perfsonar_ma'
mysql> 

Appears to the a permissions problem alright:

Code Block

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from user;
mysql> select User,Password,Host from user;
+--------------+------------------+-----------------------------+
| User         | Password         | Host                        |
+--------------+------------------+-----------------------------+
| root         | 6229567449acabd4 | localhost                   | 
| root         | 6229567449acabd4 | net-desk1.slac.stanford.edu | 
|              |                  | net-desk1.slac.stanford.edu | 
|              |                  | localhost                   | 
| perfsonar_ma | 7dcda0d57290b453 | %                           | 
+--------------+------------------+-----------------------------+
5 rows in set (0.03 sec)

So GRANTed the permissions by using

Code Block

mysql> GRANT
    -> SELECT, INSERT, UPDATE, DELETE on
    -> perfsonar_ma.* TO 'perfsonar_ma'@'net-desk1.slac.stanford.edu'
    -> IDENTIFIED BY 'testpass';
Query OK, 0 rows affected (0.04 sec)

mysql> GRANT    -> SELECT, INSERT, UPDATE, DELETE on
    -> perfsonar_ma.* TO 'perfsonar_ma'@'localhost'
    -> IDENTIFIED BY 'testpass';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Now i can log onto the database as the perfsonar_ma user:

Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ \
mysql -u perfsonar_ma -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16 to server version: 5.0.24-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use perfsonar_ma
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------------+
| Tables_in_perfsonar_ma |
+------------------------+
| domain_link            | 
| interdomain_link       | 
| perfsonar_utilization  | 
+------------------------+
3 rows in set (0.00 sec)

So back to running the tests:

Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$  \
ant -f build-sqlma.xml run-mysql-sqlma-test1
Buildfile: build-sqlma.xml

run-mysql-sqlma-test1:
      [sql] Executing commands

      [sql] 5.0.24-standard

      [sql] 0 rows affected
      [sql] 1 of 1 SQL statements executed successfully

BUILD SUCCESSFUL
Total time: 3 seconds

Seems okay (smile)

However, running the requests for keys and data doesn't seem to work... noticed the NULL documents.

Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ \
ant -f build-sqlma.xml run-sqlma-client-key-L2status-1
Buildfile: build-sqlma.xml

run-sqlma-client-key-L2status-1:
     [java] End point: http://net-desk1.slac.stanford.edu:80/axis/services/MeasurementArchiveService
     [java] Request file: \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/schema/example-instances/sonar/\
MetadataKey-L2status-Req-1.xml
     [java] Response file: \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/schema/example-instances/sonar/\
response.xml
     [java] [#document: null]
     [java] time taken :4.407 secs
     [java] Client exiting

BUILD SUCCESSFUL
Total time: 9 seconds
Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ \
ant -f build-sqlma.xml run-sqlma-client-key-util
Buildfile: build-sqlma.xml

run-sqlma-client-key-util:
     [java] End point: http://net-desk1.slac.stanford.edu:80/axis/services/MeasurementArchiveService
     [java] Request file: \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/schema/example-instances/sonar/\
MetadataKey-Req.xml
     [java] Response file: \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/schema/example-instances/sonar/\
response.xml
     [java] [#document: null]
     [java] time taken :0.202 secs
     [java] Client exiting

BUILD SUCCESSFUL
Total time: 3 seconds
Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ \
ant -f build-sqlma.xml run-sqlma-client-data-util-1Buildfile: build-sqlma.xml

run-sqlma-client-data-util-1:
     [java] End point: http://net-desk1.slac.stanford.edu:80/axis/services/MeasurementArchiveService
     [java] Request file: \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/schema/example-instances/sonar/\
SetupDataRequest-FilterRRDSelect-2.xml
     [java] Response file: \
/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\
perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/schema/example-instances/sonar/\
response.xml
     [java] [#document: null]
     [java] time taken :0.202 secs
     [java] Client exiting

BUILD SUCCESSFUL
Total time: 3 seconds

Just to make sure there's data in the tables;

Code Block

[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ mysql -u perfsonar_ma -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 19 to server version: 5.0.24-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use perfsonar_ma
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------------+
| Tables_in_perfsonar_ma |
+------------------------+
| domain_link            | 
| interdomain_link       | 
| perfsonar_utilization  | 
+------------------------+
3 rows in set (0.00 sec)

mysql> select * from perfsonar_utilization;
+------------+--------+------------+------------+---------------------+
| metadataId | value  | valueUnits | timeValue  | ts                  |
+------------+--------+------------+------------+---------------------+
| meta1-test | 2.0000 | bps        | 1143034705 | 2006-08-30 11:34:05 | 
| meta2-test | 3.0000 | bps        | 1143034706 | 2006-08-30 11:34:05 | 
| meta3-test | 4.0000 | bps        | 1143034707 | 2006-08-30 11:34:05 | 
| meta4-test | 5.0000 | bps        | 1143034709 | 2006-08-30 11:34:05 | 
+------------+--------+------------+------------+---------------------+
4 rows in set (0.02 sec)

mysql> select * from interdomain_link;
Empty set (0.00 sec)

mysql> select * from domain_link;
+------------------------+---------------------+-------------+--------------+--------------+----------+
| id                     | time                | status_oper | status_admin | alarm_id_set | comments |
+------------------------+---------------------+-------------+--------------+--------------+----------+
| DFN-link-1234          | 2006-04-06 12:15:23 | down        | UNKNOWN      | NULL         | NULL     | 
| DFN-Surfnet-Link-5678  | 2006-04-06 12:15:24 | up          | UNKNOWN      | NULL         | NULL     | 
| PSNC-DFN-MUE-Link-1001 | 2006-04-06 12:15:25 | down        | UNKNOWN      | NULL         | NULL     | 
+------------------------+---------------------+-------------+--------------+--------------+----------+
3 rows in set (0.01 sec)