Docker container is not removable - linux

What I have tried:
sudo service docker restart doesn't change the result
Exact containers behind are:
Suprised that sudo is still not enough
Working solution is to reboot system to kill dockers... But this is not a solution. Thanks in advance if anybody knows what to do with this


My containers in portainer have disapeared and cannot be redeployed

I'm having issues now with my portainer. I run ubuntu with docker and portainer and I ran the apt-get upgrade and install command through the terminal to update some things. now when I go to the portainer all my containers are gone and when I go to deploy them again I get the:
failed to deploy a stack: Creating Container xxxxx Starting Error response from daemon: error while creating mount source path '/docker/ghost/mysql': mkdir /docker: read-only file system
At the time the only thing I could think of that maybe had created this issue was went ubuntu said there were updates to be installed so I let it install and then also ran the apt-get commands in terminal:
apt-get upgrade
apt-get install
My ubuntu storage has 80GB free (someone said may be a storage issue)
I was on the portainer slack channel trying to get help from a staff member he had me try "docker ps" which didn't work I had to try "sudo docker ps" which gave me that second error message listed above.
permission denied while trying to connect to the docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permissions denied
I also went and tried the docker group add from the docker docs and tried adding the $USER to the docker group. I have done that also, it lets me run the hello-world from the terminal but still doesn't let me deploy on portainer.
I still get the same deploy error from portainer:
failed to deploy a stack: Creating Container xxxxx Starting Error response from daemon: error while creating mount source path '/docker/ghost/mysql': mkdir /docker: read-only file system
This was from one of the stacks I tried to redeploy since it has the /docker/"ghost"/mysql. Also, doesnt let me redeploy any other stacks tried that too.
Really unsure what to do and how to fix it since it basically now doesn't let me use any of those containers. Any help will be really appreciated, quite on edge right now! Thanks
I was kinda expecting not to have any of these issues. Not event entirely sure how it happened, I'm assuming maybe when I was using the "apt-get" commands. I don't really know myself. I would just like this fixed so I can get my data and containers back up and going on portainer. Yes, I also know portainer and docker are different and portainer is only a utility for docker.
edit: to add to this I have also re-installed portainer and docker not a full docker refresh but the standard one where it keeps some of the files since I dont want to remove some of the directories where some containers keep there configs and data files

Mount share folder on windows

I am trying to mount to a Windows share folder from RedHat Linux, I have below code in /etc/fstab
//TheWindowsIP/ShareFolder /LinuxPath/LinuxFolder cifs username=username,password=password,domain=windowsDomain,dir_mode=0777,file_mode=0777 0 0
When I run "mount -a" I got a "Resource temporarily unavailable" error, can someone tell me how can I solve this issue? Or maybe advise another way to access the window folder from RedHat Linux(cifs is driving me crazy)
OK, after the tremendous effort of searching and trying in different ways, turns out the only action I need to solve this problem is reboot. I guess, somehow, the content in /etc/fstab will be mount correctly when the Linux start, but cannot be mount properly when I run mount -a. Ahhh what can I say...

Unable to install Docker on Azure VM

I have an Azure VM on which I am trying to install docker. The installation proceeds smoothly. When I try to run the hello world example of docker, I get this error docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
This is the procedure I followed. I have run the docker with sudo. I can't figure out what is causing the problem. Any helps on figuring out this would be much appreciated. I have scoured the internet on fixing this issue. Nothing has worked. I have uninstalled docker completely, and reinstalled it again. Nothing seems to work.
EDIT: I have narrowed down the problem to the fact that the daemon has to be started manually. How do I ensure the daemon starts running as soon as the machine is up or docker is started? Running sudo dockerd and then running docker run hello-world seems to work.
It looks like you are trying to run docker commands as a non-root user.
To achieve that you have to add your user to the docker group, but bear in mind that this can be a security risk, as this group grants root equivalent privileges.
You can find the detailed configuration steps in the post-installation for Linux and information about the risks in the Docker daemon attack surface description
Seems like you daemon isnt running - which VM did you create? Linux based? if so there are few thing regarding to the daemon you must do in order to make the docker work - You need to configure your "daemon.json" or create one if you dont have - Here's the docker documentation that might help you with it -
Best of luck!

Linux CentOS 7 autofs does not mount network share after reboot

I have CentOS 7 Linux VM with cifs installed. I added a mount point using autofs where the whole idea was to automatically mount a network share every time VM boots. However, when I run this command:
ls /mnt/vmshare/trinity
I get
ls: cannot access /mnt/vmshare/trinity: No such file or directory
What I'm having to do is run this command after each reboot
/sbin/service autofs start
Then I can see the files in trinity.
Maybe autofs does not even start by default on reboot. How to make sure autofs starts on reboot? Or in general, how to solve my problem above?
Thanks so much!
for CentOS 7:
systemctl enable autofs
check with:
systemctl is-enabled autofs
I don't recall exactly what I used to figure this one out, but maybe it will get you on the right track.
I did some research on this a few years ago, and I believe the term you're looking for is "persistent mount."
You'll need to create or find the local mount point for your network directory. For instance, in mine.. /media/disco/disknamehere.../.../Share
This must be added to /etc/fstab with the correct options in place. Sorry I couldn't be more help.
Try to run
chkconfig autofs on
that will enable autofs service to start on boot.

Hhvm Unable to read pid file /var/run/hhvm/pid for any meaningful pid after reboot

I have hhvm installed on my server and it was working perfect until I had restart the server. On the log of hhvm i see this error:
Unable to read pid file /var/run/hhvm/pid for any meaningful pid
I tried to give permission to that file doing
sudo chmod +rw /var/run/hhvm/pid
bu still that problem occured. I really need to fix this issue but i have no idea what i have to do :(
any help will be really appreciated,
My OS is ubuntu 12.4
If HHVM isn't running, you can just delete that file. The error is saying that it doesn't contain a valid PID, most likely because it wasn't cleaned up properly on reboot so it still has the old PID in it.
I had the same problem. It turned out that another service was listening on port 9000.
Typical launch command:
hhvm --mode daemon -d hhvm.server.type=fastcgi -d hhvm.server.port=9000 -c /etc/hhvm/server.ini