« 2017年6月 | トップページ | 2017年10月 »

2017年9月

2017年9月25日 (月)

インスペクタのデザイン変更

またインスペクタのデザインをいじった。
  • 全く使っていなかったツールバーを削除
  • アクアデザインからフラットデザインに変えた
  • 左ペインのインスペクタのバックグランドが重いグレーだったのを軽いグレーにした
Old_2   New_2

オリジナルの OpenDolphin はフラットデザイン(?)だったが,Quaqua 導入時にがんばってアクアデザインにカスタマイズしていた。
しかし,結局時代はフラットデザインに戻ってしまった。
下の図では BasicInfoInspector とカルテのタイトルバー部分がフラットデザイン。
Old1   New1

2017年9月14日 (木)

WildFly10 へのアップデート

だらだらと WildFly 8.2.1. を使い続けていたが,ついに思い立って WildFly 10 にアップデートすることにした。

WildFly 10.2.0 の準備

WildFly の GitHub から branch 10.x を選択,"Download Zip" して解凍する。作業時点ではこれで 10.2.0.Final がダウンロードされた。

WildFly 10.2.0 のビルド

WildFly 8.2.1 の時と同じようにビルドできた。注意点としては,full distributable build が欲しい場合は,build/target ではなく,dist/target の方を使う必要がある。build/target の方は,maven 環境がないと動かない。

WildFly 10.2.0 のセットアップ

  • ./standalone.sh -b 0.0.0.0 で立ち上げて,./add-user.sh で管理ユーザ登録
  • JDBC の登録(ドライバは postgresql-42.1.4.jar),data-source の作成,パスワード登録
    $ ./jboss-cli.sh --connect
    [standalone@localhost:9990 /] module add --name=org.postgres --resources=~/Downloads/postgresql-42.1.4.jar --dependencies=javax.api,javax.transaction.api
    [standalone@localhost:9990 /] /subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
    [standalone@localhost:9990 /] data-source add --jndi-name=java:jboss/datasouces/DolphinDS --name=DolphinDS --connection-url=jdbc:postgresql://localhost/dolphin --driver-name=postgres --user-name=dolphin
    [standalone@localhost:9990 /] /subsystem=datasources/data-source=DolphinDS:write-attribute(name=password, value=dolphin)
    [standalone@localhost:9990 /] quit
    

OpenDolphin サーバの修正

WildFly10 の pom.xml に合わせて,サーバの pom.xml のバージョンを変更する。変更したら「依存性」を右クリックして,「宣言されたている依存性をダウンロード」する。
org.apache.lucene.queryParser.QueryParserorg.apache.lucene.queryparser.classic.QueryParser になって,引数の version がいらなくなったので修正する。インデックスも互換性がなくなったので,/var/lucene の中身を消去する。

OpenDolphin クライアントの修正

pom.xml のバージョンを修正して依存性をダウンロードする。

lucene index の作り直し

以前やったとおりインデックスを作り直す。エントリー数は当時 (2013年) の 117,673 件から 219,617 件に増加しており,インデックス作成も実に 3時間28分を要した。
13:05:30,906 INFO  [org.hibernate.search.batchindexing.impl.SimpleIndexingProgressMonitor] (Hibernate Search: identifierloader-1) HSEARCH000027: Going to reindex 219617 entities
13:05:34,786 INFO  [org.hibernate.search.batchindexing.impl.SimpleIndexingProgressMonitor] (Hibernate Search: entityloader-2) HSEARCH000030: 50 documents indexed in 3391 ms
  :
16:33:16,248 INFO  [org.hibernate.search.batchindexing.impl.SimpleIndexingProgressMonitor] (Hibernate Search: entityloader-3) HSEARCH000030: 219600 documents indexed in 12465287 ms
16:33:16,248 INFO  [org.hibernate.search.batchindexing.impl.SimpleIndexingProgressMonitor] (Hibernate Search: entityloader-3) HSEARCH000031: Indexing speed: 17.616922 documents/second; progress: 99.99%
16:33:22,187 INFO  [org.hibernate.search.batchindexing.impl.SimpleIndexingProgressMonitor] (Hibernate Search: batch coordinator-1) HSEARCH000028: Reindexed 219617 entities

2017年9月 9日 (土)

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>
    

« 2017年6月 | トップページ | 2017年10月 »