LXD/LXC install issue with snap - lxd

I am on Ubuntu 18.04 and when I install LXD with sudo snap install lxd the install is broken somehow and somewhere.
i.e lxc list returns
Error: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: connection refused
BUT
/snap/bin/lxc list works fine.
Can someone crafty with SNAPS help me out here so that I can just use lxc instead of /snap/bin/lxc

Related

Docker initiate the connection to archive.ubuntu

I have managed to install docker into my machine which is using Windows 7. My machine is under corporate network. As i am trying to learn docker i was following this guide. When my Dockerfile is executing:
RUN apt-get -y update && apt-get install -y fortunes
which is perform ubuntu update and installing fortunes i get the following error:
cannot initiate the connection to archive.ubuntu.com:80. and - connect <101:network is unreachable>
In order to solve my problem, first i connected to my vm machine and i located the /etc/resolv.conf file where i modify it to add google dns
namespace 8.8.8.8
but that seems to not solve the issue when i exited and rebuild my Dockerfile.
As my machine is on windows i haven't found a solution for this problem. Does anyone know how should i surpass this problem?
You have to start your dockerd (docker daemon) with same nameserver of your windows computer network settings and then your container and image will get the connectivity from outside network/internet.
For more details Please visit this official link from docker :https://docs.docker.com/docker-for-windows/#network

Using proxy in non-browser applications

My college uses a proxy server to provide internet. I am able to access internet on the browser very well and apps like Skype are automatically connected when I login into my browser.
But some apps show error in connecting.
In Windows Store (of Windows10) I am able to open the store but while downloading it shows an error code of 0x800704CF.
Also I am not able to access the internet in the terminal of my virtual machine - Ubuntu 16.04.2 LTS (I am able to access it in its browser). I get following errors:
While trying
sudo apt-get update
I get the error
Err:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Cannot initiate the connection to us.archive.ubuntu.com:80
(2001:67c:1562::19). - connect (101: Network is unreachable) [IP:
2001:67c:1562::19 80]
And while trying
python get-pip.py
(after downloading get-pip.py)(to install pip)
I get the error:
Retrying (Retry(total=4, connect=None, read=None, redirect=None))
after connection broken by
'NewConnectionErro ('<pip._vendor.requests.packages.urllib3.connection.VerifiedH
TTPS Connection object at 0x7f7451ef1f10>: Failed to establish a new
connection: [Errno 101] Network is unreachable',)': /simple/pip/
I have tried to apply the proxy settings on terminal (in Linux) as:
export http_proxy={proxy IP they provided}
but it did not work.
For apt you have to provide Configuration
proxy conf for apt
For pip you can use command line arguments
pip install --proxy user:password#proxyserver:port <package>

Azure VM with Docker failing to connect

I'm trying to write a Powershell script to create a VM in Azure with Docker installed. From everything I've read, I should be able to do the following:
$image = "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_3-LTS-amd64-server-20150908-en-us-30GB"
azure vm docker create -e 22 -l 'North Europe' --docker-cert-dir dockercert --vm-size Small <myvmname> $image $userName $password
docker --tls -H tcp://<myvmname>.cloudapp.net:4243 info
The vm creation works, however the docker command fails with the following error:
An error occurred trying to connect: Get https://myvmname.cloudapp.net:4243/v1.20/info: dial tcp 40.127.169.184:4243: ConnectEx tcp: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Some articles I've found refer to port 2376 - but that doesn't work either.
Logging onto Azure portal and viewing the created VM - the Docker VM Extension doesn't seem to have been added and there's no endpoints other than the default SSH one. I was expecting these to have been created by the azure vm docker create command. Although I could be wrong with that bit.
A couple of example article I've looked at are here:
https://azure.microsoft.com/en-gb/documentation/articles/virtual-machines-docker-with-xplat-cli/
http://blog.siliconvalve.com/2015/01/07/get-started-with-docker-on-azure/
However, there's plenty of other articles saying the same thing.
Does anyone know what I'm doing wrong?
I know you are doing nothing wrong. My azurecli-dockerhost connection had been working for months and failed recently. I re-created my docker host using "azure vm docker create" but it does not work any more.
I believe it is a bug that the azure-docker team has to fix.
For the time being, my solution is to:
1) Launch a Ubuntu VM WITHOUT using the Azure docker extension
2) SSH into the VM and install docker with these lines:
sudo su; apt-get -y update
apt-get install linux-image-extra-$(uname -r)
modprobe aufs
curl -sSL https://get.docker.com/ | sh
3) Run docker within this VM directly without relying on a "client" and in particular the azure cli.
If you insist on using the docker client approach, my alternative suggestion would be to update your azure-cli and try 'azure vm docker create' again. Let me know how it goes.
sudo su
apt-get update; apt-get -y install nodejs-legacy; apt-get -y install npm; npm install azure-cli --global
To add an additional answer to my question, it turns out you can do the same using the docker create command ...
docker-machine create $vmname --driver azure --azure-publish-settings-file MySubscription.publishsettings
This method works for me.

VestaCP Cannot Open After Install

I use CentOS 6 in my VPS, and then I install VestaCP (Putty). Installation is finish, without error, but the IP cannot open. (https://xxx.xx.xx.xxx:8086), Anybody can solve this case?
The correct port after install is 8083

Pairup with Tmux and Ngrok

I'm having a little trouble getting my client to connect. I'm able to have ngrok tell me the port, but when I go to the client and execute:
ssh pairup#ngrok.com -p 57613
I get
ssh_exchange_identification: Connection closed by remote host
Any ideas why this is happening? I'm on a Mac, and I followed these steps: https://www.adaptivelab.com/blog/pair-programming-with-tmux/
Thanks a lot for your time
It could be that you don't have the ssh server installed on the machine you're running ngrok, so, the connection is refused.
To install it just type the following in a terminal:
sudo apt-get install openssh-server

Resources