LoginSignup
0
2

More than 5 years have passed since last update.

Concourse CIをVagrantでインストールでハマっている

Posted at

Concourse CIを軽く試して見るためにVagrantでインストールしたけどアクセスできなかった。
未だにアクセスできてないです。なので、同じ問題でここに来た人(いないと思いますが)には申し訳ないですが、解決方法は書かれていません。

環境

  • ホストOS Windows 10
  • Vagrant 1.9.2
  • VirtualBox 5.1.14
  • Concourse CI 2.7.0

前提

ホストOSにVirutalBoxとVagrantがインストールされている。

手順

concourse ciのトップページにあるGetting Started Takes 5 Minutesにしたがって、Vagrant Upをした。

$ mkdir concourse
$ cd concourse
$ vagrant init concourse/lite

作成されたVagrantfileのプライベートネットワークのIPアドレスを変更した。

変更前

  # config.vm.network "private_network", ip: "192.168.33.10"

変更後

  config.vm.network "private_network", ip: "192.168.33.12"
$ vagrant up

途中でVirtualBoxがネットワークアダプタをインストールするみたいなメッセージが2度ほど出た。
多分ホストオンリーアダプターをインストールしたんだと思う。

Web Serverが192.168.100.4:8080で動作しているというので、ブラウザでアクセスしたところ、2017-03-28_11h07_17.png
と表示される。

ネットで調べてもこんなとこで引っかかっている人はいないみたいだ。

調べたこと

ホストOSからpingをした。到達しているようだ。

$ ping 192.168.100.4

192.168.100.4 に ping を送信しています 32 バイトのデータ:
192.168.100.4 からの応答: バイト数 =32 時間 <1ms TTL=64
192.168.100.4 からの応答: バイト数 =32 時間 =1ms TTL=64
192.168.100.4 からの応答: バイト数 =32 時間 =1ms TTL=64
192.168.100.4 からの応答: バイト数 =32 時間 =1ms TTL=64

192.168.100.4 の ping 統計:
    パケット数: 送信 = 4、受信 = 4、損失 = 0 (0% の損失)、
ラウンド トリップの概算時間 (ミリ秒):
    最小 = 0ms、最大 = 1ms、平均 = 0ms

もしや8080ポートがブロックされていると思い、ゲストOSにsshで入り、firewallが動作しているか?確認したところ、ブロックはされていない模様。

$ vagrant ssh
$ sudo ufw status
Status: inactive
$ sudo iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
w--input   all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
w--forward  all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain w--default (0 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED

Chain w--forward (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere

Chain w--input (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere

本当に192.168.100.4か確かめてみたところ、ちゃんとeth1が192.168.100.4になっている。

$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth1
iface eth1 inet static
      address 192.168.100.4
      netmask 255.255.255.0
#VAGRANT-END

#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth2
iface eth2 inet static
      address 192.168.33.12
      netmask 255.255.255.0
#VAGRANT-END

ちゃんとここに届いているかを確認するために、ゲストOSでtcpdumpを使用してから、ホストOSでhttp://192.168.100.4:8080/ にアクセスしてみた。ブラウザは前回と変わらずAccess Deniedが表示され、コマンドラインは反応なし。
つまり、到達していないってことか。

$ sudo tcpdump -i eth1 port 8080
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
0
2
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
0
2