postgres 9.3.18 から空パスワードは無効
多忙な夏を乗り越えて少し余裕ができたので,久しぶりに OpenDophin のメンテをしようと,開発マシンの Dolphin サーバを aptitude upgrade でアップデートしたところ,サーバが立ち上がらなくなった。ログを見ると,postgres の認証で失敗していた。しかし,もともと postgres にはパスワードは設定しておらず,アップデート前はそのまま使えていたはずである。
: Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "dolphin" at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:420) :
原因は,アップデートで postgres が 9.3.18 にアップデートされていたことであった。このバージョンから,空パスワードが許されなくなっていた。
・ Disallow empty passwords in all password-based authentication methods
postgres の dolphin ユーザと wildfly の DolphinDS にパスワードを設定して無事サーバが立ち上がるようになった。
- psql で dolphin データベースにパスワードを設定
dolphin=# alter user dolphin with password 'dolphin';
- jboss-cli.sh で DolphinDS にパスワードを設定
$ ./jboss-cli.sh --connect Authenticating against security realm: ManagementRealm Username: xxxx Password: xxxx [standalone@localhost:9990 /] /subsystem=datasources/data-source=DolphinDS:write-attribute(name=password, value=dolphin) { "outcome" => "success", "response-headers" => { "operation-requires-reload" => true, "process-state" => "reload-required" } }
これで standalone/configuration/standalone.xml に反映される<datasource jndi-name="java:jboss/datasouces/DolphinDS" pool-name="DolphinDS" enabled="true"> <connection-url>jdbc:postgresql://localhost/dolphin</connection-url> <driver>postgres</driver> <security> <user-name>dolphin</user-name> <password>dolphin</password> </security> </datasource>
« Windows 10 マシンが突然再起動する | トップページ | WildFly10 へのアップデート »
「OpenDolphin」カテゴリの記事
- 運用17年目のまとめ(2025.02.03)
- IME on/off の切換 - その2(2024.12.02)
- OrcaController オルコン(2024.11.28)
- OpenDolphin: java 21 / wildfly 34 への移行(2024.11.08)
- IME on/off の切り替え(2024.09.03)