I have created a new Ubuntu 16.04 droplet on DigitalOcean and followed those guides respectively to install kubeadm (and its dependencies):
https://docs.docker.com/engine/installation/
https://kubernetes.io/docs/tasks/tools/install-kubectl/
https://kubernetes.io/docs/setup/independent/install-kubeadm/
However, when I run kubeadm init, I get:
root#ubuntu-512mb-nyc3-01:~# kubeadm init
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.3
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks
[preflight] WARNING: docker version is greater than the most recently validated version. Docker version: 17.06.0-ce. Max validated version: 1.12
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)
[certificates] Generated CA certificate and key.
[certificates] Generated API server certificate and key.
[certificates] API Server serving cert is signed for DNS names [ubuntu-512mb-nyc3-01 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 165.227.70.168]
[certificates] Generated API server kubelet client certificate and key.
[certificates] Generated service account token signing key and public key.
[certificates] Generated front-proxy CA certificate and key.
[certificates] Generated front-proxy client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/scheduler.conf"
[apiclient] Created API client, waiting for the control plane to become ready
I even tried to create a new CentOS 7 droplet to apply the different instructions for CentOS, and I got the same problem.
Here's the full history for what I applied since I created the VPS:
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-87-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
0 packages can be updated.
0 updates are security updates.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Changing password for root.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
root#ubuntu-512mb-nyc3-01:~# apt update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://nyc2.mirrors.digitalocean.com/ubuntu xenial InRelease
Get:3 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports InRelease [102 kB]
Get:5 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/main Sources [868 kB]
Get:6 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/restricted Sources [4,808 B]
Get:7 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/universe Sources [7,728 kB]
Get:8 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/multiverse Sources [179 kB]
Get:9 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main Sources [265 kB]
Get:10 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/restricted Sources [3,012 B]
Get:11 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/universe Sources [166 kB]
Get:12 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/multiverse Sources [7,232 B]
Get:13 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 Packages [593 kB]
Get:14 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main Translation-en [240 kB]
Get:15 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/universe amd64 Packages [511 kB]
Get:16 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/universe Translation-en [199 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/main Sources [86.5 kB]
Get:18 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports/main Sources [3,312 B]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2,604 B]
Get:21 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [38.2 kB]
Get:20 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports/universe Sources [4,400 B]
Get:22 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports/universe amd64 Packages [5,804 B]
Get:23 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1,144 B]
Get:24 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [341 kB]
Get:25 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [144 kB]
Get:26 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [155 kB]
Get:27 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [79.4 kB]
Get:28 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [2,752 B]
Fetched 11.9 MB in 3s (3,327 kB/s)
ade
Reading package lists... Done
Building dependency tree
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
root#ubuntu-512mb-nyc3-01:~# apt pgrade
E: Invalid operation pgrade
root#ubuntu-512mb-nyc3-01:~# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
grub-pc-bin
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
linux-headers-4.4.0-91 linux-headers-4.4.0-91-generic
linux-image-4.4.0-91-generic
The following packages will be upgraded:
git git-man linux-headers-generic linux-headers-virtual
linux-image-virtual linux-virtual
6 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 36.5 MB of archives.
After this operation, 145 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 git-man all 1:2.7.4-0ubuntu1.2 [736 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 git amd64 1:2.7.4-0ubuntu1.2 [3,163 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-headers-4.4.0-91 all 4.4.0-91.114 [9,876 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-headers-4.4.0-91-generic amd64 4.4.0-91.114 [791 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-image-4.4.0-91-generic amd64 4.4.0-91.114 [21.9 MB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-virtual amd64 4.4.0.91.96 [1,780 B]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-image-virtual amd64 4.4.0.91.96 [2,270 B]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-headers-virtual amd64 4.4.0.91.96 [1,760 B]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-headers-generic amd64 4.4.0.91.96 [2,262 B]
Fetched 36.5 MB in 0s (40.0 MB/s)
(Reading database ... 54209 files and directories currently installed.)
Preparing to unpack .../git-man_1%3a2.7.4-0ubuntu1.2_all.deb ...
Unpacking git-man (1:2.7.4-0ubuntu1.2) over (1:2.7.4-0ubuntu1.1) ...
Preparing to unpack .../git_1%3a2.7.4-0ubuntu1.2_amd64.deb ...
Unpacking git (1:2.7.4-0ubuntu1.2) over (1:2.7.4-0ubuntu1.1) ...
Selecting previously unselected package linux-headers-4.4.0-91.
Preparing to unpack .../linux-headers-4.4.0-91_4.4.0-91.114_all.deb ...
Unpacking linux-headers-4.4.0-91 (4.4.0-91.114) ...
Selecting previously unselected package linux-headers-4.4.0-91-generic.
Preparing to unpack .../linux-headers-4.4.0-91-generic_4.4.0-91.114_amd64.deb ...
Unpacking linux-headers-4.4.0-91-generic (4.4.0-91.114) ...
Selecting previously unselected package linux-image-4.4.0-91-generic.
Preparing to unpack .../linux-image-4.4.0-91-generic_4.4.0-91.114_amd64.deb ...
Done.
Unpacking linux-image-4.4.0-91-generic (4.4.0-91.114) ...
Preparing to unpack .../linux-virtual_4.4.0.91.96_amd64.deb ...
Unpacking linux-virtual (4.4.0.91.96) over (4.4.0.87.93) ...
Preparing to unpack .../linux-image-virtual_4.4.0.91.96_amd64.deb ...
Unpacking linux-image-virtual (4.4.0.91.96) over (4.4.0.87.93) ...
Preparing to unpack .../linux-headers-virtual_4.4.0.91.96_amd64.deb ...
Unpacking linux-headers-virtual (4.4.0.91.96) over (4.4.0.87.93) ...
Preparing to unpack .../linux-headers-generic_4.4.0.91.96_amd64.deb ...
Unpacking linux-headers-generic (4.4.0.91.96) over (4.4.0.87.93) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up git-man (1:2.7.4-0ubuntu1.2) ...
Setting up git (1:2.7.4-0ubuntu1.2) ...
Setting up linux-headers-4.4.0-91 (4.4.0-91.114) ...
Setting up linux-headers-4.4.0-91-generic (4.4.0-91.114) ...
Setting up linux-image-4.4.0-91-generic (4.4.0-91.114) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-91-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-91-generic
Found initrd image: /boot/initrd.img-4.4.0-91-generic
Found linux image: /boot/vmlinuz-4.4.0-87-generic
Found initrd image: /boot/initrd.img-4.4.0-87-generic
done
Setting up linux-image-virtual (4.4.0.91.96) ...
Setting up linux-headers-generic (4.4.0.91.96) ...
Setting up linux-headers-virtual (4.4.0.91.96) ...
Setting up linux-virtual (4.4.0.91.96) ...
root#ubuntu-512mb-nyc3-01:~# sudo apt-get install \
> apt-transport-https \
> ca-certificates \
> curl \
> software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20160104ubuntu1).
apt-transport-https is already the newest version (1.2.24).
curl is already the newest version (7.47.0-1ubuntu2.2).
software-properties-common is already the newest version (0.96.20.7).
The following package was automatically installed and is no longer required:
grub-pc-bin
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root#ubuntu-512mb-nyc3-01:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
root#ubuntu-512mb-nyc3-01:~# sudo add-apt-repository \
> "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
> $(lsb_release -cs) \
> stable"
root#ubuntu-512mb-nyc3-01:~# apt update
Hit:1 http://mirrors.digitalocean.com/ubuntu xenial InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Hit:3 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Get:5 https://download.docker.com/linux/ubuntu xenial InRelease [38.9 kB]
Get:6 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages [1,966 B]
Fetched 40.9 kB in 0s (56.7 kB/s)
sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root#ubuntu-512mb-nyc3-01:~# sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree... 50%
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
grub-pc-bin
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
aufs-tools cgroupfs-mount libltdl7
Suggested packages:
mountall
The following NEW packages will be installed:
aufs-tools cgroupfs-mount docker-ce libltdl7
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.6 MB of archives.
After this operation, 96.6 MB of additional disk space will be used.
Get:2 https://download.docker.com/linux/ubuntu xenial/stable amd64 docker-ce amd64 17.06.0~ce-0~ubuntu [20.5 MB]
Get:1 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/universe amd64 aufs-tools amd64 1:3.2+20130722-1.1ubuntu1 [92.9 kB]
Get:3 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/universe amd64 cgroupfs-mount all 1.2 [4,970 B]
Get:4 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/main amd64 libltdl7 amd64 2.4.6-0.1 [38.3 kB]
Fetched 20.6 MB in 0s (23.2 MB/s)
Selecting previously unselected package aufs-tools.
(Reading database ... 82102 files and directories currently installed.)
Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.2_all.deb ...
Unpacking cgroupfs-mount (1.2) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../libltdl7_2.4.6-0.1_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-0.1) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_17.06.0~ce-0~ubuntu_amd64.deb ...
Unpacking docker-ce (17.06.0~ce-0~ubuntu) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu19) ...
Setting up aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Setting up cgroupfs-mount (1.2) ...
Setting up libltdl7:amd64 (2.4.6-0.1) ...
Setting up docker-ce (17.06.0~ce-0~ubuntu) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
root#ubuntu-512mb-nyc3-01:~# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b04784fba78d: Pull complete
Digest: sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
root#ubuntu-512mb-nyc3-01:~# curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 1 68.9M 1 995k 0 0 2613k 0 0:00:27 --:--:-- 0:00:27 100 68.9M 100 68.9M 0 0 72.8M 0 --:--:-- --:--:-- --:--:-- 72.8M
root#ubuntu-512mb-nyc3-01:~# chmod +x ./kubectl
root#ubuntu-512mb-nyc3-01:~# sudo mv ./kubectl /usr/local/bin/kubectl
root#ubuntu-512mb-nyc3-01:~# kubectl cluster-info
Kubernetes master is running at http://localhost:8080
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
root#ubuntu-512mb-nyc3-01:~#
root#ubuntu-512mb-nyc3-01:~# apt-get update && apt-get install -y apt-transport-https
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://nyc2.mirrors.digitalocean.com/ubuntu xenial InRelease
Hit:3 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Hit:4 https://download.docker.com/linux/ubuntu xenial InRelease
Hit:5 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-https is already the newest version (1.2.24).
The following package was automatically installed and is no longer required:
grub-pc-bin
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root#ubuntu-512mb-nyc3-01:~# curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
OK
root#ubuntu-512mb-nyc3-01:~# cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
> deb http://apt.kubernetes.io/ kubernetes-xenial main
> EOF
root#ubuntu-512mb-nyc3-01:~# apt-get update
Hit:1 http://mirrors.digitalocean.com/ubuntu xenial InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Hit:3 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:6 https://download.docker.com/linux/ubuntu xenial InRelease
Get:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8,942 B]
Get:7 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 Packages [4,977 B]
Fetched 13.9 kB in 0s (16.0 kB/s)
Reading package lists... Done
root#ubuntu-512mb-nyc3-01:~# apt-get install -y kubelet kubeadm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
grub-pc-bin
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
ebtables kubectl kubernetes-cni socat
The following NEW packages will be installed:
ebtables kubeadm kubectl kubelet kubernetes-cni socat
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 45.4 MB of archives.
After this operation, 334 MB of additional disk space will be used.
Get:1 http://mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 ebtables amd64 2.0.10.4-3.4ubuntu2 [79.4 kB]
Get:2 http://mirrors.digitalocean.com/ubuntu xenial/universe amd64 socat amd64 1.7.3.1-1 [321 kB]
Get:3 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubernetes-cni amd64 0.5.1-00 [5,560 kB]
Get:4 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubelet amd64 1.7.3-01 [19.6 MB]
Get:5 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubectl amd64 1.7.3-01 [10.1 MB]
Get:6 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubeadm amd64 1.7.3-01 [9,796 kB]
Fetched 45.4 MB in 4s (10.2 MB/s)
Selecting previously unselected package ebtables.
(Reading database ... 82383 files and directories currently installed.)
Preparing to unpack .../ebtables_2.0.10.4-3.4ubuntu2_amd64.deb ...
Unpacking ebtables (2.0.10.4-3.4ubuntu2) ...
Selecting previously unselected package kubernetes-cni.
Preparing to unpack .../kubernetes-cni_0.5.1-00_amd64.deb ...
Unpacking kubernetes-cni (0.5.1-00) ...
Selecting previously unselected package socat.
Preparing to unpack .../socat_1.7.3.1-1_amd64.deb ...
Unpacking socat (1.7.3.1-1) ...
Selecting previously unselected package kubelet.
Preparing to unpack .../kubelet_1.7.3-01_amd64.deb ...
Unpacking kubelet (1.7.3-01) ...
Selecting previously unselected package kubectl.
Preparing to unpack .../kubectl_1.7.3-01_amd64.deb ...
Unpacking kubectl (1.7.3-01) ...
Selecting previously unselected package kubeadm.
Preparing to unpack .../kubeadm_1.7.3-01_amd64.deb ...
Unpacking kubeadm (1.7.3-01) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up ebtables (2.0.10.4-3.4ubuntu2) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up kubernetes-cni (0.5.1-00) ...
Setting up socat (1.7.3.1-1) ...
Setting up kubelet (1.7.3-01) ...
Setting up kubectl (1.7.3-01) ...
Setting up kubeadm (1.7.3-01) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
root#ubuntu-512mb-nyc3-01:~# kubeadm init
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.3
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks
[preflight] WARNING: docker version is greater than the most recently validated version. Docker version: 17.06.0-ce. Max validated version: 1.12
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)
[certificates] Generated CA certificate and key.
[certificates] Generated API server certificate and key.
[certificates] API Server serving cert is signed for DNS names [ubuntu-512mb-nyc3-01 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 165.227.70.168]
[certificates] Generated API server kubelet client certificate and key.
[certificates] Generated service account token signing key and public key.
[certificates] Generated front-proxy CA certificate and key.
[certificates] Generated front-proxy client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/scheduler.conf"
[apiclient] Created API client, waiting for the control plane to become ready
^C
Here's the log from journalctl: https://pastebin.com/S6Tkak3P
How long did you wait for it to be ready? Note that it takes a bit in that step. Moreover, in the journalctl logs there are errors regarding the cni network not being ready, which is something expected. Could you try again and waiting a bit longer?
Related
I have a Dockerfile that builds an image based on postgres, but additionally installs security updates (this is to ensure that the image has the latest patches even if a release is slightly older).
This is the Dockerfile:
FROM postgres:14.2
# apply security updates
RUN \
apt-get update -qq && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*
ENV PGDATA /var/lib/postgresql/data
# switch to lower-privileged user
USER 999
CMD ["postgres", "-c", "listen_addresses=*", "-c", "config_file=/etc/postgresql/postgresql.conf"]
Now, this build broke:
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
libpq5 postgresql-14 postgresql-client-14 postgresql-client-common
postgresql-common
5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 17.9 MB of archives.
After this operation, 25.6 kB of additional disk space will be used.
Get:1 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 libpq5 amd64 14.3-1.pgdg110+1 [172 kB]
Get:2 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 postgresql-common all 241.pgdg110+1 [230 kB]
Get:3 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 postgresql-client-common all 241.pgdg110+1 [92.1 kB]
Get:4 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 postgresql-client-14 amd64 14.3-1.pgdg110+1 [1,629 kB]
Get:5 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 postgresql-14 amd64 14.3-1.pgdg110+1 [15.8 MB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 17.9 MB in 1s (25.4 MB/s)
(Reading database ... 12100 files and directories currently installed.)
Preparing to unpack .../libpq5_14.3-1.pgdg110+1_amd64.deb ...
Unpacking libpq5:amd64 (14.3-1.pgdg110+1) over (14.2-1.pgdg110+1) ...
Preparing to unpack .../postgresql-common_241.pgdg110+1_all.deb ...
Leaving 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Unpacking postgresql-common (241.pgdg110+1) over (238.pgdg110+1) ...
Preparing to unpack .../postgresql-client-common_241.pgdg110+1_all.deb ...
Unpacking postgresql-client-common (241.pgdg110+1) over (238.pgdg110+1) ...
Preparing to unpack .../postgresql-client-14_14.3-1.pgdg110+1_amd64.deb ...
Unpacking postgresql-client-14 (14.3-1.pgdg110+1) over (14.2-1.pgdg110+1) ...
Preparing to unpack .../postgresql-14_14.3-1.pgdg110+1_amd64.deb ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Unpacking postgresql-14 (14.3-1.pgdg110+1) over (14.2-1.pgdg110+1) ...
Setting up postgresql-client-common (241.pgdg110+1) ...
Setting up libpq5:amd64 (14.3-1.pgdg110+1) ...
Setting up postgresql-client-14 (14.3-1.pgdg110+1) ...
Setting up postgresql-common (241.pgdg110+1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Configuring postgresql-common
-----------------------------
createcluster.conf: A new version (/tmp/postgresql-common.sK2jGD) of
configuration file /etc/postgresql-common/createcluster.conf is available, but
the version installed currently has been locally modified.
1. install the package maintainer's version
2. keep the local version currently installed
3. show the differences between the versions
4. show a side-by-side difference between the versions
5. start a new shell to examine the situation
What do you want to do about modified configuration file createcluster.conf?
How can I solve this problem?
The build breaks because it asks you what to do, and from a script (or automated build), this is not possible.
The solution is to allow apt to configure the installation noninteractively. Add to your Dockerfile:
ENV DEBIAN_FRONTEND=noninteractive
This way, automatic selections to the packages will apply. This is fine for most cases.
# apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:2 http://ca.archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://ca.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://ca.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Hit:5 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu bionic InRelease
Hit:6 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu bionic InRelease
Fetched 247 kB in 2s (111 kB/s)
Reading package lists... Done
# apt-cache search gitlab-ee
Search didn't find anything like gitlab-ee. However if I post the link https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu/ to the browser, I can find the gitlab-ee package for ubuntu/bionic.
It turned out my Ubuntu was 18.04 but 32bit version. It was upgraded from previous Ubuntu version. gitlab-ee does not support 32bit version anymore.
After updating to 18.04.01 server 64bit, gitlab-ce was installed without issues.
The installing process does not provide sufficient messages for installer to diagnose such issues. Believe me, I am not the only one running into such clueless issue. Actually I followed other people's similar cases which I found by googling.
I am trying to create a docker image for mongodb. I am followed the installation instructions from the official mongodb installation to the letter without success. I have tried every single blog and installation instruction out there but without any success. Any help will be greatly appreciated.
My dockerfile contents :
FROM ubuntu:16.04
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
RUN echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu/ xenial/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-3.4.list
RUN apt-get update && apt-get install -y mongodb-org
RUN mkdir -p /data/db
RUN chown -R mongodb:mongodb /data/db
ADD mongodb.conf /etc/mongodb.conf
ADD mongodb.pem /etc/ssl/certs/mongodb.pem
VOLUME ["/data/db"]
EXPOSE 27017
ENTRYPOINT ["/usr/bin/mongod", "--config", "/etc/mongodb.conf"]
I am using the follwing command :
sudo docker image build -t mongodb .
Everytime I am trying to build the image, I get the following:
Sending build context to Docker daemon 7.68kB
Step 1/11 : FROM ubuntu:16.04
---> 14f60031763d
Step 2/11 : RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
---> Using cache
---> 97a851663e60
Step 3/11 : RUN echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu/ xenial/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-3.4.list
---> Using cache
---> 122a2fad0021
Step 4/11 : RUN apt-get update && apt-get install -y mongodb-org
---> Running in 014e7918e156
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Ign:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Get:3 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:6 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release [3457 B]
Get:7 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release.gpg [801 B]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [42.0 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [394 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.8 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [184 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [2931 B]
Get:13 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]
Get:14 http://alert.scansafe.net/alert/process?a=-3-BW4R_eLtf_R7PUTnlOeb6kHjw5kMPDH4n_j9vuji99G7a0CHJtXpeYpzGHZPC0wRr52uECxiceRo23F5y5nJqQ&b=iDw6Hli7TPC7hodjxRcdBj9i1UevoPI4aXCTkM2htEe16EENN3K7sUkicBLWMmbvQJHy5RccSqbLlHU4Q23W8w7vzekV399jAw6NbyJsJBJPm_U3VdYSosJyHFldLABeOaw16L56ass0uQ-KDLgyWadENbyoiMwzO-1nwE6QYwf1NcLI1073TBf9mObvKXGE7lL2-OpA1MA6dI2cdh6AETyP3g0OipJUm4fag2-7TI5j_BImQOsvvEVlzZ7ilSFaUVOlMbWBWuuU822y_f0ph82C3dG_kBenckmPWso5ln9ShKoiCmjbcSZjT76_j3Hwh3nSYYv1AqX8Kj8gFD4k1MI2Li7WNMs9rnq4vUa9eeaN_ivffMClQHK6I88vPaR4FQr61U5ecOwl0KmVyhP3FLDF-4KpOGg3Kf7kVRCnLpQZwXnsrrTt3enSpjn66IzlCgG3PmNrVhdqOTBQFh5PfWtgdGG68Ir6hZIBt170nqGSMhgFmlTMTMbO5EGkA-uyPz8worv7RSc&blockedUrl=http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4/multiverse amd64 Packages [5870 B]
Err:14 http://alert.scansafe.net/alert/process?a=-3-BW4R_eLtf_R7PUTnlOeb6kHjw5kMPDH4n_j9vuji99G7a0CHJtXpeYpzGHZPC0wRr52uECxiceRo23F5y5nJqQ&b=iDw6Hli7TPC7hodjxRcdBj9i1UevoPI4aXCTkM2htEe16EENN3K7sUkicBLWMmbvQJHy5RccSqbLlHU4Q23W8w7vzekV399jAw6NbyJsJBJPm_U3VdYSosJyHFldLABeOaw16L56ass0uQ-KDLgyWadENbyoiMwzO-1nwE6QYwf1NcLI1073TBf9mObvKXGE7lL2-OpA1MA6dI2cdh6AETyP3g0OipJUm4fag2-7TI5j_BImQOsvvEVlzZ7ilSFaUVOlMbWBWuuU822y_f0ph82C3dG_kBenckmPWso5ln9ShKoiCmjbcSZjT76_j3Hwh3nSYYv1AqX8Kj8gFD4k1MI2Li7WNMs9rnq4vUa9eeaN_ivffMClQHK6I88vPaR4FQr61U5ecOwl0KmVyhP3FLDF-4KpOGg3Kf7kVRCnLpQZwXnsrrTt3enSpjn66IzlCgG3PmNrVhdqOTBQFh5PfWtgdGG68Ir6hZIBt170nqGSMhgFmlTMTMbO5EGkA-uyPz8worv7RSc&blockedUrl=http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4/multiverse amd64 Packages
Hash Sum mismatch
Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [208 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [756 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.3 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [645 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [17.5 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4930 B]
Get:25 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6237 B]
Fetched 24.2 MB in 7s (3158 kB/s)
Reading package lists...
E: Failed to fetch http://alert.scansafe.net/alert/process?a=-3-BW4R_eLtf_R7PUTnlOeb6kHjw5kMPDH4n_j9vuji99G7a0CHJtXpeYpzGHZPC0wRr52uECxiceRo23F5y5nJqQ&b=iDw6Hli7TPC7hodjxRcdBj9i1UevoPI4aXCTkM2htEe16EENN3K7sUkicBLWMmbvQJHy5RccSqbLlHU4Q23W8w7vzekV399jAw6NbyJsJBJPm_U3VdYSosJyHFldLABeOaw16L56ass0uQ-KDLgyWadENbyoiMwzO-1nwE6QYwf1NcLI1073TBf9mObvKXGE7lL2-OpA1MA6dI2cdh6AETyP3g0OipJUm4fag2-7TI5j_BImQOsvvEVlzZ7ilSFaUVOlMbWBWuuU822y_f0ph82C3dG_kBenckmPWso5ln9ShKoiCmjbcSZjT76_j3Hwh3nSYYv1AqX8Kj8gFD4k1MI2Li7WNMs9rnq4vUa9eeaN_ivffMClQHK6I88vPaR4FQr61U5ecOwl0KmVyhP3FLDF-4KpOGg3Kf7kVRCnLpQZwXnsrrTt3enSpjn66IzlCgG3PmNrVhdqOTBQFh5PfWtgdGG68Ir6hZIBt170nqGSMhgFmlTMTMbO5EGkA-uyPz8worv7RSc&blockedUrl=http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.4/multiverse/binary-amd64/Packages.gz Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update && apt-get install -y mongodb-org' returned a non-zero code: 100
The line RUN apt-get update && apt-get install -y mongodb-org should be
RUN apt-get update && apt-get install -y mongodb You can also just use the official mongo image and then provide a docker link
I'm hoping you know that you don't have to go to the effort because there is already an official image on Docker Hub.
However, your error message gives a hint to what went wrong:
mongodb-org/3.4/multiverse/binary-amd64/Packages.gz Hash Sum mismatch
You can correct this if you are determined to make your own image.
One place I would start is looking at the Docker best practices for run. You have split some related to the same dependency over multiple lines in your code, which can cause caching to mismatch versions and hashes. This is likely the problem.
If you aren't satisfied with using the official image directly you can at least look at how it was built here:
https://github.com/docker-library/mongo/blob/c02ca4cce8c69e5069b75cb574d1b99d7b4edaeb/3.4/Dockerfile
I found a solution. Since I changed the network adapter of the VM from NAT to Bridge, the image is building successfully.
I do not understand why the network type would cause this issue, but it it working now.
Recently I edit my /etc/apt/sources.list and change jessie to stretch to get the new version of gcc-6. However I when I change stretch back to jessie, and run sudo apt-get update I got a lot of errors. How can I solve it.
pi#raspberrypi ~ $ sudo apt update
Hit:1 http://raspberrypi.collabora.com wheezy InRelease
Get:2 http://mirrordirector.raspbian.org/raspbian jessie InRelease [14.9 kB]
Err:1 http://raspberrypi.collabora.com wheezy InRelease
The following signatures were invalid: FF9FD9E73808E2376CB76F0AED4BF9140C50B1C5
Hit:4 http://archive.raspberrypi.org/debian jessie InRelease
Get:5 http://mirrordirector.raspbian.org/raspbian jessie/main armhf Packages [9534 kB]
Hit:3 https://packagecloud.io/Hypriot/Schatzkiste/raspbian jessie InRelease
Get:6 http://124.202.164.8/files/311600000A34E137/http.debian.net/debian jessie/main armhf Packages [169 kB]
Err:6 http://124.202.164.8/files/311600000A34E137/http.debian.net/debian jessie/main armhf Packages
Writing more data than expected (196868 > 169365)
Hashes of expected file:
- Filesize:169365 [weak]
- SHA256:779179f25b91efa4fdbf69aeb7c37d444e104e3b8d359daf27bc4db4d330003f
- SHA1:aa605ce914ddacfd4b8c71c72bab3a95b76c0ed5 [weak]
- MD5Sum:f0867f34045767904d0caa686f288615 [weak]
Release file created at: Fri, 14 Jul 2017 15:58:01 +0000
Get:7 http://archive.raspbian.org/raspbian jessie InRelease [14.9 kB]
Get:8 http://archive.raspbian.org/raspbian jessie/rpi Sources [1132 B]
Get:9 http://archive.raspbian.org/raspbian jessie/non-free Sources [113 kB]
Get:10 http://archive.raspbian.org/raspbian jessie/main Sources [7754 kB]
Ign:11 https://apt.dockerproject.org/repo raspbian-jessie InRelease
Get:12 http://mirrordirector.raspbian.org/raspbian jessie/contrib armhf Packages [43.3 kB]
Get:13 http://mirrordirector.raspbian.org/raspbian jessie/non-free armhf Packages [84.2 kB]
Get:14 http://mirrordirector.raspbian.org/raspbian jessie/rpi armhf Packages [1356 B]
Err:15 https://apt.dockerproject.org/repo raspbian-jessie Release
gnutls_handshake() failed: The TLS connection was non-properly terminated.
Get:16 http://archive.raspbian.org/raspbian jessie/contrib Sources [64.5 kB]
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://raspberrypi.collabora.com wheezy InRelease: The following signatures were invalid: FF9FD9E73808E2376CB76F0AED4BF9140C50B1C5
E: The repository 'https://apt.dockerproject.org/repo raspbian-jessie Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
My sources.list file
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
I had the same issue and below solution worked for me.
Create a file called badproxy with below lines:
Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy true;
then copy the file into the apt config folder:
cp ./badproxy /etc/apt/apt.conf.d/99fixbadproxy
I tried above suggestion from docker form
sudo apt remove gnupg
sudo apt install --reinstall gnupg2 (possibly not necessary, but doesn't hurt)
sudo apt install dirmngr
Then run
gpg --keyserver keys.gnupg.net --recv-key FF9FD9E73808E2376CB76F0AED4BF9140C50B1C5
gpg -a --export FF9FD9E73808E2376CB76F0AED4BF9140C50B1C5 | sudo apt-key add -
I've been trying for a while now to install mongodb on my docker image in a variety of ways. I've tried using the official image by calling 'docker pull mongo:latest' but for some reason the terminal just hangs with no feedback from docker. I've also tried various ways to build it through Dockerfile but run into an issue when trying to configure mongodb-org-server.
What is the correct way to install mongodb on my docker image? The easiest, I would presume, is to use the docker image for mongo but that's just freezing.
Dockerfile
FROM ubuntu:12.04
FROM ruby:2.2.0
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list
RUN apt-get update -qq
RUN apt-get upgrade -y
RUN apt-get install -y build-essential libpq-dev nodejs mongodb-org tcl8.5
# Install redis
RUN wget http://download.redis.io/releases/redis-stable.tar.gz
RUN tar xzf redis-stable.tar.gz
WORKDIR redis-stable
RUN make
RUN make install
WORKDIR utils
RUN ./install_server.sh
RUN service redis_6379 start
RUN mkdir /myapp
WORKDIR /myapp
ADD . /myapp
RUN mv redis.conf /etc/redis/redis.conf.default
RUN redis-server &
#RUN bundle install
#RUN RAILS_ENV=development bundle exec rake assets:precompile --trace
RUN service mongod status
#RUN rake db:mongoid:create_indexes
CMD ["rails", "server", "-b", "0.0.0.0"]
ERROR
Step 6 : RUN apt-get install -y build-essential libpq-dev nodejs mongodb-org tcl8.5
---> Running in bc29e517b3a9
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version.
libpq-dev is already the newest version.
The following package was automatically installed and is no longer required:
libbison-dev
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
libc-ares2 libtcl8.5 libv8-3.14.5 mongodb-org-mongos mongodb-org-server
mongodb-org-shell mongodb-org-tools
Suggested packages:
tcl-tclreadline
The following NEW packages will be installed:
libc-ares2 libtcl8.5 libv8-3.14.5 mongodb-org mongodb-org-mongos
mongodb-org-server mongodb-org-shell mongodb-org-tools nodejs tcl8.5
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.6 MB of archives.
After this operation, 168 MB of additional disk space will be used.
Get:1 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org-shell amd64 3.0.6 [4258 kB]
Get:2 http://http.debian.net/debian/ jessie/main libtcl8.5 amd64 8.5.17-1 [737 kB]
Get:3 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org-server amd64 3.0.6 [8632 kB]
Get:4 http://http.debian.net/debian/ jessie/main libc-ares2 amd64 1.10.0-2 [76.7 kB]
Get:5 http://http.debian.net/debian/ jessie/main nodejs amd64 0.10.29~dfsg-2 [648 kB]
Get:6 http://http.debian.net/debian/ jessie/main tcl8.5 amd64 8.5.17-1 [58.6 kB]
Get:7 http://http.debian.net/debian/ jessie/main libv8-3.14.5 amd64 3.14.5.8-8.1 [1269 kB]
Get:8 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org-mongos amd64 3.0.6 [4043 kB]
Get:9 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org-tools amd64 3.0.6 [33.8 MB]
Get:10 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org amd64 3.0.6 [3616 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 53.6 MB in 11s (4850 kB/s)
Selecting previously unselected package libtcl8.5:amd64.
(Reading database ... 27887 files and directories currently installed.)
Preparing to unpack .../libtcl8.5_8.5.17-1_amd64.deb ...
Unpacking libtcl8.5:amd64 (8.5.17-1) ...
Selecting previously unselected package libc-ares2:amd64.
Preparing to unpack .../libc-ares2_1.10.0-2_amd64.deb ...
Unpacking libc-ares2:amd64 (1.10.0-2) ...
Selecting previously unselected package libv8-3.14.5.
Preparing to unpack .../libv8-3.14.5_3.14.5.8-8.1_amd64.deb ...
Unpacking libv8-3.14.5 (3.14.5.8-8.1) ...
Selecting previously unselected package mongodb-org-shell.
Preparing to unpack .../mongodb-org-shell_3.0.6_amd64.deb ...
Unpacking mongodb-org-shell (3.0.6) ...
Selecting previously unselected package mongodb-org-server.
Preparing to unpack .../mongodb-org-server_3.0.6_amd64.deb ...
Unpacking mongodb-org-server (3.0.6) ...
Selecting previously unselected package mongodb-org-mongos.
Preparing to unpack .../mongodb-org-mongos_3.0.6_amd64.deb ...
Unpacking mongodb-org-mongos (3.0.6) ...
Selecting previously unselected package mongodb-org-tools.
Preparing to unpack .../mongodb-org-tools_3.0.6_amd64.deb ...
Unpacking mongodb-org-tools (3.0.6) ...
Selecting previously unselected package mongodb-org.
Preparing to unpack .../mongodb-org_3.0.6_amd64.deb ...
Unpacking mongodb-org (3.0.6) ...
Selecting previously unselected package tcl8.5.
Preparing to unpack .../tcl8.5_8.5.17-1_amd64.deb ...
Unpacking tcl8.5 (8.5.17-1) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_0.10.29~dfsg-2_amd64.deb ...
Unpacking nodejs (0.10.29~dfsg-2) ...
Processing triggers for systemd (215-17+deb8u2) ...
Setting up libtcl8.5:amd64 (8.5.17-1) ...
Setting up libc-ares2:amd64 (1.10.0-2) ...
Setting up libv8-3.14.5 (3.14.5.8-8.1) ...
Setting up mongodb-org-shell (3.0.6) ...
Setting up mongodb-org-server (3.0.6) ...
Adding system user `mongodb' (UID 105) ...
Adding new user `mongodb' (UID 105) with group `nogroup' ...
Not creating home directory `/home/mongodb'.
Adding group `mongodb' (GID 109) ...
Done.
Adding user `mongodb' to group `mongodb' ...
Adding user mongodb to group mongodb
Done.
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing package mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 100
Setting up mongodb-org-mongos (3.0.6) ...
Setting up mongodb-org-tools (3.0.6) ...
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.
dpkg: error processing package mongodb-org (--configure):
dependency problems - leaving unconfigured
Setting up tcl8.5 (8.5.17-1) ...
Setting up nodejs (0.10.29~dfsg-2) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.19-18+deb8u1) ...
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
Service 'web' failed to build: The command '/bin/sh -c apt-get install -y build-essential libpq-dev nodejs mongodb-org tcl8.5' returned a non-zero code: 100
I think this is a duplicate of https://stackoverflow.com/a/16575040/880056
Summary: you're trying to install a new version of MongoDB which is packaged for Upstart init services, but the version of Ubuntu you're running still uses SysV init scripts.
Any reason you're using such an old Ubuntu version (12.04)?