我在CentOS x64 7.2上使用Vagrant 1.8.1和VirtualBox 5.0運行pcf dev 0.15.0。使用CF CLI連接到PCF Dev時出現'FAILED'
當我做了vagrant up
看來(我),一切都很好地引導了(儘管它需要一些分鐘從0至48中運行的服務來獲得)
PCF Dev has reserved 32 GB out of 46 GB total system memory.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'pcfdev/pcfdev' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
default: Running: inline script
==> default: stdin: is not a tty
==> default: Waiting for services to start...
==> default: 0 out of 48 running
==> default: 0 out of 48 running
==> default: 0 out of 48 running
==> default: 0 out of 48 running
==> default: 0 out of 48 running
==> default: 37 out of 48 running
==> default: 48 out of 48 running
==> default: PCF Dev is now running.
==> default: To begin using PCF Dev, please run:
==> default: cf login -a api.local.pcfdev.io --skip-ssl-validation
==> default: Email: admin
==> default: Password: admin
我運行這個不變的,唯一的改變是我設置VM_MEMORY
,因爲我想使用更多的內存(可以在日誌文件的第一行看到結果)
當我嘗試使用cf login -a api.local.pcfdev.io --skip-ssl-validation -v
登錄時,無法解析,所以我使用IP地址那ifconfig
告訴我後我vagrant ssh
進入框中:
eth0 Link encap:Ethernet HWaddr 08:00:27:6c:38:a8
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6c:38a8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:823 errors:0 dropped:0 overruns:0 frame:0
TX packets:669 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:82923 (82.9 KB) TX bytes:83850 (83.8 KB)
eth1 Link encap:Ethernet HWaddr 08:00:27:02:34:18
inet addr:192.168.11.11 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe02:3418/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2955 (2.9 KB) TX bytes:4782 (4.7 KB)
這是結果,當我與CF連接時使用192.168.11.11
:
API endpoint: 192.168.11.11
REQUEST: [2016-06-10T10:24:37+02:00]
GET /v2/info HTTP/1.1
Host: 192.168.11.11
Accept: application/json
Content-Type: application/json
User-Agent: go-cli 6.18.1+a1103f0/linux
RESPONSE: [2016-06-10T10:24:37+02:00]
HTTP/1.1 404 Not Found
Content-Length: 65
Content-Type: text/plain; charset=utf-8
Date: Fri, 10 Jun 2016 08:24:37 GMT
X-Cf-Routererror: unknown_route
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: ba181cbd-aaf3-43cf-4169-e2d7e42d19a5
404 Not Found: Requested route ('192.168.11.11') does not exist.
REQUEST: [2016-06-10T10:24:37+02:00]
GET /v2/info HTTP/1.1
Host: 192.168.11.11
Accept: application/json
Content-Type: application/json
User-Agent: go-cli 6.18.1+a1103f0/linux
RESPONSE: [2016-06-10T10:24:37+02:00]
HTTP/1.1 404 Not Found
Content-Length: 65
Content-Type: text/plain; charset=utf-8
Date: Fri, 10 Jun 2016 08:24:37 GMT
X-Cf-Routererror: unknown_route
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 69d68148-17ca-4434-4562-4a6fd90d7984
404 Not Found: Requested route ('192.168.11.11') does not exist.
FAILED
Server error, status code: 404, error code: 0, message:
它看起來利剋剋其他人有類似的問題在Windows太:https://github.com/pivotal-cf/pcfdev/issues/68
謝謝,我做了一個快速測試,通過操作本地主機文件映射api.local.pcfdev.io該IP。你有什麼建議?我曾經看到過一個文檔,顯示如何「操作」dns,並將* .local.pcfdev.io映射到該IP地址。這是要走的路嗎? – Marged
爲我的答案增加了一些選項。 –
你是對的,我的問題是由DNS造成的。我仍然在與dnsmasq鬥爭,但這是一個不同的故事 – Marged