前提・実現したいこと
Docker上のredmineのチケット作成の通知をmattemostに飛ばそうとしています。
まず、Windows10のHyper-VにCentOSを導入し、
その上にDockerを導入、RedmineとMattermostを構築しています。
以下を参考にredmine_messengerプラグインを導入、環境設定を行いました。
リンク
しかし、redmineでチケットを作成してもmattermostに通知が行きません。
redmineをのログ(詳細は下部)を確認すると、以下のエラーが出力されていました。
cannot connect to http://100.64.1.30:8065/hooks/tj9p7fkhcp8aichbink1odehoc Failed to open TCP connection to 100.64.1.30:8065 (No route to host - connect(2) for "100.64.1.30" port 8065)
有識者の方々、解決方法のご教示お願いいたします。
環境
ホストOS
# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) # docker -v Docker version 18.09.0, build 4d60db4 # docker-compose -v docker-compose version 1.18.0, build 8dd22a9
コンテナ
[root@localhost ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 61aef70d47d3 mattermost/mattermost-preview:5.0 "/bin/sh -c ./docker…" 15 minutes ago Up 13 minutes 3306/tcp, 33060/tcp, 0.0.0.0:8065->8065/tcp mattermost f989968b6778 bitnami/nginx "/entrypoint.sh /run…" 26 hours ago Up About an hour 0.0.0.0:80->80/tcp, 8080/tcp, 0.0.0.0:443->443/tcp, 8443/tcp redmine_nginx 8a56e6af6f32 sameersbn/redmine:3.4.2 "/sbin/entrypoint.sh…" 26 hours ago Up About an hour 0.0.0.0:10083->80/tcp, 0.0.0.0:10443->443/tcp redmine 447844f60cf6 sameersbn/mysql:latest "/sbin/entrypoint.sh…" 26 hours ago Up About an hour 3306/tcp redmine_mysql cf69f887748f sameersbn/memcached:latest "/sbin/entrypoint.sh…" 26 hours ago Up About an hour 11211/udp, 0.0.0.0:11211->11211/tcp redmine_memcached
docker-compose.yml
version: '3.3' services: memcached: image: 'sameersbn/memcached:latest' container_name: redmine_memcached ports: - '11211:11211' restart: always mysql: image: 'sameersbn/mysql:latest' container_name: redmine_mysql environment: - DB_USER=bn_redmine - DB_PASS=password - DB_NAME=redmine volumes: - /srv/docker/redmine/mysql:/var/lib/mysql redmine: image: 'sameersbn/redmine:3.4.2' container_name: redmine depends_on: - mysql - memcached ports: - "10083:80" - "10443:443" volumes: - /srv/docker/redmine/redmine:/home/redmine/data environment: - TZ=Asia/Tokyo # DBの設定 - DB_ADAPTER=mysql2 - DB_HOST=mysql - DB_PORT=3306 # redmineの設定 - DB_USER=bn_redmine - DB_PASS=password - DB_NAME=redmine # redmine http設定 - REDMINE_PORT=10083 - REDMINE_HTTPS=false - REDMINE_CONCURRENT_UPLOADS=2 lb: image: 'bitnami/nginx' container_name: redmine_nginx depends_on: - redmine volumes: - /opt/bitnami/nginx_data:/bitnami/nginx ports: - 80:80 - 443:443
発生している問題・エラーメッセージ(redmineログ)
※IPは適当な値に書き換えています。
Started POST "/projects/test/issues" for 100.64.1.47 at 2019-09-28 01:45:57 +0900 Processing by IssuesController#create as HTML Parameters: {"utf8"=>"?", "authenticity_token"=>"HAX4lSp+2S7HaF8sV8jnu8jfjW0mm+tc/m2OGFEk4yrcaqQq8TMSTfRtFu/zgvgk4AWXHEQGoAxCwI2WuAqrBQ==", "form_update_triggered_by"=>"", "issue"=>{"is_private"=>"0", "tracker_id"=>"1", "subject"=>"aa", "description"=>"", "status_id"=>"1", "priority_id"=>"2", "assigned_to_id"=>"", "parent_issue_id"=>"", "start_date"=>"2019-09-28", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0"}, "issue_template"=>"", "template_search_filter"=>"", "was_default_status"=>"1", "commit"=>"作成", "project_id"=>"test"} Current user: admin (id=1) Rendered mailer/_issue.text.erb (2.6ms) Rendered mailer/issue_add.text.erb within layouts/mailer (3.3ms) Rendered mailer/_issue.html.erb (2.2ms) Rendered mailer/issue_add.html.erb within layouts/mailer (2.9ms) cannot connect to http://100.64.1.30:8065/hooks/tj9p7fkhcp8aichbink1odehoc Failed to open TCP connection to 100.64.1.30:8065 (No route to host - connect(2) for "100.64.1.30" port 8065) Redirected to http://100.64.1.30:10083/issues/5 Completed 302 Found in 1160ms (ActiveRecord: 52.9ms) Started GET "/issues/5" for 100.64.1.47 at 2019-09-28 01:45:58 +0900 Processing by IssuesController#show as HTML Parameters: {"id"=>"5"} Current user: admin (id=1) Rendered issues/_action_menu.html.erb (5.9ms) Rendered issue_relations/_form.html.erb (4.0ms) Rendered issues/_relations.html.erb (5.0ms) Rendered issues/_action_menu.html.erb (4.1ms) Rendered issues/_form_custom_fields.html.erb (0.1ms) Rendered issues/_attributes.html.erb (13.9ms) Rendered issues/_form.html.erb (29.9ms) Rendered attachments/_form.html.erb (2.8ms) Rendered issues/_edit.html.erb (50.5ms) Rendered issues/show.html.erb within layouts/base (118.8ms) Completed 200 OK in 228ms (Views: 141.5ms | ActiveRecord: 55.0ms)```
試したこと
切り分けになっているかわかりませんが、
curlコマンドでホストOSからコンテナに疎通を確認したところ、
redmine(10083)は通りますが、mattermost(8065)には通りませんでした。
# curl --verbose telnet://100.64.1.30:10083 * About to connect() to 100.64.1.30 port 10083 (#0) * Trying 100.64.1.30... * Connected to 100.64.1.30 (100.64.1.30) port 10083 (#0) # # # curl --verbose telnet://100.64.1.30:8065 * About to connect() to 100.64.1.30 port 8065 (#0) * Trying 100.64.1.30... * Connected to 100.64.1.30 (100.64.1.30) port 8065 (#0) HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=utf-8 Connection: close
回答1件
あなたの回答
tips
プレビュー