Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cf-push command failed #741

Closed
vimal11592 opened this issue Jan 27, 2016 · 20 comments
Closed

cf-push command failed #741

vimal11592 opened this issue Jan 27, 2016 · 20 comments

Comments

@vimal11592
Copy link

Command
cf push rlcatalyst

    CLI Version
    6.14.1+dc6adf6

    Error
    runtime error: invalid memory address or nil pointer dereference

    Stack Trace
        goroutine 1 [running]:
main.generateBacktrace(0x0, 0x0)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/cli/main/main.go:129 +0xb4
main.handlePanics(0x7f90d5479998, 0xc820478490)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/cli/main/main.go:113 +0x17c
github.com/cloudfoundry/cli/cf/commands/application.(*Push).uploadApp.func1(0x0)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/cli/cf/commands/application/push.go:640 +0x28
github.com/cloudfoundry/cli/cf/commands/application.(*Push).uploadApp(0xc82012ec00, 0xc820458120, 0x24, 0xc820010144, 0x11, 0xc820010144, 0x11, 0xc82061a000, 0x6f2, 0x76d, ...)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/cli/cf/commands/application/push.go:646 +0x2b2
github.com/cloudfoundry/cli/cf/commands/application.(*Push).Execute.func1(0xc820010144, 0x11)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/

    Platform Details
     Ubuntu 14.04.3 64-bit

    Shell
        Terminal
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/112499223.

@dkoper
Copy link

dkoper commented Jan 27, 2016

Hi @vimal11592 ,

Can you provide more details? How much available space do you have in your temp folder?
Can you reproduce it with the latest Edge binary? (there have been some recent changes in this area)
Does it happen all the time with any app and arguments and manifest entries or only a specific set?
Can you share the app with us, if the error only occurs with a particular app?

Cheers,
Dies Koper
CF CLI PM

@vimal11592
Copy link
Author

Hi Dies,

I ran the command df -h .Here is the output :

Filesystem Size Used Avail Use% Mounted on
udev 3.0G 4.0K 3.0G 1% /dev
tmpfs 597M 1.4M 596M 1% /run
/dev/mapper/ubuntu--vg-root 78G 19G 55G 26% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 3.0G 11M 3.0G 1% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 39M 185M 18% /boot
tmpfs 1.0M 52K 972K 6% /var/vcap/data/sys/run
none 443G 76G 367G 18% /vagrant
cgroup 3.0G 0 3.0G 0% /tmp/garden-/cgroup
/dev/loop3 3.7G 79M 3.5G 3%
/var/vcap/store/warden_cpi/persistent_bind_mounts_dir/b8a8c931-6276-4107-758e-00ca2d5768df/48fba356-863f-4336-511c-dfa4d92b4cf0

Manifest file content is :

applications:

  • name: rlcatalyst
    memory:1024k
    host: x.y.z

I ran cf push app_name command so many times.This happen every time.And as
i am using 6.14 and latest is 6.15 ..will it make much difference.

Thanks,
Vimal Mishra

On 27 January 2016 at 16:23, Dies Koper notifications@github.com wrote:

Hi @vimal11592 https://github.com/vimal11592 ,

Can you provide more details? How much available space do you have in your
temp folder?
Can you reproduce it with the latest Edge binary? (there have been some
recent changes in this area)
Does it happen all the time with any app and arguments and manifest
entries or only a specific set?
Can you share the app with us, if the error only occurs with a particular
app?

Cheers,
Dies Koper
CF CLI PM


Reply to this email directly or view it on GitHub
#741 (comment).

@krishicks
Copy link
Contributor

The problem looks like the CLI failing to create a temporary file with the contents of the app to be uploaded.

Your df -h above makes it look like you're running this from within a BOSH-managed VM.

Can you describe the steps you've used to get onto the machine that you ran cf push from?

@vimal11592
Copy link
Author

Hi kris,

Below are the following steps that i followed :-

  1. vagrant ssh
  2. sudo apt-get install git wget
  3. wget -O spiff.zip
    https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.7/...
    https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.7/spiff_linux_amd64.zip
  4. unzip spiff.zip
  5. export PATH=pwd:$PATH
  6. git clone https://github.com/cloudfoundry/bosh-lite
  7. git clone https://github.com/cloudfoundry/cf-release (bundler
    installation in this folder)
  8. export CF_RELEASE_DIR=pwd/cf-release
  9. cd bosh-lite
  10. bin/provision_cf
    11.cf api https://api.bosh-lite.com --skip-ssl-validation
    12.cf login
    13.cf push

I followed all the steps on the same machine where cf is depployed.

Thanks,
Vimal Mishra

On 29 January 2016 at 02:03, Kris Hicks notifications@github.com wrote:

The problem looks like the CLI failing to create a temporary file with the
contents of the app to be uploaded.

Your df -h above makes it look like you're running this from within a
BOSH-managed VM.

Can you describe the steps you've used to get onto the machine that you
ran cf push from?


Reply to this email directly or view it on GitHub
#741 (comment).

@krishicks
Copy link
Contributor

You're trying to push to a bosh-lite running within a Vagrant VM, which may be problematic.

The typical use case for bosh-lite is to have it running on a VM directly on the host machine, say from your Windows/Linux/Mac, not from within another VM.

I'd try the above steps again, but without vagrant ssh as your first step.

There is a bug in the CLI that I can see, which is that we're not properly handling the error that occurs if we cannot create the tempfile. This problem exists in the current version of the code, as well.

If we handle that error better you'll not get a panic, and instead we'll be able to see the real error.

@vimal11592
Copy link
Author

Hi,

Thanks for the reply.
I am doing vagrant ssh from my linux (ubuntu) after that i followed those
steps.

Thanks,
Vimal Mishra

On 30 January 2016 at 03:14, Kris Hicks notifications@github.com wrote:

You're trying to push to a bosh-lite running within a Vagrant VM, which
may be problematic.

The typical use case for bosh-lite is to have it running on a VM directly
on the host machine, say from your Windows/Linux/Mac, not from within
another VM.

I'd try the above steps again, but without vagrant ssh as your first step.

There is a bug in the CLI that I can see, which is that we're not properly
handling the error that occurs if we cannot create the tempfile. This
problem exists in the current version of the code, as well.

If we handle that error better you'll not get a panic, and instead we'll
be able to see the real error.


Reply to this email directly or view it on GitHub
#741 (comment).

@krishicks
Copy link
Contributor

I would do the push from your Linux box, not from the Vagrant VM. Do all the same steps, but without vagrant ssh. Let me know how it goes.

@vimal11592
Copy link
Author

I follwed all the steps again and tried to set the target from my linux box
..now i am facing the problem to set the target ..

Error :

rle0249@rle0249-Latitude-3450:~$ cf api https:-api.bosh-lite.com
--skip-ssl-validation
Setting api endpoint to https:-api.bosh-lite.com...
FAILED
Error performing request: Get https-api.bosh-lite.com-v2-info: read
tcp 192.168.152.27:36204->10.244.0.34:443: read: connection reset by
peer

Thanks,
Vimal Mishra

On 31 January 2016 at 15:49, Kris Hicks notifications@github.com wrote:

I would do the push from your Linux box, not from the Vagrant VM. Do all
the same steps, but without vagrant ssh. Let me know how it goes.


Reply to this email directly or view it on GitHub
#741 (comment).

@krishicks
Copy link
Contributor

Your api command has a broken target. You want https://api.bosh-lite.com, not https:-api.bosh-lite.com. You'll also need to run bin/add-route if you haven't already from within the bosh-lite directory.

@krishicks
Copy link
Contributor

@vimal11592 We've published a new edge release that contains a proper handling of the error returned by trying to create a temporary file. Please download it from https://github.com/cloudfoundry/cli#downloads and try again.

@vimal11592
Copy link
Author

Thank you . i will start using it.

Thanks,
Vimal Mishra

On 3 February 2016 at 03:29, Kris Hicks notifications@github.com wrote:

@vimal11592 https://github.com/vimal11592 We've published a new edge
release that contains a proper handling of the error returned by trying to
create a temporary file. Please download it from
https://github.com/cloudfoundry/cli#downloads and try again.


Reply to this email directly or view it on GitHub
#741 (comment).

@krishicks
Copy link
Contributor

@vimal11592, Do you have an update?

@vimal11592
Copy link
Author

Hi Kris,

I have tried with cf version 15 also but till not able to solve the issue.

Please here is the process which i have followed .Please it would be great
help if you can take a look becoause I am very new to this.

Platform Detail :-

  1. I am using Linux Ubuntu (v -15.10)
  2. Installed vagrant version 1.6.3
  3. Virtual Box version 4.2.36r104064
  4. Downloaded bosh-lite from using git (git clone
    https://github.com/cloudfoundry/bosh-lite)
  5. cd bosh-lite
  6. vagrant up (Please find the attached vagrant file)
  7. vagrant ssh
  8. wget -O spiff.zip
    https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.7/
    https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.7/spiff_linux_amd64.zip
  9. unzip spiff.zip
  10. export PATH=pwd:$PATH
  11. git clone https://github.com/cloudfoundry/bosh-lite
  12. git clone https://github.com/cloudfoundry/cf-release
  13. export CF_RELEASE_DIR=pwd/cf-release
  14. Installed gem - sudo apt-get install gem
  15. cd cf-release
  16. gem install bundler
  17. bundle install
  18. cd bosh-lite/bin
  19. ./provision_cf
  20. ./add-route

After following all the above steps I tried to set cf target from my
ubuntu(15.10) machine with cf version 6.15 I am getting following error :

rle0249@rle0249-Latitude-3450:~/catalyst/D4D$ cf api
https://api.bosh-lite.com --skip-ssl-validation

Setting api endpoint to https://api.bosh-lite.com...
FAILED
Error performing request: Get https://api.bosh-lite.com/v2/info: read tcp
192.168.152.27:41582->10.244.0.34:443: read: connection reset by peer

When i tried to setup the target from the vagrant machine I am bale to set
target successfully.But when I am trying to push the application I am
getting error.(Please find the attached file error.txt for info).

My questions are

  1. "From where I need to set the target from inside vagrant machine or
    from my Ubuntu machine".
  2. When I shutdown my machine vagrant and Ubuntu both and turn on again
    "bosh vms" command shows all the machine unresponsive and I am not able to
    recreate machine or reboot.(I dont have error log right now sorry!!!)

Can you please help me out with the issues.And thanks for replying .

Thank You So Much!!!!

Thanks,
Vimal Mishra

On 9 February 2016 at 09:42, Kris Hicks notifications@github.com wrote:

@vimal11592 https://github.com/vimal11592, Do you have an update?


Reply to this email directly or view it on GitHub
#741 (comment).

cf push RLCatalyst
Using manifest file /home/vagrant/D4D/manifest.yml

Updating app RLCatalyst in org RelevanceLab / space RLCatalyst as admin...
OK

Uploading RLCatalyst...

Something unexpected happened. This is a bug in cf.

Please re-run the command that caused this exception with the environment
variable CF_TRACE set to true.

Also, please update to the latest cli and try the command again:
https://github.com/cloudfoundry/cli/releases

Please create an issue at: https://github.com/cloudfoundry/cli/issues

Include the below information when creating the issue:

    Command
    cf push RLCatalyst

    CLI Version
    6.15.0+fa1bfe2

    Error
    runtime error: invalid memory address or nil pointer dereference

    Stack Trace
        goroutine 1 [running]:
main.generateBacktrace(0x0, 0x0)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/cli/main/main.go:129 +0xb4
main.handlePanics(0x7f948c2ee9a8, 0xc8204644e0)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/cli/main/main.go:113 +0x17c
github.com/cloudfoundry/cli/cf/commands/application.(*Push).uploadApp.func1(0x0)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/cli/cf/commands/application/push.go:664 +0x28
github.com/cloudfoundry/cli/cf/commands/application.(*Push).uploadApp(0xc82033cf00, 0xc820450750, 0x24, 0xc8203942e0, 0x11, 0xc820010144, 0x11, 0xc820988000, 0x6f2, 0x76d, ...)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/cli/cf/commands/application/push.go:670 +0x2b2
github.com/cloudfoundry/cli/cf/commands/application.(*Push).Execute.func1(0xc8203942e0, 0x11)
    /var/vcap/data/gocd-agent/pipelines/Linux64-Unit-Tests/src/github.com/cloudfoundry/

    Your Platform Details
    e.g. Mac OS X 10.11, Windows 8.1 64-bit, Ubuntu 14.04.3 64-bit

    Shell
    e.g. Terminal, iTerm, Powershell, Cygwin, gnome-terminal, terminator

@faizi1407
Copy link

i had a similar issue, Just use sudo before cf . So the command to push application would be "sudo cf push [App-name]

@vimal11592
Copy link
Author

Thanks faizi.

It helped me .Now I am able to push app in cf.

Thanks,
Vimal Mishra

On 15 February 2016 at 18:21, faizi1407 notifications@github.com wrote:

i had a similar issue, Just use sudo before cf . So the command to push
application would be "sudo cf push [App-name]


Reply to this email directly or view it on GitHub
#741 (comment).

@faizi1407
Copy link

Good that this solved for you, now i am facing a challenge in Log aggregator as bosh status shows VM's failing.

@krishicks
Copy link
Contributor

@vimal11592,

You shouldn't be performing any steps from within the vagrant VM. There is no need to vagrant ssh.

You should be able to do the following after installing Vagrant, Virtualbox, and spiff on your host Ubuntu machine (not inside a VM):

  1. git clone https://github.com/cloudfoundry/cf-release
  2. export CF_RELEASE_DIR=$PWD/cf-release
  3. git clone https://github.com/cloudfoundry/bosh-lite
  4. cd bosh-lite
  5. vagrant up
  6. bin/provision-cf
  7. bin/add-route
  8. cf target https://api.bosh-lite.com --skip-ssl-validation

Prior to shutting down your computer you should vagrant suspend from within the directory where you cloned bosh-lite as that will suspend the VM (snapshot it to disk) rather than halting the VM, which shuts it down entirely. Shutting down the VM while BOSH is running inside it will cause BOSH to lose track of those VMs. To recover from that you'd have to bosh cck and recreate the VMs it marks as missing.

@vimal11592
Copy link
Author

Hi Kris,

Thanks !!!

It really helped me ,Now I am able to set the target and push application
in cf.
Thank You.

Thanks,
Vimal Mishra

On 15 February 2016 at 21:49, Kris Hicks notifications@github.com wrote:

@vimal11592 https://github.com/vimal11592,

You shouldn't be performing any steps from within the vagrant VM. There is
no need to vagrant ssh.

You should be able to do the following after installing Vagrant,
Virtualbox, and spiff on your host Ubuntu machine (not inside a VM):

  1. git clone https://github.com/cloudfoundry/cf-release
  2. export CF_RELEASE_DIR=$PWD/cf-release
  3. git clone https://github.com/cloudfoundry/bosh-lite
  4. cd bosh-lite
  5. vagrant up
  6. bin/provision-cf
  7. bin/add-route
  8. cf target https://api.bosh-lite.com --skip-ssl-validation

Prior to shutting down your computer you should vagrant suspend from
within the directory where you cloned bosh-lite as that will suspend the VM
(snapshot it to disk) rather than halting the VM, which shuts it down
entirely. Shutting down the VM while BOSH is running inside it will cause
BOSH to lose track of those VMs. To recover from that you'd have to bosh
cck and recreate the VMs it marks as missing.


Reply to this email directly or view it on GitHub
#741 (comment).

@krishicks
Copy link
Contributor

Glad to hear it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants