LoginSignup
6
6

More than 5 years have passed since last update.

Vagrantで作った開発環境の中のJenkinsから、Growl PluginでGrowl通知する場合にこける

Last updated at Posted at 2014-07-28

現象

Growl Pluginを設定してジョブを流すと、
Build step 'Growl' marked build as failure とかでこける。

原因

ログ見ると以下のようなエラーが出てる。

/var/log/jenkins/jenkins.log
java.lang.NullPointerException 
at net.sf.libgrowl.internal.Message.header(Message.java:99) 
at net.sf.libgrowl.internal.Message.<init>(Message.java:84) 
at net.sf.libgrowl.internal.RegisterMessage.<init>(RegisterMessage.java:26) 
...

プラグイン落としてきてMessage.javaを見るとInetAddress.getLocalHost().getHostName();がNullで落ちてるっぽい。
どうやらVagrantのboxが適当に設定してくれてるホスト名がよろしくないみたいな感じ。

対策

Vagrantfile
  config.vm.hostname = "hogehoge"

という感じでVagrantfileにホスト名を適当に設定してやると、/etc/hostsの127.0.0.1にhogehogeが追加されて、うまくいくとおもいます。

6
6
0

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
6
6