Mounted remote directory in MacOS is getting unmounted frequently - ios

I've installed OSXFUSE in my Mac and used sshfs to mount a remote directory which is hosted in a Ubuntu server (I usually ssh this server using ssh username#ip). This works fine, but I am frequently getting unmounted, which I again need to mount using sshfs.
Can somebody help me understand why it is happening and what is the way out? My host machine is running MacOS Catalina and remote machine is Ubuntu 18.
Any pointer is highly appreciated.

As your ssh connection remains connected I guess your sshd configuration is Okay. Use -o reconnect option for sshfs. Like,
sshfs USER#HOST:REMOTE_DIR MOUNT_DIR -o
auto_cache,reconnect,defer_permissions

Related

Can not run docker command on windows 7

can not run docker on windows7 command after installation, and there is nothing in virtualbox.
I have tried uninstall and install other versions, run install application administrately and try another dirver but above does not work.
...
when installation finished, i clicked the docker quickstart terminal, and it show me this error message:
dial tcp 127.0.0.1:53822: connectex: No connection could be made because the tar
get machine actively refused it.
Looks like something went wrong in step ´Checking if machine default exists´...
Press any key to continue...
Just a reminder, there are sort of 3 ways to use docker on Windows, if one doesn't work you may want to try another one:
use docker Desktop: it requires windows 10 Pro (In fact Hyper-V maybe it's an option for you)
use docker Toolbox: the one you may have installed on windows 7, it uses Virtualbox and a docker machine VM.
use Virtualbox directly: install a linux distribution with shared folder only for your docker usage
Now since you are on option 2, you should have a virtualbox installed, so you can check if the underlying docker machine is launched by launching virtualbox, it should list the installed vm.
If the vm is not started: you will have to search the problem on virtualbox side, error logs or popup: trying to launch the vm manually directly from virtualbox application will help you
If the vm is started: there may be a connection problem between your host (windows) and your vm (boot2docker), you could try to connect to the vm via bash using "boot2docker ssh" as it is indicated in the quick start. If it works, the connection problem could come from a firewall.
Check if the quick start happened correctly when you have luanched it.
I don't want to make proselitism on other solution, but it may be simpler to use a linux directly in virtualbox (option 3), at least at the beginning to get more familar with docker.
The other simpler option would be to use windows 10
I'm sorry it's not a complete solution, but indications, and it was too long for a comment.
docker server is not running properly. check is you can run docker ps or docker version command successfully.

Docker image ls does not look at the proper IP address

I can see my machine … Windows 10 Home
usuario#DESKTOP-GTCQCAR MINGW64 /c/Program Files/Docker Toolbox
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - virtualbox Running tcp://192.168.99.101:2376 v18.05.0-ce
But when I try to list the images it tries to connect to a different IP ending in 100, instead of 101 where the docker machine is:
usuario#DESKTOP-GTCQCAR ~
$ docker image ls
error during connect: Get https://192.168.99.100:2376/v1.37/images/json: dial tcp 192.168.99.100:2376: connectex: 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.
It can not connect. How can I fix it?
I also faced similar problem after updating from Docker toolbox to Docker for windows.
I solved this problem by deleting all the environment variables starting with Docker.
I am not sure if it will solve your problem as well, but may be it will help someone.
This can also be helpful
Issue can be of having Docker Toolbox installed before changing to Docker for Windows
Uninstalled Docker for windows (make sure Docker Toolbox and VirtualBox are uninstalled as well)
Go to C:\users[USER] directory and remove .docker directory if it is there.
Remove Environmental Variables:
DOCKER_TLS_VERIFY
DOCKER_CERT_PATH
DOCKER_HOST
DOCKER_TOOLBOX_INSTALL_PATH
You might want to restart you computer just to be safe.
Reference: https://forums.docker.com/t/docker-starts-but-trying-to-do-anything-results-in-error-during-connect/49007/5
Check out this great guide: https://docs.docker.com/toolbox/faqs/troubleshoot/
Good luck

Docker client on Windows Subsystem for Linux (Ubuntu) mounts (near) empty directory

I have Windows 10 with Windows Subsystem for Linux installed (Bash on Ubuntu on Windows), have Docker installed on Windows, and a Docker client running on the linux subsystem per this walkthrough. All works well, however, when I want to be able to access a volume on my default mount "/mnt/c/../". I am using the mount flags at docker launch and have tried both:
docker run -v $PWD:/mount
docker run --mount type=bind,source="$(PWD)",target=/mount
and most variations shown here.
I have reason to think this is a permissions issue. When launching from the linux subsystem, there is always one empty folder from the original source directory. When launching from windows powershell, everything is fine. The only difference between the two would be the docker client being used.
I have shared C in the docker host settings in windows, however, do I need to do something similar for the client inside of windows subsystem for linux?
Versions:
Docker client: Docker version 18.03.0-ce, build 0520e24
Docker host: Docker version 18.03.0-ce-win59 (16762)
I had the same issue with the same set-up. After a lot of trial and error and googling, here is what resolved the issue:
Change Windows password to not include special characters.
Reset credentials for docker.
Worked! Weird bug.

getting to the files system of the Alpine linux which runs Docker-for-mac

I am playing with the (awesome) new Docker-for-mac. As I understand it, it runs seamlessly on my mac in an Alpine Linux 'behind the scenes'. Is there a way to ssh into this host so I can see the file system. I want to see the place that docker is storing volume data in /var/lib/docker/....
EDIT: to be clear, it is the host filesystem I want access to, not the containers that run on it. this is the Alpine host
thanks
Docker for Mac doesn't use regular tcp networking for ssh, but you can connect to the unix socket on your Mac by using:
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
and login as root
This seems to be fairly undocumented so YMMV - it worked for me on Version 1.12.0-rc3-beta18 -- it might change in future versions.

Why does boot2docker ip fail?

I am totally confused with this. I have installed boot2docker on Windows. I started it using boot2docker start icon. It has launched successfully. I tried out all the docker commands like pull attach run etc. Everything works fine. But when i try
boot2docker ip
It says
-sh : boot2docker not found.
What's the problem? Am i in wrong directory? or installation done wrongly? Any suggestions.
The windows version of boot2docker doesn't have a native client (unlike the MacOS version). This means that when you launch boot2docker, you're inside the Virtualbox VM. As boot2docker is installed on your host, it's not available from there. You can just open a new shell or dos prompt to run boot2docker commands (assuming your path is set up).

Resources