Files
The SQL MA snapshot perfSONAR-SQL_MA-src-snapshot-20060811 was used. Untar'd and linked from /opt/
:
[ytl@net-desk1:/opt/perfSONAR]$ ls -lah total 40K drwxr-xr-x 3 ytl ytl 4.0K Aug 24 10:26 . drwxr-xr-x 8 ytl ytl 4.0K Aug 24 10:39 .. lrwxrwxrwx 1 ytl ytl 14 Aug 9 16:30 current -> perfSONAR-1.0/ lrwxrwxrwx 1 ytl ytl 38 Aug 24 10:26 current-SQL_MA -> \ perfSONAR-SQL_MA-src-snapshot-20060811 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
Library Installation
Ran ant -f build-sqlma.xml libs-sqlma
inside the ant
directory, which got a lot of jars etc from the wiki site and dumped then into /opt/perfSONAR/current-SQL_MA/perfsonar/lib
eXist User Account Creation
eXist is already installed, so just creating a sql user and password (sqlmaservice:sqlmaservice
with group dba
) on the Jetty server (port 8680).
eXist can be started with:
\[ytl@net-desk1:/opt/exist/current/bin\]$ ./startup.sh Configuring eXist from /opt/exist/eXist-20060316/conf.xml Found 1 catalog entries. Loading catalog: /opt/exist/eXist-20060316/webapp/WEB-INF/catalog.xml IN CONFIGURE cluster.journal.maxStore 65000 cluster.journal.shift 100 29 Aug 2006 10:24:43,793 [main] INFO \ (FileResource.java [<clinit>]:60) - Checking Resource aliases 29 Aug 2006 10:24:43,996 [main] INFO \ (HttpServer.java [setStatsOn]:1068) - Statistics on = false for org.mortbay.jetty.Server@ee6681 29 Aug 2006 10:24:44,006 [main] INFO \ (HttpServer.java [start]:654) - Starting Jetty/5.0.0 29 Aug 2006 10:24:44,094 [main] INFO \ (HttpServer.java [start]:669) - Started org.mortbay.http.NCSARequestLog@ae3364 29 Aug 2006 10:24:44,576 [main] INFO \ (HttpContext.java [start]:1604) - Started WebApplicationContext[eXist Server,eXist Server] Logging already initialized. Skipping... 29 Aug 2006 10:24:45,939 [main] WARN \ (JavaUtils.java [isAttachmentSupported]:1305) - Unable to find required classes \ (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. 29 Aug 2006 10:24:46,376 [main] INFO \ (SocketListener.java [start]:204) - Started SocketListener on 0.0.0.0:8680 29 Aug 2006 10:24:46,376 [main] INFO \ (HttpServer.java [start]:690) - Started org.mortbay.jetty.Server@ee6681
DataBase Initialisation and Configuration
Just noticed that I don't actually have a MySQL server running: so downloded mysql-standard-5.0.24-linux-i686-glibc23
and untar'd in /opt/mysql/current
(symlinked).
Started it up with:
[ytl@net-desk1:/opt/mysql/current]$ ./configure NOTE: This is a MySQL binary distribution. It's ready to run, you don't need to configure it! To help you a bit, I am now going to create the needed MySQL databases and start the MySQL server for you. If you run into any trouble, please consult the MySQL manual, that you can find in the Docs directory. Installing all prepared tables Fill help tables To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: ./bin/mysqladmin -u root password 'new-password' ./bin/mysqladmin -u root -h net-desk1.slac.stanford.edu password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run the ./bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd . ; ./bin/mysqld_safe & You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the ./bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com Starting the mysqld server. You can test that it is up and running with the command: ./bin/mysqladmin version
Downloaded and installed the MySQL DataBase configuration/setup
MySQL Setup using:
[ytl@net-desk1:/opt/mysql/current/bin]$ ./mysql -u root -p < /opt/perfSONAR/mysql-sqlma-dbsetup.sql
Which creates the following data in the MySQL DB:
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> describe domain_link; +--------------+--------------+------+-----+-------------------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+-------------------+-------+ | id | varchar(255) | NO | | | | | time | timestamp | YES | | CURRENT_TIMESTAMP | | | status_oper | varchar(255) | YES | | UNKNOWN | | | status_admin | varchar(255) | YES | | UNKNOWN | | | alarm_id_set | varchar(255) | YES | | NULL | | | comments | varchar(255) | YES | | NULL | | +--------------+--------------+------+-----+-------------------+-------+ 6 rows in set (0.00 sec) mysql> describe interdomain_link; +--------------+--------------+------+-----+-------------------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+-------------------+-------+ | id | varchar(255) | NO | | | | | time | timestamp | YES | | CURRENT_TIMESTAMP | | | status_oper | varchar(255) | YES | | UNKNOWN | | | status_admin | varchar(255) | YES | | UNKNOWN | | | alarm_id_set | varchar(255) | YES | | NULL | | | comments | varchar(255) | YES | | NULL | | +--------------+--------------+------+-----+-------------------+-------+ 6 rows in set (0.00 sec) mysql> describe perfsonar_utilization; +------------+-------------+------+-----+-------------------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------+------+-----+-------------------+-------+ | metadataId | varchar(30) | NO | | | | | value | float(16,4) | NO | | | | | valueUnits | varchar(30) | YES | | NULL | | | timeValue | int(11) | NO | | | | | ts | timestamp | YES | | CURRENT_TIMESTAMP | | +------------+-------------+------+-----+-------------------+-------+ 5 rows in set (0.01 sec)
Ran ant -f build-sqlma.xml configure-sqlma
, which creates a file at
/opt/perfsonar/current-SQL_MA/perfsonar/ant/const.properties
[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/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/perfsonar/ant [copy] Copying 1 file to /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/perfsonar/conf copy-properties: [copy] Copying 1 file to /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/perfsonar/ant [copy] Copying 1 file to /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/perfsonar/conf [copy] Copying 1 file to /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/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/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/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/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/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 [http]: [echo] Accepted xmldb server is http://net-desk1.slac.stanford.edu:8680/exist/rest/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/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/perfsonar/conf/sql-database_TEST.xml]: /opt/perfSONAR/current-SQL_MA/perfsonar/conf/sql-database_TEST.xml _get-sql-config-file_1: [echo] Accepted sql metadata config file: /opt/perfSONAR/current-SQL_MA/perfsonar/conf/sql-database_TEST.xml _get-sql-config-file_2: get-sql-config-file: set-service-properties-for-sqlma: [propertyfile] Updating property file: /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/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/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/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/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/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/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/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/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/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: 2 minutes 10 seconds
eXist Database Configuration
- runing the
xmldb-init-sqlma
ant target results in
[ytl@net-desk1:/opt/perfSONAR/perfSONAR-SQL_MA-src-snapshot-20060811/perfsonar/ant]$ ant -f build-sqlma.xml xmldb-init-sqlma xmldb-init-sqlma: getresource-rrdma: xmldb-exist-rrdma: [exist] Checking collection: xmldb:exist://net-desk1.slac.stanford.edu:8680/exist/xmlrpc/db/sqlmaconfig __xmldb-init-rrdma: xmldb-init-rrdma: getdbroot-rrdma: get-xmldb-collection: xmldb-collection-rrdma: [create] Database driver already registered. BUILD FAILED /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/perfsonar/ant/sqlma/sqlma-exist-xmldb-targets.xml:29: \ The following error occurred while executing this line: \ /afs/slac.stanford.edu/g/scs/net/netmon/perfSONAR/SQLtypeMAService/java/20060811/perfSONAR-SQL_MA-src-snapshot-20060811/perfsonar/ant/rrdma/rrdma-exist-xmldb-targets.xml:147: \ The following error occurred while executing this line: \ java.lang.NoSuchMethodError: org.exist.xmldb.XmldbURI.xmldbUriFor(Ljava/lang/String;)Lorg/exist/xmldb/XmldbURI;
It looks like a CLASSPATH problem: however, the current class path is:
CLASSPATH=::/opt/tomcat/current/webapps/axis/WEB-INF/lib/activation.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/axis-ant.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/axis.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/commons-discovery-0.2.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/commons-logging-1.0.4.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/commons-pool-1.1.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/exist.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/jaxrpc.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/jdom.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/log4j-1.2.8.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/mail.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/perfSONAR-generic.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/perfSONAR-rrdma.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/perfSONAR-xmlls.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/resolver.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/rrdjtool.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/saaj.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/wsdl4j-1.5.1.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/xalan.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/xercesImpl.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/xercesSamples.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/xml-apis.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/xmldb.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/xmlParserAPIs.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/xmlrpc-1.2-patched.jar:\ /opt/tomcat/current/webapps/axis/WEB-INF/lib/xmlsec.jar:\ .
Which as the eXist jar; but it is actually one that i deployed as a war rather than the one with Jetty. Either way, exist.jar
does indeed contain the requested class files. Manually adding replacing the exist.jar path to that of /opt/exist/current/exist.jar
doesn't work either.
Running the xmldb-init-sqlma
ant call still doesn't work tho'.
Noticed that /opt/perfSONAR/current-SQL_MA/perfsonar/conf/service.properties
had the wrong port number for the service.r.access_points
, so changed it to 80.
service.r.access_point=\ http\://net-desk1.slac.stanford.edu\:80/axis/services/MeasurementArchiveService
Filed as Bug 76 in bugzilla.