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

...

Looking at the Axis List page gives

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)