Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

LXD - error: json: cannot unmarshal string into Go value of type int64

$
0
0
Have successfully installed LXD on Ubuntu Server 15.10. However, tried running "lxc image list images:" without success - on two different clean server installations.

The error this command returns is:
"error: json: cannot unmarshal string into Go value of type int64".

The getting started documentation is simple and clear - there isn't much to get wrong.

  1. logged into server with non-root user.
  2. ran "sudo apt-get update"
  3. ran "sudo apt-get upgrade"
  4. ran "sudo apt-get install lxd"
    successful LXD installation.
  5. login/logout to refresh group membership.
  6. ran "lxc remote add images images.linuxcontainers.org" (no sudo from this point onward).
    certificate was created successfully and was advised:
    "If this is your first run, you will need to import images using the 'lxd-images' script.
    For example: 'lxd-images import ubuntu --alias ubuntu'
    ."
    - the advice in this return differed from the how-to and I took the return as authoritative, especially as my previous attempt following the how-to caused the error listed, as happened again in this procedure.
  7. ran "lxd-images import ubuntu --alias ubuntu"
    successful download and validation of the GPG key for "http://cloud-images.ubuntu.com"
    successful connection and start of image download...
  8. at this point I cancelled the download (ctrl-c), as I wanted to move on to see if either ubuntu core or coreos was available in the library.
  9. ran "lxc image list images:" which resulted in the same error as on previous server:
    "error: json: cannot unmarshal string into Go value of type int64".


It is strange that the image library cannot be viewed in a browser so that the right image can be found and its name typed directly into the CLI.

The inevitable conclusion is that either the how-to is missing something, or the technology isn't ready for the method described in the how-to. Has anyone encountered this problem? If you haven't, and you were immediately able to list available images, please feel free to share!

A fix for this issue has been to run the following sequence, which did not work for me:

  1. run "sudo apt-get install lxc", returned 'lxc is already the newest version.'
  2. run "sudo apt-get dist-upgrade", performed new installations and upgrades of linux-headers, linux-image, linux-signed-image files only.

Someone provided me with image names and aliases, so using "lxd-images import ubuntu xenial --alias ubuntu/xenial/amd64" I was able to download an image and create the first container. Everything else seems to be working.

Thanks everyone.

Cheers,
nick

Viewing all articles
Browse latest Browse all 4211

Trending Articles