Jeff,

Glad to hear you are making progress!  Replies inline below:


On Mar 3, 2017, at 1:54 PM, Sale, Jeff <[email protected]<mailto:[email protected]>> 
wrote:

Thanks, Marcus. I guess I missed the instructions to uncomment those lines in 
the properties file. It is also a little unclear what lines related to derby db 
should be commented out. It might help to provide an example file. I found one 
on github but it doesn't look quite the same as the one which came with the 
installation.

I think the properties file documentation [1] gives a little more help.  
Comment out the *.jdbc.url and *.jdbc.driver properties that reference derby 
and uncomment the mysql equivalents.


Another problem I had pertained to using the SQL GRANT ALL command with a % 
rather than localhost. I am now able to connect to mysql with jdbc but I am 
still getting some errors. I noticed one issue related to the name of one of 
the databases. In the instructions it says to create a database named 
"credential_store" but one of the errors I was getting seemed to be looking for 
a database named "airavata_credentialstore”.

The jdbc.url you provide in airavata-server.properties needs to match whatever 
you name the database.

I created a database with that name and tried again and that seems to be 
resolved but I am still getting errors (see below):

… snip ...

[INFO] Database already created for Workflow Catalog!!!
[ERROR] Error occurred while executing :  /* * * Licensed to the Apache 
Software Foundation (ASF) under one * or more contributor license agreements.  
See the NOTICE file * distributed with this work for additional information * 
regarding copyright ownership.  The ASF licenses this file * to you under the 
Apache License, Version 2.0 (the * "License"); you may not use this file except 
in compliance * with the License.  You may obtain a copy of the License at * *  
 http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable 
law or agreed to in writing, * software distributed under the License is 
distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * 
KIND, either express or implied.  See the License for the * specific language 
governing permissions and limitations * under the License. * */  CREATE TABLE 
COMMUNITY_USER ( GATEWAY_ID VARCHAR(256) NOT NULL, COMMUNITY_USER_NAME 
VARCHAR(256) NOT NULL, TOKEN_ID VARCHAR(256) NOT NULL, COMMUNITY_USER_EMAIL 
VARCHAR(256) NOT NULL, PRIMARY KEY (GATEWAY_ID, COMMUNITY_USER_NAME, TOKEN_ID) )
java.lang.Exception: Error occurred while executing :  /* * * Licensed to the 
Apache Software Foundation (ASF) under one * or more contributor license 
agreements.  See the NOTICE file * distributed with this work for additional 
information * regarding copyright ownership.  The ASF licenses this file * to 
you under the Apache License, Version 2.0 (the * "License"); you may not use 
this file except in compliance * with the License.  You may obtain a copy of 
the License at * *   http://www.apache.org/licenses/LICENSE-2.0 * * Unless 
required by applicable law or agreed to in writing, * software distributed 
under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 
CONDITIONS OF ANY * KIND, either express or implied.  See the License for the * 
specific language governing permissions and limitations * under the License. * 
*/  CREATE TABLE COMMUNITY_USER ( GATEWAY_ID VARCHAR(256) NOT NULL, 
COMMUNITY_USER_NAME VARCHAR(256) NOT NULL, TOKEN_ID VARCHAR(256) NOT NULL, 
COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL, PRIMARY KEY (GATEWAY_ID, 
COMMUNITY_USER_NAME, TOKEN_ID) )
at 
org.apache.airavata.api.server.util.DatabaseCreator.executeSQL(DatabaseCreator.java:154)
at 
org.apache.airavata.api.server.util.DatabaseCreator.executeSQLScript(DatabaseCreator.java:299)
at 
org.apache.airavata.api.server.util.DatabaseCreator.createDatabase(DatabaseCreator.java:238)
at 
org.apache.airavata.api.server.util.DatabaseCreator.createRegistryDatabase(DatabaseCreator.java:66)
at 
org.apache.airavata.api.server.util.CredentialStoreInitUtil.initializeDB(CredentialStoreInitUtil.java:70)
at 
org.apache.airavata.api.server.AiravataAPIServer.startAiravataServer(AiravataAPIServer.java:74)
at 
org.apache.airavata.api.server.AiravataAPIServer.start(AiravataAPIServer.java:202)
at org.apache.airavata.server.ServerMain.startAllServers(ServerMain.java:320)
at org.apache.airavata.server.ServerMain.performServerStart(ServerMain.java:169)
at org.apache.airavata.server.ServerMain.main(ServerMain.java:152)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified 
key was too long; max key length is 767 bytes
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2497)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2455)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739)
at 
org.apache.airavata.api.server.util.DatabaseCreator.executeSQL(DatabaseCreator.java:126)
... 9 more

This something we’ve fixed for the next release. As a workaround, go into your 
deployment directory and edit 
apache-airavata-server-0.17-SNAPSHOT/bin/database_scripts/credstore-mysql.sql 
and change the width of a few of the varchar columns:


CREATE TABLE COMMUNITY_USER (
  GATEWAY_ID           VARCHAR(100) NOT NULL,
  COMMUNITY_USER_NAME  VARCHAR(100) NOT NULL,
  TOKEN_ID             VARCHAR(100) NOT NULL,
…


CREATE TABLE CREDENTIALS (
  GATEWAY_ID     VARCHAR(100) NOT NULL,
  TOKEN_ID       VARCHAR(100) NOT NULL,
…



Thanks,

Marcus

[1] http://airavata.readthedocs.io/en/latest/airavata-properties/



Reply via email to