When I had been installing Kubernetes via conjure-up in my workstation, ended up with somaxconn does not exist and some mongo error.

VM Configuration 2 vCPU,8 GB vRAM and 100 GB vDisk and it is fresh installation.

dee@juju:~$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               1.9G     0  1.9G   0% /dev
tmpfs                              393M  1.5M  391M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  3.9G  2.2G  1.6G  58% /
tmpfs                              2.0G     0  2.0G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda2                          976M  140M  770M  16% /boot
/dev/mapper/ubuntu--vg-lv--0        40G   49M   38G   1% /home
/dev/loop0                          87M   87M     0 100% /snap/core/4917
tmpfs                              393M     0  393M   0% /run/user/1000
/dev/loop1                          55M   55M     0 100% /snap/lxd/8393
tmpfs                              1.0M     0  1.0M   0% /var/snap/lxd/common/ns
/dev/loop2                         105M  105M     0 100% /snap/conjure-up/1019
dee@juju:~$

I've followed the following blog for the installation of the kubernetes with lxd installation on localhost

dee@juju:~/.cache/conjure-up$ which juju
/snap/bin/juju
dee@juju:~/.cache/conjure-up$ juju version
2.4.1-bionic-amd64
dee@juju:~/.cache/conjure-up$  which conjure-up
/snap/bin/conjure-up
dee@juju:~/.cache/conjure-up$  conjure-up --version
]2;conjure-upconjure-up 2.6.1
dee@juju:~/.cache/conjure-up$ which lxc
/snap/bin/lxc
dee@juju:~/.cache/conjure-up$  /snap/bin/lxc config show
config:
  core.https_address: '[::]'
  core.trust_password: true
dee@juju:~/.cache/conjure-up$  /snap/bin/lxc version
Client version: 3.4
Server version: 3.4
dee@juju:~/.cache/conjure-up$  cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

dee@juju:~/.cache/conjure-up$sosreport 

sosreport (version 3.5)

no valid plugins were enabled

Some of the error codes found in .cache/conjure-up/ pwd

 ERROR juju.mongo mongo.go:567 could not set the value of "/proc/sys/net/core/somaxconn" to "16384" because of:   will not set "16384"', '2018-08-18 05:11:14 ERROR juju.mongo mongo.go:567 could not set the value of "/proc/sys/net/core/netdev_max_backlog" to "1000" because of: "/proc/sys/net/core/netdev_max_backlog" does not exist, will not set "1000"', '2018-08-18 05:11:14 ERROR juju.mongo mongo.go:567 could not set the value of "/sys/kernel/mm/transparent_hugepage/enabled" to "never" because of: open /sys/kernel/mm/transparent_hugepage/enabled: permission denied', '2018-08-18 05:11:14 ERROR juju.mongo mongo.go:567 could not set the value of "/sys/kernel/mm/transparent_hugepage/defrag" to "never" because of: open /sys/kernel/mm/transparent_hugepage/defrag: permission denied', '2018-08-18 05:11:14 INFO juju.mongo mongo.go:439 Ensuring mongo server is running; data directory /var/lib/juju; port 37017', '2018-08-18 05:11:14 INFO juju.mongo mongo.go:640 installing [juju-mongodb3.2 juju-mongo-tools3.2]', '2018-08-18 05:11:14 INFO juju.packaging.manager utils.go:64 Running: apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet install juju-mongodb3.2', '2018-08-18 05:12:25 INFO juju.packaging.manager utils.go:64 Running: apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet install juju-mongo-tools3.2', 'ERROR failed to start mongo: error creating oplog files: failed to write to mongo prealloc file "/var/lib/juju/db/local.0": write /var/lib/juju/db/local.0: no space left on device', 'ERROR failed to bootstrap model: subprocess encountered error code 1']
2018-08-18 05:13:05,968 [DEBUG] conjure-up/kubernetes-core - events.py:52 - Setting Error at conjureup/events.py:149
2018-08-18 05:13:05,968 [ERROR] conjure-up/kubernetes-core - events.py:161 - Unhandled exception in <Task finished coro=<BaseBootstrapController.run() done, defined at /snap/conjure-up/1019/lib/python3.6/site-packages/conjureup/controllers/juju/bootstrap/common.py:15> exception=BootstrapError('Unable to bootstrap (cloud type: localhost)',)>

I was in the same boat but finally got past the permission problem.

Using this page, I actually replaced my lxd service with the snapd version. However, I am pretty sure you only need to do these steps below to solve the permission error:

sudo usermod -a -G lxd $USER
newgrp lxd

After you log out and log back in, run this command as a test:

/snap/bin/lxc query --wait -X GET /1.0

If you get a good response and no longer an error connecting to the unix.sock, then it worked.

Not directly related to your question, but consider microk8s from the Kubernetes team at Canonical (https://microk8s.io/) when wanting to deploy Kubernetes on your laptop.

Fast Install - Get a full Upstream Kubernetes system running in under 60 seconds

Safe and Secure - Runs safely on your laptop with state of the art isolation.

Pure Upstream - Binaries directly from the source, delivered to you laptop and configured in seconds!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.