検索順位チェックツール Serposcope の Dserposcope.conf に設定ファイルを指定しても読み込まれないときに確認するポイント
- 2017 4/6
- カテゴリー : SEO
- serposcope
- コメントを書く
検索順位チェックツール Serposcope を起動するときに conf ファイルを指定することができるんですが、設定が読み込まれないときに確認するポイントをご紹介します。
結論 -Dserposcope.conf= の順番ミス
[NG ケース] -Dserposcope.conf が -jar の後
$ java -jar /path/to/serposcope-2.6.0.jar -Dserposcope.conf=/path/to/serposcope.conf starting serposcope service [2017-04-06 19:02:08,089] [NinjaJetty] INFO c.SerposcopeConf - serposcope.version : 2.6.0 [2017-04-06 19:02:08,090] [NinjaJetty] INFO c.SerposcopeConf - serposcope.datadir : /Users/username/serposcope [2017-04-06 19:02:08,091] [NinjaJetty] INFO c.SerposcopeConf - serposcope.logdir : /Users/username/serposcope/logs [2017-04-06 19:02:08,091] [NinjaJetty] INFO c.SerposcopeConf - serposcope.db.url : jdbc:h2:/Users/username/serposcope/db;MODE=MySQL [2017-04-06 19:02:08,091] [NinjaJetty] INFO c.SerposcopeConf - serposcope.db.debug : false [2017-04-06 19:02:08,091] [NinjaJetty] INFO c.SerposcopeConf - serposcope.listenAddress : 0.0.0.0 [2017-04-06 19:02:08,091] [NinjaJetty] INFO c.SerposcopeConf - serposcope.listenPort : 7134 [2017-04-06 19:02:08,140] [NinjaJetty] WARN o.e.j.s.h.ContextHandler - Empty contextPath [2017-04-06 19:02:08,149] [NinjaJetty] INFO s.l.MyNinjaJetty - Trying to start jetty vnull on 0.0.0.0:7134 [2017-04-06 19:02:08,301] [NinjaJetty] INFO c.Module - now logging to /Users/me/serposcope/logs/2017-04-06.log |
[OK ケース] -Dserposcope.conf が -jar の前
$ java -Dserposcope.conf=/path/to/serposcope.conf -jar /path/to/serposcope-2.6.0.jar starting serposcope service [2017-04-06 19:03:44,007] [NinjaJetty] INFO c.SerposcopeConf - serposcope.version : 2.6.0 [2017-04-06 19:03:44,009] [NinjaJetty] INFO c.SerposcopeConf - serposcope.datadir : /Users/username/serposcope [2017-04-06 19:03:44,009] [NinjaJetty] INFO c.SerposcopeConf - serposcope.logdir : /Users/username/serposcope/logs [2017-04-06 19:03:44,009] [NinjaJetty] INFO c.SerposcopeConf - serposcope.db.url : jdbc:mysql://localhost/serposcope_db?user=serposcope_user&password=serposcope_pass&allowMultiQueries=true [2017-04-06 19:03:44,009] [NinjaJetty] INFO c.SerposcopeConf - serposcope.db.debug : false [2017-04-06 19:03:44,009] [NinjaJetty] INFO c.SerposcopeConf - serposcope.listenAddress : 0.0.0.0 [2017-04-06 19:03:44,009] [NinjaJetty] INFO c.SerposcopeConf - serposcope.listenPort : 7134 [2017-04-06 19:03:44,059] [NinjaJetty] WARN o.e.j.s.h.ContextHandler - Empty contextPath [2017-04-06 19:03:44,073] [NinjaJetty] INFO s.l.MyNinjaJetty - Trying to start jetty vnull on 0.0.0.0:7134 [2017-04-06 19:03:44,261] [NinjaJetty] INFO c.Module - now logging to /Users/me/serposcope/logs/2017-04-06.log |
java コマンドのオプションの順番をよく理解せず使っていたのが良くなかったようでした。
Serposcope の公式ドキュメント Install instructions | serposcope には正しい順番でオプション -Dserposcope.conf を指定しているので、公式ドキュメントどおりに実行していれば特に問題は起きないと思います。