cloudfoundry-attic / cfdev

A fast and easy local Cloud Foundry experience on native hypervisors, powered by LinuxKit with VPNKit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unexpected end of JSON input

ClumsyPotato opened this issue · comments

Hey i am trying to start pcfdev version 1.2.0 on linux

I downloaded the .tar file and i am executing it with cf dev start -f <.tar>

However it fails after some time when trying to fetch the VM Adress with the error message unexpected end of JSON input

I guess the vm started put i cant access it via api.local.pcfdev.io

cf version 6.43.0+815ea2f3d.2019-02-20
cfdev version 0.0.15
virtualbox version 5.2

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

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

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

@ClumsyPotato As mentioned in our README.md, Linux support requires QEMU and Libvirt, did you install that already?

@aemengo
yep i did

Looks like there was issue reading the libvirt interface status file. By default we try to use the virbr0 interface.

Could read the file at /var/lib/libvirt/dnsmasq/virbr0.status and see if it contains valid json? It should be written as root so you might wanna do the following (just as the CLI is doing):

sudo -S cat /var/lib/libvirt/dnsmasq/virbr0.status

Although the file exists its empty.
I guess that can be considered as invalid :P

@ClumsyPotato I'm wondering if the CF Dev process even ran at all (if the VM is even running).

  1. Does the following command return anything? ps aux | grep linuxkit

  2. Are there any files that can be found in: ~/.cfdev/log?

ps aux | grep linuxkit output 
root       948  0.0  0.0 481748  5040 ?        Ssl  09:31   0:00 /home/atm/.cfdev/daemons/linuxkit
 ~/.cfdev/log/linuxkit.log
---

Unable to find qemu-img within the $PATH. Using a container
Using existing disk [/home/atm/.cfdev/state/linuxkit/disk.qcow2] format qcow2
qemu-system-x86_64: -netdev tap,id=t0,ifname=cfdevtap0,script=no,downscript=no: could not open /dev/net/tun: No such file or directory
time="2019-04-26T09:31:49+02:00" level=fatal msg="exit status 1

@ClumsyPotato The log error seems pretty clear. qemu-img wasn't installed, and thus the start process is continuing down a provisioning path that is not supported.

Please install QEMU for your environment and then try again. For ubuntu systems, the procedure is as simple as sudo apt install qemu-kvm

It already was installed but the qemu-img binary was located inside a weird directory.
Once i copied it inside /usr/local/bin eveything worked fine.
Thanks for your help ^^