Files
The latest snapshot was recommended: SQL-MA
[ytl@net-desk1:/opt/perfSONAR]$ ls -lah total 56K drwxr-xr-x 3 ytl ytl 4.0K Aug 30 10:25 . 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 38 Aug 24 10:26 current-SQL_MA -> \ perfSONAR-SQL_MA-src-snapshot-20060828 -rw-rw-r-- 1 ytl ytl 2.4K Aug 29 11:54 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
Note that the snapshot files are actually located on AFS space.
Exist Installation
Exist is already installed on net-desk1:8680.
Server 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 30 Aug 2006 10:31:36,020 [main] INFO \ (FileResource.java [<clinit>]:60) - Checking Resource aliases 30 Aug 2006 10:31:36,231 [main] INFO \ (HttpServer.java [setStatsOn]:1068) - Statistics on = false for org.mortbay.jetty.Server@97eded 30 Aug 2006 10:31:36,240 [main] INFO \ (HttpServer.java [start]:654) - Starting Jetty/5.0.0 30 Aug 2006 10:31:36,320 [main] INFO \ (HttpServer.java [start]:669) - Started org.mortbay.http.NCSARequestLog@1a897a9 30 Aug 2006 10:31:36,786 [main] INFO \ (HttpContext.java [start]:1604) - Started WebApplicationContext[eXist Server,eXist Server] Logging already initialized. Skipping... 30 Aug 2006 10:31:38,173 [main] WARN \ (JavaUtils.java [isAttachmentSupported]:1305) \ - Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). \ Attachment support is disabled. 30 Aug 2006 10:31:38,686 [main] INFO \ (SocketListener.java [start]:204) - Started SocketListener on 0.0.0.0:8680 30 Aug 2006 10:31:38,687 [main] INFO \ (HttpServer.java [start]:690) - Started org.mortbay.jetty.Server@97eded
Just to make sure the eXist DB is running, run the X11 client:
[ytl@net-desk1:/opt/exist/current/bin]$ ./client.sh eXist version 1.0, Copyright (C) 2001-2006 Wolfgang Meier eXist comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; for details read the license file. GNU Readline found. IMPORTANT: Don't use GNU Readline to work with other character encodings than ISO-8859-1.
The sqlmaservice
user was already added from a previous configuration.
Seems like everything is set up!
Conflicting MA Service
Noticed that the perfSONAR service runs the RRD MA Service also (as per my installation instructions):
Therefore undeployed the MA Service by:
[ytl@net-desk1:/opt/perfSONAR/current/scripts]$ ./MAAxisUndeploy.sh Processing file /opt/perfSONAR/perfSONAR-1.0/wsdd/ma-service-undeploy.wsdd <Admin>Done processing</Admin>
MySQL Database Setup
Downloaded a standalone version of MySQL:
[ytl@net-desk1:/opt/mysql]$ ls -lah total 42M drwxrwxr-x 3 ytl ytl 4.0K Aug 29 11:41 . drwxr-xr-x 9 ytl ytl 4.0K Aug 29 12:18 .. lrwxrwxrwx 1 ytl ytl 40 Aug 24 10:39 current -> mysql-standard-5.0.24-linux-i686-glibc23 -rw-rw-r-- 1 ytl ytl 13M Aug 1 06:25 MySQL-server-standard-5.0.24-0.rhel4.i386.rpm drwxr-xr-x 14 ytl ytl 4.0K Jul 27 20:55 mysql-standard-5.0.24-linux-i686-glibc23 -rw-r--r-- 1 ytl ytl 29M Aug 24 10:41 mysql-standard-5.0.24-linux-i686-glibc23.tar.gz
Added a MySQL user:
[ytl@net-desk1:/opt/mysql/current/bin]$ sudo /usr/sbin/luseradd mysql
Tried to start the server and got:
[ytl@net-desk1:/opt/mysql/current/bin]$ sudo ./mysqld_safe The file /usr/local/mysql/bin/mysqld doesn't exist or is not executable Please do a cd to the mysql installation directory and restart this script from there as follows: ./bin/mysqld_safe. See http://dev.mysql.com/doc/mysql/en/mysqld_safe.html for more information
Edited /opt/mysql/current/bin/mysqld_safe
to move all links to /opt/mysql/current/
rather than /usr/local/mysql
.
Tried to start server again:
[ytl@net-desk1:/opt/mysql/current/bin]$ sudo ./e Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid 060830 11:03:17 mysqld ended
Somethings gone wrong.
[ytl@net-desk1:/opt/mysql/current/bin]$ sudo -s [root@net-desk1 bin]# cat /var/lib/mysql/ ibdata1 ib_logfile1 net-desk1.slac.stanford.edu.err ib_logfile0 mysql.sock [root@net-desk1 bin]# cat /var/lib/mysql/net-desk1.slac.stanford.edu.err 060830 11:03:15 mysqld started InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 060830 11:03:15 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 060830 11:03:16 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 060830 11:03:16 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 060830 11:03:17 InnoDB: Started; log sequence number 0 0 060830 11:03:17 [ERROR] /opt/mysql/current/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2) 060830 11:03:17 [ERROR] Can't start server: can't create PID file: No such file or directory 060830 11:03:17 mysqld ended
Looks like it can't create the pid file in the mysqld directory - so created it manually:
[root@net-desk1 bin]# cd /var/run/ [root@net-desk1 run]# mkdir mysqld
Tried to restart the server; same thing - log says:
060830 11:06:10 mysqld started 060830 11:06:10 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 060830 11:06:10 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 36808. InnoDB: Doing recovery: scanned up to log sequence number 0 43655 060830 11:06:10 InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percents: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 060830 11:06:10 InnoDB: Started; log sequence number 0 43655 060830 11:06:10 [ERROR] /opt/mysql/current/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 13) 060830 11:06:10 [ERROR] Can't start server: can't create PID file: Permission denied 060830 11:06:10 mysqld ended
Make sure all permissions are set:
[ytl@net-desk1:/opt/mysql/current/bin]$ sudo chown -R mysql:mysql \ /var/lib/mysql/ \ /opt/mysql/current \ /var/run/mysqld
Ran the configuration for MySQL:
[ytl@net-desk1:/opt/mysql/current]$ sudo -s [root@net-desk1 current]# scripts/mysql_install_db --user=mysql 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. 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
And started the daemon:
[ytl@net-desk1:/opt/mysql/current/bin]$ sudo ./mysqld_safe --user=mysql Starting mysqld daemon with databases from /var/lib/mysql
- assumed the previous errors were due to permission conflicts.
Connect to MySQL DB through the new socket, as the configuration appears to point to a socket file which doesn't exist:
[ytl@net-desk1:/opt/mysql/current/bin]$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Need to make sure we can access the socket file located in /var/lib/mysql
[root@net-desk1 mysql]# pwd /var/lib/mysql [root@net-desk1 mysql]# chmod o+x .
Finally:
[ytl@net-desk1:/opt/mysql/current/bin]$ mysql --socket=/var/lib/mysql/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.24-standard Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
Make sure we set the root passwords:
[ytl@net-desk1:/opt/mysql/current/bin]$ ./mysqladmin --socket=/var/lib/mysql/mysql.sock -u root password '#######' [ytl@net-desk1:/opt/mysql/current/bin]$ ./mysqladmin --socket=/var/lib/mysql/mysql.sock -u root -h net-desk1.slac.stanford.edu password '########'
Lets initiate the SQL MA databases from the SQL file mysql-sqlma-dbsetup.sql
[ytl@net-desk1:/opt/perfSONAR]$ mysql --socket=/var/lib/mysql/mysql.sock -u root -p < mysql-sqlma-dbsetup.sql Enter password:
This results in the following tables being created:
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)