cloudfoundry-attic / cfdev

A fast and easy local Cloud Foundry experience on native hypervisors, powered by LinuxKit with VPNKit
Apache License 2.0
227 stars 64 forks source link

"bosh logs -d cf --follow" and "bosh ssh" failing #96

Closed drnic closed 5 years ago

drnic commented 5 years ago

Sorry if I'm doing this wrong. Should I be able to bosh logs --follow into cfdev's bosh deployments? Update: bosh ssh similarly fails

The commands below were run whilst cf dev start was still in progress:

Deploying CF...
  Progress: 10 of 15 (17m18s)
$ eval "$(cf dev bosh env)"
$ bosh logs -d cf --follow

Using environment '10.144.0.2' as client 'admin'

Using deployment 'cf'

Task 181. Done
uaa/a2b0e1ec-e286-41c7-ab90-b9a67acf4744: stderr | ssh_exchange_identification: Connection closed by remote host
uaa/a2b0e1ec-e286-41c7-ab90-b9a67acf4744: stderr | ssh_exchange_identification: Connection closed by remote host
scheduler/e89c59bc-5e30-4f5e-b551-b9eb1c20a793: stderr | ssh_exchange_identification: Connection closed by remote host
scheduler/e89c59bc-5e30-4f5e-b551-b9eb1c20a793: stderr | ssh_exchange_identification: Connection closed by remote host
singleton-blobstore/e81af3ad-c209-49d5-907d-21e73b93a95a: stderr | Connection closed by 10.144.0.2 port 22
singleton-blobstore/e81af3ad-c209-49d5-907d-21e73b93a95a: stderr | ssh_exchange_identification: Connection closed by remote host
router/4156f12e-5542-40c6-84e9-a86cac364ff3: stderr | Connection closed by 10.144.0.2 port 22
router/4156f12e-5542-40c6-84e9-a86cac364ff3: stderr | ssh_exchange_identification: Connection closed by remote host
cc-worker/1320e046-9f29-4708-9455-c02bb2782f6b: stderr | Connection closed by 10.144.0.2 port 22
cc-worker/1320e046-9f29-4708-9455-c02bb2782f6b: stderr | ssh_exchange_identification: Connection closed by remote host
doppler/ba93dc9f-b9b9-47cc-b425-f36783c472ae: stderr | Connection closed by 10.144.0.2 port 22
doppler/ba93dc9f-b9b9-47cc-b425-f36783c472ae: stderr | ssh_exchange_identification: Connection closed by remote host
credhub/8a3a0dd5-729d-47b3-89a7-ec028b979be9: stderr | Connection closed by 10.144.0.2 port 22
credhub/8a3a0dd5-729d-47b3-89a7-ec028b979be9: stderr | ssh_exchange_identification: Connection closed by remote host
diego-api/5ba978ed-8ca8-41ab-a4bf-6ff9b5b11ef8: stderr | Connection closed by 10.144.0.2 port 22
diego-api/5ba978ed-8ca8-41ab-a4bf-6ff9b5b11ef8: stderr | ssh_exchange_identification: Connection closed by remote host
adapter/16e3dd47-91a3-4c60-ac42-3ab671a19e69: stderr | Connection closed by 10.144.0.2 port 22
log-api/0b202664-a276-4fa5-b1a8-8e27cd500076: stderr | Connection reset by 10.144.0.2 port 22
adapter/16e3dd47-91a3-4c60-ac42-3ab671a19e69: stderr | ssh_exchange_identification: Connection closed by remote host
log-api/0b202664-a276-4fa5-b1a8-8e27cd500076: stderr | ssh_exchange_identification: Connection closed by remote host
database/ed2a242c-6e45-49b9-9cf5-6c4ac6594287: stderr | Connection closed by 10.144.0.2 port 22
database/ed2a242c-6e45-49b9-9cf5-6c4ac6594287: stderr | ssh_exchange_identification: Connection closed by remote host
api/1875c318-afe5-43b8-bca4-e68b923114c0: stderr | Connection closed by 10.144.0.2 port 22
api/1875c318-afe5-43b8-bca4-e68b923114c0: stderr | ssh_exchange_identification: Connection closed by remote host
nats/4cb256ef-4d19-46ce-9605-b7c6249a1f07: stderr | Connection closed by 10.144.0.2 port 22
nats/4cb256ef-4d19-46ce-9605-b7c6249a1f07: stderr | ssh_exchange_identification: Connection closed by remote host
diego-cell/2ed4f43b-c1bf-4373-9dd6-3a21e90d8bcc: stderr | Connection closed by 10.144.0.2 port 22
diego-cell/2ed4f43b-c1bf-4373-9dd6-3a21e90d8bcc: stderr | ssh_exchange_identification: Connection closed by remote host

Running follow over non-interactive SSH:
  14 errors occurred:
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.7 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.11 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.8 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.34 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.10 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.12 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.15 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.6 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.4 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.14 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.5 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.9 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.3 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key229292210 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts993965161 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.13 -l bosh_232cb7af3a2f48b sudo bash -c 'exec tail -F /var/vcap/sys/log/api/*.log'', stdout: '', stderr: '': exit status 255

Exit code 1

bosh ssh also fails:

$ bosh ssh -d cf uaa
Using environment '10.144.0.2' as client 'admin'

Using deployment 'cf'

Task 255. Done
Connection closed by 10.144.0.2 port 22
ssh_exchange_identification: Connection closed by remote host

Running SSH:
  1 error occurred:
    * Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.bosh/tmp/ssh-priv-key575252762 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/drnic/.bosh/tmp/ssh-known-hosts148135345 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l jumpbox 10.144.0.2 -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/drnic/.cfdev/state/bosh/jumpbox.key 10.144.0.7 -l bosh_59f4ee107a4748b', stdout: '', stderr: '': exit status 255
cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/165757825

The labels on this github issue will be updated when the story is started.

aemengo commented 5 years ago

The bosh commands that you mentioned should work fine. Perhaps you had some conflicting BOSH_ environment variables in your terminal session.

Please try those commands again in a fresh terminal session.