Skip to content

Need no prompt for check.sh #3

Closed
ghost opened this issue Sep 8, 2016 · 2 comments
Closed

Need no prompt for check.sh #3

ghost opened this issue Sep 8, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 8, 2016

The file check.sh have a binary --> gsh.sh

cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -registry -check >> $log

sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider
(note, might need to type in your response multiple times (Java stdin is flaky))
(note, you can whitelist or blacklist db urls and users in the grouper.properties)
Are you sure you want to schemaexport all tables (dropThenCreate=F,writeAndRunScript=F) in db user 'grouper_user', db url 'jdbc:mysql://mariadb:3306/grouper'? (y|n):
^C[root@grouper grouper.apiBinary-2.3.0]#

if you use with --noprompt you have the same behavior.

but if you type y

sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider
(note, might need to type in your response multiple times (Java stdin is flaky))
(note, you can whitelist or blacklist db urls and users in the grouper.properties)
Are you sure you want to schemaexport all tables (dropThenCreate=F,writeAndRunScript=F) in db user 'grouper_user', db url 'jdbc:mysql://mariadb:3306/grouper'? (y|n):
y
Continuing...
java.lang.RuntimeException: Problems with db: DB: user: grouper_user, url: jdbc:mysql://mariadb:3306/grouper, driver: com.mysql.jdbc.Driver
at edu.internet2.middleware.grouper.app.loader.db.GrouperLoaderDb.connection(GrouperLoaderDb.java:254)
at edu.internet2.middleware.grouper.ddl.GrouperDdlUtils.bootstrapHelper(GrouperDdlUtils.java:436)
at edu.internet2.middleware.grouper.registry.RegistryInitializeSchema.main(RegistryInitializeSchema.java:172)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at edu.internet2.middleware.grouper.app.gsh.GrouperShell.handleSpecialCase(GrouperShell.java:204)
at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:144)
at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:31)
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)

@ghost
Copy link
Author

ghost commented Sep 8, 2016

sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider
(note, might need to type in your response multiple times (Java stdin is flaky))
(note, you can whitelist or blacklist db urls and users in the grouper.properties)
Are you sure you want to schemaexport all tables (dropThenCreate=F,writeAndRunScript=F) in db user 'grouper_user', db url 'jdbc:mysql://mariadb:3306/grouper'? (y|n):
n
Didn't receive 'y', received 'n', OK, exiting
[root@grouper grouper.apiBinary-2.3.0]#

@ghost
Copy link
Author

ghost commented Sep 8, 2016

I resolved the issue with utf8 and now check, sh work without any prompt

cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -registry -check >> $log
<OUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -registry -check
Using GROUPER_HOME: /opt/grouper/2.3.0/grouper.apiBinary-2.3.0
Using GROUPER_CONF: /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/conf
Using JAVA: java
using MEMORY: 64m-750m
Grouper starting up: version: 2.3.0, build date: 2016/04/16 05:37:21, env:
grouper.properties read from: /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/conf/grouper.properties
Grouper current directory is: /opt/grouper/2.3.0/grouper.apiBinary-2.3.0
log4j.properties read from: /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/conf/log4j.properties
Grouper is logging to file: /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/logs/grouper_error.log, at min level WARN for package: edu.internet2.middleware.grouper, based on log4j.properties
grouper.hibernate.properties: /opt/grouper/2.3.0/grouper.hibernate.properties
grouper.hibernate.properties: grouper_user@jdbc:mysql://mariadb:3306/grouper
sources.xml read from: /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/conf/sources.xml
sources.xml groupersource id: g:gsa
sources.xml groupersource id: grouperEntities
sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider
(note, might need to type in your response multiple times (Java stdin is flaky))
(note, you can whitelist or blacklist db urls and users in the grouper.properties)
Are you sure you want to schemaexport all tables (dropThenCreate=F,writeAndRunScript=F) in db user 'grouper_user', db url 'jdbc:mysql://mariadb:3306/grouper'? (y|n):
Error: Queries in your database seem to be case insensitive, this can be a problem for Grouper, if you are using MySQL you should use a bin collation
Error: Problems checking UTF and database features
java.lang.RuntimeException: Problem with query in bysqlstatic: insert into grouper_ddl (id, object_name, history, db_version) values (?, ?, ?, 0),
Problem in HibernateSession: HibernateSession (22e484e2): new, notReadonly, READ_WRITE_NEW, notActiveTransaction, session (6116fb5c)
at edu.internet2.middleware.grouper.hibernate.BySql.executeSql(BySql.java:151)
at edu.internet2.middleware.grouper.ddl.GrouperDdlUtils.storeDdl(GrouperDdlUtils.java:1942)
at edu.internet2.middleware.grouper.ddl.GrouperDdlUtils$1.callback(GrouperDdlUtils.java:1910)
at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:700)
at edu.internet2.middleware.grouper.ddl.GrouperDdlUtils.storeAndReadUtfString(GrouperDdlUtils.java:1904)
at edu.internet2.middleware.grouper.misc.GrouperStartup.verifyUtf8andTransactionsHelper(GrouperStartup.java:420)
at edu.internet2.middleware.grouper.misc.GrouperStartup$1.callLogic(GrouperStartup.java:315)
at edu.internet2.middleware.grouper.misc.GrouperStartup$1.callLogic(GrouperStartup.java:310)
at edu.internet2.middleware.grouper.util.GrouperCallable.callLogicWithSessionIfExists(GrouperCallable.java:169)
at edu.internet2.middleware.grouper.util.GrouperCallable.call(GrouperCallable.java:132)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect string value: '\xD9\xB9\xD9\xBA\xD9\xBB...' for column 'history' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3876)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)
at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:384)
at edu.internet2.middleware.grouper.hibernate.BySql.executeSql(BySql.java:146)
... 13 more

@ghost ghost closed this as completed Sep 15, 2016
This issue was closed.
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants