LoginSignup
2
1

More than 5 years have passed since last update.

Proxy 環境下の Rundeck で Slack に結果を投げたかった

Last updated at Posted at 2018-08-01

Proxy 環境下の Rundeck で Slack に結果を投げたかった

タイトルのとおり。
Job の結果を Slack に投げたくて、これを入れたのですが

ERROR NotificationService: Error sending notification: Notification{eventTrigger='onsuccess', type='SlackNotification', content='{"webhook_url":"https://hooks.slack.com/services/ほげほげ"}'}: class com.bitplaces.rundeck.plugins.slack.SlackNotificationPluginException: Error putting data to Slack URL: [接続がタイムアウトしました (Connection timed out)].

Proxy が原因だってのはすぐに分かったんですが、Plugin の設定では無さそうだし、Rundeck にもそれっぽい設定が見当たらない。。

調べた結果

JVM のオプションに https.proxyHost ってのがあったので、これを使ってみました。

/etc/rundeck/profile
RDECK_JVM="-Djava.security.auth.login.config=$JAAS_CONF \
           -Dloginmodule.name=$LOGIN_MODULE \
           -Drdeck.config=$RDECK_CONFIG \
           -Drundeck.server.configDir=$RDECK_SERVER_CONFIG \
           -Dserver.datastore.path=$RDECK_SERVER_DATA/rundeck \
           -Drundeck.server.serverDir=$RDECK_INSTALL \
           -Drdeck.projects=$RDECK_PROJECTS \
           -Drdeck.runlogs=$RUNDECK_LOGDIR \
           -Dserver.web.context=/rundeck \
           -Drundeck.config.location=$RDECK_CONFIG_FILE \
           -Djava.io.tmpdir=$RUNDECK_TEMPDIR \
           -Drundeck.server.workDir=$RUNDECK_WORKDIR \
           -Dserver.http.port=$RDECK_HTTP_PORT \
           -Dhttp.proxyHost=ホスト名 \
           -Dhttp.proxyPort=ポート番号 \
           -Dhttps.proxyHost=ホスト名 \
           -Dhttps.proxyPort=ポート番号"

下の2行を追加して、rundeckd の再起動。

・・・出来た。

Proxy 環境下でお困りの方はご参考に。

仲間募集中

弊社ではエンジニアを募集中です。インフラからアプリ、ユーザサポートまで幅広く業務を行ってます。
https://www.nittsu-infosys.com/recruit/2019/index.html

2
1
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
2
1