2017-04-14 17 views
0

Kerberos認証情報を使用してPostgresデータベースにアクセスしようとしているので、パスワードを使用する必要はありませんが、Schemacrawlerはパスワードを要求して次のエラーを表示します。SchemacrawlerのKerberos PostgresDB

SchemaCrawler 14.15.04 

Error: Could not connect to jdbc:postgresql://nhc-contracts-db-dev.nicc.noblis.org:5432/networx?ApplicationName=SchemaCrawler;loggerLevel=DEBUG, for user 'phayes', with properties {} 

Re-run SchemaCrawler with just the 
-? 
option for help 

Or, re-run SchemaCrawler with an additional 
-loglevel=CONFIG 
option for details on the error 
Apr 14, 2017 10:43:29 AM us.fatehi.commandlineparser.CommandLineUtility logSafeArguments 
INFO: SchemaCrawler, v14.15.04 
Apr 14, 2017 10:43:29 AM us.fatehi.commandlineparser.CommandLineUtility logSafeArguments 
INFO: Command line: 
-server=postgresql 
-host=nhc-contracts-db-dev.nicc.noblis.org 
-port=5432 
-database=networx 
-schemas=public 
-user=phayes 
-password=***** 
-infolevel=standard 
-command=schema 
-loglevel=CONFIG 
Apr 14, 2017 10:43:29 AM us.fatehi.commandlineparser.CommandLineUtility logFullStackTrace 
SEVERE: Could not connect to jdbc:postgresql://nhc-contracts-db-dev.nicc.noblis.org:5432/networx?ApplicationName=SchemaCrawler;loggerLevel=DEBUG, for user 'phayes', with properties {} 
schemacrawler.schemacrawler.SchemaCrawlerSQLException: Could not connect to jdbc:postgresql://nhc-contracts-db-dev.nicc.noblis.org:5432/networx?ApplicationName=SchemaCrawler;loggerLevel=DEBUG, for user 'phayes', with properties {} 
     at schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.getConnection(BaseDatabaseConnectionOptions.java:183) 
     at schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.getConnection(BaseDatabaseConnectionOptions.java:102) 
     at schemacrawler.tools.commandline.SchemaCrawlerCommandLine.execute(SchemaCrawlerCommandLine.java:127) 
     at schemacrawler.Main.main(Main.java:90) 
Caused by: org.postgresql.util.PSQLException: GSS Authentication failed 
     at org.postgresql.gss.MakeGSS.authenticate(MakeGSS.java:66) 
     at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:594) 
     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222) 
     at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) 
     at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194) 
     at org.postgresql.Driver.makeConnection(Driver.java:431) 
     at org.postgresql.Driver.connect(Driver.java:247) 
     at schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.getConnection(BaseDatabaseConnectionOptions.java:161) 
     ... 3 more 
Caused by: javax.security.auth.login.LoginException: No LoginModules configured for pgjdbc 
     at javax.security.auth.login.LoginContext.init(Unknown Source) 
     at javax.security.auth.login.LoginContext.<init>(Unknown Source) 
     at org.postgresql.gss.MakeGSS.authenticate(MakeGSS.java:56) 
     ... 10 more 

私はこれを解決できますか?

答えて

0

SchemaCrawlerでは、JDBCデータベース接続URL文字列を使用して、別の方法で接続できます。適切なURL文字列を作成するには、"Connecting to the Database"に関連するPostgreSQLのマニュアルを参照してください。

次に、ホストとポートの代わりに、以下の例のようにURLを使用します。パスワードを使用する予定がない、または必須でない場合は、空のパスワードとして-password=を指定してください。 SchemaCrawlerはコマンドラインの

例の抜粋: -server=postgresql -url=<appropriate url here> -database=networx -schemas=public -user=phayes -password= -infolevel=standard -command=schema

Sualeh Fatehi、SchemaCrawler

+0

[OK]をありがとうございました。とても有難い。 –