Files
The September 1st snapshot was downloaded and symlinked into the /opt
space.
[ytl@net-desk1:/opt/perfSONAR]$ ls -lah total 60K drwxr-xr-x 3 ytl ytl 4.0K Sep 1 12:05 . drwxr-xr-x 9 ytl ytl 4.0K Aug 29 12:18 .. lrwxrwxrwx 1 ytl ytl 14 Aug 9 16:30 current -> perfSONAR-1.0/ lrwxrwxrwx 1 ytl ytl 39 Sep 1 12:05 current-SQL_MA -> \ perfSONAR-SQL_MA-src-snapshot-20060901/ lrwxrwxrwx 1 ytl ytl 65 Aug 30 11:38 mysql-sqlma-dbsetup.sql -> \ /u/sf/ytl/Work/perfSONAR/SQLtypeMAService/mysql-sqlma-dbsetup.sql drwxrwxr-x 10 ytl ytl 4.0K Aug 9 16:51 perfSONAR-1.0 lrwxrwxrwx 1 ytl ytl 94 Aug 24 09:58 perfSONAR-SQL_MA-src-snapshot-20060811 -> \ /u/sf/ytl/Work/perfSONAR/SQLtypeMAService/java/20060811/perfSONAR-SQL_MA-src-snapshot-20060811 lrwxrwxrwx 1 ytl ytl 94 Aug 30 10:25 perfSONAR-SQL_MA-src-snapshot-20060828 -> \ /u/sf/ytl/Work/perfSONAR/SQLtypeMAService/java/20060828/perfSONAR-SQL_MA-src-snapshot-20060828 lrwxrwxrwx 1 ytl ytl 95 Sep 1 12:07 perfSONAR-SQL_MA-src-snapshot-20060901 -> \ /u/sf/ytl/Work/perfSONAR/SQLtypeMAService/java/20060901/perfSONAR-SQL_MA-src-snapshot-20060901/
eXist Setup
i am assuming that i can use the setup from the 20060828 release.
MySQL Setup
Also assuming that i can use the setup from the 20060828 release.
SQL-MA Configuration
[ytl@net-desk1:/opt/perfSONAR/current-SQL_MA/perfsonar/ant]$ ant -f build-sqlma.xml configure-sqlma Buildfile: build-sqlma.xml configure-sqlma: copy-initconfig-for-sqlma: [copy] Copying 1 file to \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/ant [copy] Copying 1 file to \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/conf copy-properties: [copy] Copying 1 file to \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/ant [copy] Warning: Could not find file \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/conf/service.properties to copy. [copy] Copying 1 file to \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/conf get-message-1: [echo] Start creating ant/const.properties file [echo] ----------------------------------------------------------- _get-java-path: get-java-path: [input] Enter the path of Java [/usr/local/java/current]: [echo] Accepted Java path: /usr/local/java/current get-axis-path: [input] Enter the path of Axis location \ [/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/../apache-tomcat-5.5.17/webapps/axis]: /opt/axis/current [echo] Accepted Axis path: /opt/axis/current get-server-address: [input] Enter the address of host (perfSONAR service location) [localhost]: net-desk1.slac.stanford.edu [echo] Accepted server address: net-desk1.slac.stanford.edu get-server-port: [input] Enter the port of server [8080]: 80 [echo] Accepted server port: 80 set-const-properties-for-sqlma: [propertyfile] Updating property file: \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/ant/const.properties [echo] const.properties file created [input] Press Return key ... get-message-2: [echo] Start creating conf/service.properties file [echo] ----------------------------------------------------------- get-server-address: [input] Enter the address of host (perfSONAR service location) [localhost]: net-desk1.slac.stanford.edu [echo] Accepted server address: net-desk1.slac.stanford.edu get-xmldb-address: [input] Enter the address of xmldb eXist [localhost]: net-desk1.slac.stanford.edu [input] Enter the port of xmldb eXist [8090]: 8680 [input] Enter the type of access to xmldb eXist [xmlrpc]: [echo] Accepted xmldb server is \ xmldb:exist://net-desk1.slac.stanford.edu:8680/exist/xmlrpc/db/sqlmaconfig __get-sql-config-file: [input] Enter the path of sql metadata config file \ [/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/conf/sql-database_TEST.xml]: _get-sql-config-file_1: [echo] Accepted sql metadata config file: \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/conf/sql-database_TEST.xml _get-sql-config-file_2: get-sql-config-file: set-service-properties-for-sqlma: [propertyfile] Creating new property file: \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/conf/service.properties [echo] service.properties file created [input] Press Return key ... get-message-3: [echo] Start creating conf/log4j.properties file [echo] ----------------------------------------------------------- set-log4j-properties: [propertyfile] Updating property file: \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/conf/log4j.properties [echo] log4j.properties file created [input] Press Return key ... get-message-4: [echo] Start adding properties to Tomcat catalina.properties file [echo] ----------------------------------------------------------- set-tomcat-properties: [input] Enter the path of Tomcat location \ [/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/../apache-tomcat-5.5.17]: /opt/tomcat/current/ [input] Enter the path of service.properties file \ [/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/conf/service.properties]: /opt/perfSONAR/current-SQL_MA/perfsonar/conf/service.properties [input] Enter the path of components.properties file \ [/afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060901/\ perfSONAR-SQL_MA-src-snapshot-20060901/perfsonar/conf/components.properties]: /opt/perfSONAR/current-SQL_MA/perfsonar/conf/components.properties [propertyfile] Updating property file: /opt/tomcat/current/conf/catalina.properties BUILD SUCCESSFUL Total time: 1 minute 27 seconds
Changed the access_point
parameter in service.properties
to point to the correct port number:
service.r.access_point=http\://net-desk1.slac.stanford.edu\:80/axis/services/MeasurementArchiveService
SQL-MA Compilation
Did a ant -f build-sqlma.xml libs-sqlma
to get all the libraries and jars required for the compilation.
Then did a build:
[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
[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):
[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
SQL-MA Testing
Runnging a simple test results in failure:
[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:
[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:
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
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:
[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:
[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
However, running the requests for keys and data doesn't seem to work... noticed the NULL documents.
[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
[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
[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;
[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)