Increase disk image in Ubuntu 16.04 LTS in VirtualBox

I am using a Ubuntu 16.04 LTS on VirtualBox and start working on Yocto Project.

Unfortunately, my virtual disk memory (Disk Image) is only 30GB and it cannot install more packages. How can I increase the size of it.

Please help. Thank you very much !

enter image description here

partitioning – Windows 10 Ubuntu 16.04 Dual boot file permission read only in shared parition

I have a dual boot set up with Windows 10 and Ubuntu 16.04. I created a shared partition that can be accessed from both. My problem occurs when I try to access a file I saved on Ubuntu while I’m on Windows or vice versa.

If I’m on Windows, opening a file I saved while I was on Ubuntu, it’s read only and I can save the edited version.

If I’m on Ubuntu, opening a file I saved while I was on Windows, (I forget what happens. I’m currently on Ubuntu right now, but it also doesn’t work)

I’ve tried the common fixes you see online like making sure fast boot is off. This is what the last two lines of my /etc/fstab looks like

UUID=D6CE4D79CE4D52C3 /media/DualStorage ntfs-3g auto,user,permissions,rw,exec 0 0
UUID=0C7435547435422E /media/Windows  ntfs  defaults,umask=222  0 0

How can I fix this permissions issue?

package management – 16.04 LTS Xenial looking into focal repository

Im, trying to build a container and need to install java8. all instructions are in the Dockerfile. System is 16.04.07 LTS. Error shows it’s trying to download for focal release and I just don’t get why

core@acme:~$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="16.04.7 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.7 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
core@acme:~$ 
core@acme:~$ 
core@acme:~$ 
core@acme:~$ docker-compose build
Building mongo...
Step 1/1 : FROM mongo:3.0.5
 ---> 960ec09b9ab6
Successfully built 960ec09b9ab6
Successfully tagged core_mongo:latest
Building voting...
Step 1/16 : FROM ubuntu
 ---> bb0eaf4eee00
Step 2/16 : RUN apt-get update
 ---> Using cache
 ---> 87abb253f7cf
Step 3/16 : RUN apt-get install -y software-properties-common
 ---> Using cache
 ---> 4b747dbd6cc8
Step 4/16 : RUN   echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections &&   add-apt-repository -y ppa:webupd8team/java &&   apt-get update &&   apt-get install -y oracle-java8-installer &&   rm -rf /var/cache/oracle-jdk8-installer
 ---> Running in 1dcc67a9c18a
Ign:1 http://ppa.launchpad.net/webupd8team/java/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:6 http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release
  404  Not Found (IP: 91.189.95.83 80)
Reading package lists...
E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release' does not have a Release file.
Service 'alpha' failed to build: The command '/bin/sh -c echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections &&   add-apt-repository -y ppa:webupd8team/java &&   apt-get update &&   apt-get install -y oracle-java8-installer &&   rm -rf /var/cache/oracle-jdk8-installer' returned a non-zero code: 100
core@acme:~$ 

linux – netplan on Ubuntu 16.04

I’ve read posts and articles to suggest that the netplan package is associated with a calender service and that the actual package I should be using is netplan.io, this is for Ubuntu 16.04 . However, when I perform a apt install netplan.io, I get a message back stating that the package I want cannot be found, its the networking package I require and not the calendar service, can someone please confirm the package I require for Ubuntu 16.04 .

Trying to Install Kubernetes with Vagrant and Ansible on Ubuntu 16.04 lab

So I am trying to install Kubernetes on a lab with Vagrant and Ansible.
I am using the following documentation on Ubuntu 16.04:

https://kubernetes.io/blog/2019/03/15/kubernetes-setup-using-ansible-and-vagrant/

Several Problems I encounter:

  1. The Vagrant File fails to initialize
  2. The Node does not successfully provision the node IP Address with Extra Args
  3. While specifying the documented version of Calico in the Ansible Playbook it fails.

For number 1, here is the vagrant file:

IMAGE_NAME = "bento/ubuntu-16.04"
N = 2

Vagrant.configure("2") do |config|
    config.ssh.insert_key = false

    config.vm.provider "virtualbox" do |v|
        v.memory = 1024
        v.cpus = 2
    end
      
    config.vm.define "k8s-master" do |master|
        master.vm.box = IMAGE_NAME
        master.vm.network "private_network", ip: "192.168.50.10"
        master.vm.hostname = "k8s-master"
        master.vm.provision "ansible" do |ansible|
            ansible.playbook = "kubernetes-setup/master-playbook.yml"
            ansible.extra_vars = {
                node_ip: "192.168.50.10",
            }
        end
    end

    (1..N).each do |i|
        config.vm.define "node-#{i}" do |node|
            node.vm.box = IMAGE_NAME
            node.vm.network "private_network", ip: "192.168.50.#{i + 10}"
            node.vm.hostname = "node-#{i}"
            node.vm.provision "ansible" do |ansible|
                ansible.playbook = "kubernetes-setup/node-playbook.yml"
                ansible.extra_vars = {
                    node_ip: "192.168.50.#{i + 10}",
                }
            end
        end
    end

Am I missing something within the Vagrantfile?

For number 2, I am seeing the following issue within the master-playbook.yaml, if fails at this step:

  - name: Configure node ip
    lineinfile:
      path: /etc/default/kubelet
      line: KUBELET_EXTRA_ARGS=--node-ip={{ node_ip }}

For number 3 I encountered an issue with the Calico Task within Ansible:

  - name: Install calico pod network
    become: false
    command: kubectl create -f https://docs.projectcalico.org/v3.4/getting-started/kubernetes/installation/hosted/calico.yaml

I get the following Message on that task:

TASK (Install calico pod network) **********************************************
fatal: (k8s-master): FAILED! => {"changed": true, "cmd": ("kubectl", "create", "-f", "https://docs.projectcalico.org/v3.4/getting-started/kubernetes/installation/hosted/calico.yaml"), "delta": "0:00:01.460979", "end": "2020-08-21 01:57:36.395550", "failed": true, "rc": 1, "start": "2020-08-21 01:57:34.934571", "stderr": "unable to recognize "https://docs.projectcalico.org/v3.4/getting-started/kubernetes/installation/hosted/calico.yaml": no matches for kind "DaemonSet" in version "extensions/v1beta1"nunable to recognize "https://docs.projectcalico.org/v3.4/getting-started/kubernetes/installation/hosted/calico.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"", "stderr_lines": ("unable to recognize "https://docs.projectcalico.org/v3.4/getting-started/kubernetes/installation/hosted/calico.yaml": no matches for kind "DaemonSet" in version "extensions/v1beta1"", "unable to recognize "https://docs.projectcalico.org/v3.4/getting-started/kubernetes/installation/hosted/calico.yaml": no matches for kind "Deployment" in version "extensions/v1beta1""), "stdout": "configmap/calico-config creatednsecret/calico-etcd-secrets creatednserviceaccount/calico-node creatednserviceaccount/calico-kube-controllers creatednclusterrole.rbac.authorization.k8s.io/calico-kube-controllers creatednclusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers creatednclusterrole.rbac.authorization.k8s.io/calico-node creatednclusterrolebinding.rbac.authorization.k8s.io/calico-node created", "stdout_lines": ("configmap/calico-config created", "secret/calico-etcd-secrets created", "serviceaccount/calico-node created", "serviceaccount/calico-kube-controllers created", "clusterrole.rbac.authorization.k8s.io/calico-kube-controllers created", "clusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers created", "clusterrole.rbac.authorization.k8s.io/calico-node created", "clusterrolebinding.rbac.authorization.k8s.io/calico-node created")}

RUNNING HANDLER (docker status) ************************************************
    to retry, use: --limit @/home/sto/Vagrant/Kubernetes/kubernetes-setup/master-playbook.retry

PLAY RECAP *********************************************************************
k8s-master                 : ok=15   changed=14   unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Furthermore, what is interesting is even though it fails on this task, if I choose version Calico 3.14.

  - name: Install calico pod network
    become: false
    command: kubectl create -f https://docs.projectcalico.org/v3.14/getting-started/kubernetes/installation/hosted/calico.yaml

Also, by replacing the URL from 3.4 to 3.14, the resources for the CNI underlay still will get created and they will still fail inside of the Vagrant machines:

vagrant@k8s-master:~$ kubectl get pods --all-namespaces
NAMESPACE     NAME                                      READY   STATUS              RESTARTS   AGE
kube-system   calico-kube-controllers-6bb5db574-p2w9c   0/1     CrashLoopBackOff    10         31m
kube-system   calico-node-6wsm7                         0/1     CrashLoopBackOff    7          13m
kube-system   calico-node-flf89                         0/1     Running             12         31m
kube-system   calico-node-fwk84                         0/1     CrashLoopBackOff    6          12m
kube-system   coredns-66bff467f8-cdrb8                  0/1     ContainerCreating   0          31m
kube-system   coredns-66bff467f8-lgcf8                  0/1     ContainerCreating   0          31m
kube-system   etcd-k8s-master                           1/1     Running             0          31m
kube-system   kube-apiserver-k8s-master                 1/1     Running             0          31m
kube-system   kube-controller-manager-k8s-master        1/1     Running             1          31m
kube-system   kube-proxy-79pw8                          1/1     Running             0          31m
kube-system   kube-proxy-g8gnm                          1/1     Running             0          12m
kube-system   kube-proxy-tvwlq                          1/1     Running             0          13m
kube-system   kube-scheduler-k8s-master                 1/1     Running             3          31m

Here are the messages:

vagrant@k8s-master:~$ kubectl logs -f calico-node-4q2xz -n kube-system
2020-08-22 21:35:41.194 (INFO)(8) startup/startup.go 299: Early log level set to info
2020-08-22 21:35:41.194 (INFO)(8) startup/startup.go 319: Using HOSTNAME environment (lowercase) for node name
2020-08-22 21:35:41.194 (INFO)(8) startup/startup.go 327: Determined node name: node-1
2020-08-22 21:35:41.195 (INFO)(8) startup/startup.go 106: Skipping datastore connection test
vagrant@k8s-master:~$ kubectl logs -f calico-kube-controllers-6bb5db574-m6b5j -n kube-system
2020-08-22 21:32:06.445 (INFO)(1) main.go 88: Loaded configuration from environment config=&config.Config{LogLevel:"info", WorkloadEndpointWorkers:1, ProfileWorkers:1, PolicyWorkers:1, NodeWorkers:1, Kubeconfig:"", DatastoreType:"etcdv3"}
I0822 21:32:06.513751       1 client.go:357) parsed scheme: "endpoint"
I0822 21:32:06.514122       1 endpoint.go:68) ccResolverWrapper: sending new addresses to cc: ({http://<ETCD_IP>:<ETCD_PORT> 0  <nil>})
W0822 21:32:06.515723       1 client_config.go:541) Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
W0822 21:32:06.538019       1 clientconn.go:1120) grpc: addrConn.createTransport failed to connect to {http://<ETCD_IP>:<ETCD_PORT> 0  <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: address http://<ETCD_IP>:<ETCD_PORT>: too many colons in address". Reconnecting...
2020-08-22 21:32:06.568 (INFO)(1) main.go 109: Ensuring Calico datastore is initialized
W0822 21:32:07.541048       1 clientconn.go:1120) grpc: addrConn.createTransport failed to connect to {http://<ETCD_IP>:<ETCD_PORT> 0  <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: address http://<ETCD_IP>:<ETCD_PORT>: too many colons in address". Reconnecting...
W0822 21:32:09.309376       1 clientconn.go:1120) grpc: addrConn.createTransport failed to connect to {http://<ETCD_IP>:<ETCD_PORT> 0  <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: address http://<ETCD_IP>:<ETCD_PORT>: too many colons in address". Reconnecting...
W0822 21:32:12.223003       1 clientconn.go:1120) grpc: addrConn.createTransport failed to connect to {http://<ETCD_IP>:<ETCD_PORT> 0  <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: address http://<ETCD_IP>:<ETCD_PORT>: too many colons in address". Reconnecting...
W0822 21:32:15.736676       1 clientconn.go:1120) grpc: addrConn.createTransport failed to connect to {http://<ETCD_IP>:<ETCD_PORT> 0  <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: address http://<ETCD_IP>:<ETCD_PORT>: too many colons in address". Reconnecting...
{"level":"warn","ts":"2020-08-22T21:32:16.668Z","caller":"clientv3/retry_interceptor.go:61","msg":"retrying of unary invoker failed","target":"endpoint://client-286ade6d-d04a-4dac-848b-231ef01101d2/http://<ETCD_IP>:<ETCD_PORT>","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest connection error: connection error: desc = "transport: Error while dialing dial tcp: address http://<ETCD_IP>:<ETCD_PORT>: too many colons in address""}
2020-08-22 21:32:16.877 (ERROR)(1) client.go 261: Error getting cluster information config ClusterInformation="default" error=context deadline exceeded
2020-08-22 21:32:16.907 (FATAL)(1) main.go 114: Failed to initialize Calico datastore error=context deadline exceeded

Is this probably related to how the API gets provisioned in the Master-Playbook task within master-playbook.yml?

  - name: Initialize the Kubernetes cluster using kubeadm
    command: kubeadm init --apiserver-advertise-address="192.168.20.10" --apiserver-cert-extra-sans="192.168.20.10"  --node-name k8s-master --pod-network-cidr=192.168.0.0/16

Here is a link where you can clone into an Ubuntu 16.04 env and it will have the same issues, more than Likely. Since this post was flagged for deletion, I decided to re-word this and make it more impactful as I still think it is very worthwhile to have up on Stackoverflow. More experienced people than me had a lot of problems with the Kubernetes Guide and even asked me.

Here is the link to that.
Single Lab Link with Vagrant and Ansible

Ensure that you have the following tree structure when trying this out.
My main issue is basically how to get these Calico Pods working now:

sto@suplab02:~/Vagrant/Kubernetes$ tree
.
├── connect.sh
├── init.sh
├── join.sh
├── kubernetes-setup
│   ├── master-playbook.yml
│   └── node-playbook.yml
├── rename_roles.sh
└── Vagrantfile

server – Ubuntu 16.04 VSFTPD doesn’t show files on connection

I’m currently setting up an Ubuntu 16.04 VPS, and I have many files that need to be transferred to this server. The server itself has an sFTP connection supported, but I find this connection too slow for all the files I need to upload.

That is why I’m using VSFTPD FTP-server to upload my files. But when I try to connect (using Filezilla), it has no problem connecting, but it only shows an empty folder.

Here is my current setup for my /etc/vsftpd.conf file:

listen=YES
listen_ipv6=NO
connect_from_port_20=YES

anonymous_enable=YES
local_enable=YES
write_enable=YES
hide_file=NO

pam_service_name=ftp

pasv_enable=YES
pasv_min_port=40000
pasv_max_port=45000

userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO

dirlist_enable=YES

And in my userlist file I only have the name of my only user on the server: root.

I’m wondering, why can I only see an empty folder? I want to be able to navigate all the directories of the server, read and write to them, without any problems. But I’m pretty new to VSFTPD, so I’m not really good with the config files. Does anybody know what I’m doing wrong here?

Thx!

networking – Ubuntu 16.04 wired internet stopped working

I’m having a dual boot machine, with windows and ubuntu 16.04. Today I switched back to ubuntu after few days. I saw that I can’t connect to wired internet anymore. I was using static connection (dhcp was never working for me). I have exactly the same address, gate and mask as in windows (the connection works smoothly on windows). It shows that I’m connected to the network but I can’t ping the gate (router). Any idea where to look for the problem? I’m a beginner with linux. Thanks!

Can’t set open files limit for user www-data and process PHP in ubuntu 16.04

I am having trouble setting the open files limit for user www-data and process PHP in Ubuntu 16.04.

I have set all the following to 65535:

  • /proc/sys/fs/file-max
  • /etc/sysctl.conf
  • /etc/security/limits.conf (both with asterisk (*) and explicitly with user www-data)
  • /etc/php/7.0/fpm/php-fpm.conf (and it works for PHP-FPM!)

Still, wenn I grab a php cli process from user www-data, and check via /proc//limts, it shows:

Limit Soft Limit Hard Limit Units
Max open files 4096 4096 files

I have searched php.ini which doesn’t have a similar setting as php-fpm.conf, so I just copied the one of php-fpm, to no avail as well.

Any ideas?