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

FAILED to start cf dev #124

Closed AdamJel closed 4 years ago

AdamJel commented 4 years ago

Hello, I have a trouble with starting the dev using cf dev start.

What I did is a complete fresh install of cf onto Windows 10. I installed the dev plugin and started using command cf dev start. That worked and process successfully started. But I realized that I did not set the environment variable CFDEV_HOME and thus used wrong folder. Then I Ctrl-C the process and (unwisely) deleted .cfdev folder.

Since then, I get error when I try to start the cf dev again.

I already reinstalled Hyper-V and cf completely, but with no luck. The error I get is:

FAILED
cf dev start: stopping cfdev: cf dev stop: failed to stop the VM: failed to stop vpnkit: Failed to execute C:\Users\jelinek\.cfdev\winservice\org.cloudfoundry.cfdev.vpnkit\org.cloudfoundry.cfdev.vpnkit.exe, [C:\Users\jelinek\.cfdev\winservice\org.cloudfoundry.cfdev.vpnkit\org.cloudfoundry.cfdev.vpnkit.exe uninstall]: exec: "C:\\Users\\jelinek\\.cfdev\\winservice\\org.cloudfoundry.cfdev.vpnkit\\org.cloudfoundry.cfdev.vpnkit.exe": file does not exist:

Any advice, please?

cf-gitbot commented 4 years ago

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

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

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

aemengo commented 4 years ago

I'd recommend that you do a full reboot. Then delete the .cfdev folder. And then you should be able to safely perform a cf dev start (with / without the CFDEV_HOME variable set).

AdamJel commented 4 years ago

I'd recommend that you do a full reboot. Then delete the .cfdev folder. And then you should be able to safely perform a cf dev start (with / without the CFDEV_HOME variable set).

This doesnt work. As I stated - after not only full reboot, but after reinstalling all components (and reboot and .cfdev folder deletion), cf dev start fails into the error above.

aemengo commented 4 years ago

I see.

Are you familiar with the “Hyper-V Manager“ application? Could you open it and see if there is a VM titled “cfdev” there? If so, please delete it and try again.

AdamJel commented 4 years ago

I see.

Are you familiar with the “Hyper-V Manager“ application? Could you open it and see if there is a VM titled “cfdev” there? If so, please delete it and try again.

I just checked, there is no VM at all. So I deleted the server for current user. But cf dev start still fails the same way.

If there is none VM, but the cf dev start tries to stop it anyway - I assume, it gets wrong information about the status of VMs on pc. But how can this be persistent over reinstalling the cf?

aemengo commented 4 years ago

Could you perform Get-Service | findstr vpnkit on the Powershell command line? Do you see anything? If so, could you please remove the service and try again?

AdamJel commented 4 years ago

Could you perform Get-Service | findstr vpnkit on the Powershell command line? Do you see anything? If so, could you please remove the service and try again?

There was stopped service:

Get-Service | findstr vpnkit
Stopped  org.cloudfoundr... org.cloudfoundry.cfdev.vpnkit

So I removed it:

Remove-Service -Name "org.cloudfoundry.cfdev.vpnkit"
Get-Service "*vpnkit*" | Sort-Object status
>

It seems to work. I am downloading resources right now. Ok - thank you so much! 👍

PS: In order to use Remove-Service command, I needed to install PowerShell6. I did it by first installing .NET core SDK using chocolatey: choco install dotnetcore-sdk and second - installing PS6 using dotnet tool install --global PowerShell.