5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

digdag server で UnknownHostException が発生したとき

Last updated at Posted at 2019-02-18

digdag の configファイル設定

$ vim /opt/digdag/digdag.conf
database.type = postgresql
database.user = digdag
database.password = <password>
database.host = <localhostとかRDSとか>_
database.port = 5432
database.database = digdag

host の末尾に 空白スペース(上記はアンスコ) が入っていると digdag server コマンドを実行すると以下のエラーが発生する。

1) Error in custom provider, com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The connection attempt failed.
  while locating io.digdag.core.database.DataSourceProvider
  at io.digdag.core.database.DatabaseModule.configure(DatabaseModule.java:23) (via modules: com.google.inject.util.Modules$OverrideModule -> io.digdag.core.database.DatabaseModule)

(略)

Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The connection attempt failed.
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:516)

(略)

Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
	at org.postgresql.Driver$ConnectThread.getResult(Driver.java:358)

(略)

Caused by: java.net.UnknownHostException: <RDSのパラメータ>.ap-northeast-1.rds.amazonaws.com
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)

(略)

ホスト名は合っているのにエラーでコケてしまう。

java.net.UnknownHostException: <RDSのパラメータ>.ap-northeast-1.rds.amazonaws.com

スペースが強調されないエディタだと、意外と気づけないですね。

5
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?