How do I install a mesos plugin - jenkins

I want to install a plugin on my mesos cluster :
http://jenkinsci.github.io/mesos-plugin/
The mesos-jenkins plugin require access to a mesos executor (/usr/lib/libmesos.so).
I am trying to mount it on my host as a volume so I can use it in jenkins by mounting it on jenkins.
See example here
It does not work, I have the following error:
ERROR: for panteras Cannot start service panteras: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\\"/usr/lib/libmesos.so\\\" to rootfs \\\"/var/lib/docker/devicemapper/mnt/2cd649dab477b8b743a967642847a0579a733a87163a37aad94154200ebb183d/rootfs\\\" at \\\"/var/lib/docker/devicemapper/mnt/2cd649dab477b8b743a967642847a0579a733a87163a37aad94154200ebb183d/rootfs/usr/lib/libmesos-1.2.0.so\\\" caused \\\"not a directory\\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Do you know how I could get through?

Related

Docker error failed to create shim: OCI runtime create failed: container_linux.go:380:

ERROR: for app_web
Cannot start service app_web: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:75: mounting "/host_mnt/Users/akanwar/Documents/c/cbax-config" to rootfs at "/cbax-apply-platform/node_modules/#c/cbax-config" caused: mkdir /var/lib/docker/overlay2/a3bccebb167966c795860d95a5a758f244ae5da780f962333f0d51d2d8b2def7/merged/cbax-apply-platform/node_modules/#c/cbax-config: operation not permitted: unknown
STEPS TAKEN TO RESOLVE
deleted the docker data ran everything.
From Docker widget Clean / Purge data
From Docker widget reset to factory settings
docker system prune --all
https://github.com/docker/for-mac/issues/1396 I followed this link as well and tried the solutions mentioned in it , but still none of it worked for me.
None of the solutions worked for me
You need to remove this from all services:
- ${CBAX_PATH}/cbax-apply-platform:/cbax-apply-platform:rw
You cannot mount a folder and then also sub-folders. This is wrong:
- ${CBAX_PATH}/cbax-apply-platform:/cbax-apply-platform:rw
- ${CBAX_PATH}/cbax-application-pages:/cbax-apply-platform/app/assets/components/cbax-application-pages:rw
Also you mount a lot of host folders in multiple service with read-write access. I think that makes a mess of your files on the host if all services start modifying files. It's better to mount them read-only.
This happens when the docker-compose file was looking for the folder cbax-config path on my machine on mac OS. MacOS doesn't have an cbax-config therefore it was not able to mount.

Docker (in Azure App Service) Running out of space

A docker container running jsReport is running out of sapce and the container is failing.
Error in logfile
2021-07-13T07: 37: 25.469Z ERROR - Container start failed for xxxx
with System.AggregateException, One or more errors occurred. (Docker
API responded with status code=InternalServerError, response= {
"message": "OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container
init caused: rootfs_linux.go:59: mounting
"/var/LWASFiles/Sites/xxxx/appsvctmp" to rootfs at
"/mnt/data/docker/images/231072.231072/aufs/mnt/7c0065c198b3881806bb293ccee0ceef29b8b619bb47a7512f9b5485557811d5/appsvctmp"
caused: mkdir
/mnt/data/docker/images/231072.231072/aufs/mnt/7c0065c198b3881806bb293ccee0ceef29b8b619bb47a7512f9b5485557811d5/appsvctmp:
no space left on device: unknown" }
Problem started when I was updating to service where each dowload was about 200MB+.
I could probably fix this by removing the service and create a new one OR up the service plan which adds more space.
However I would think there must be a way to use docker commands to clean up some of these upgrade files. Can anyone point me in the right direction?
you can use docker system df command to see the reclaimable space as shown in below image
you can use the docker prune command to remove the unused objects such as images, containers, volumes, and networks
https://docs.docker.com/config/pruning/

Docker mounting /tmp/pulseaudio gives error

I am trying to get sound out of my docker container. I am working on a Raspberry4 with Ubuntu 20.10.
When starting the container, I am using following lines to mount soundfile folders:
-v /tmp/pulseaudio.socket:/tmp/pulseaudio.socket
-v /tmp/pulseaudio.client.conf:/etc/pulse/client.conf
However, I am getting the following error:
docker: Error response from daemon: OCI runtime create failed:
container_linux.go:367: starting container process caused:
process_linux.go:495: container init caused: rootfs_linux.go:60:
mounting "/tmp/pulseaudio.socket" to rootfs at
"/var/lib/docker/overlay2/cde617898e2ee8e181a48cf84db8dbcdf5bfdf57e5760493f7c5fce1640b59d5/merged/tmp/pulseaudio.socket"
caused: not a directory: unknown: Are you trying to mount a directory
onto a file (or vice-versa)? Check if the specified host path exists
and is the expected type.
How can I fix this issue?
It seems you are trying to mount something that not exist in the host to a file that exist in the docker.
In this case the behaviour is (see here):
If you use -v or --volume to bind-mount a file or directory that does not yet exist on the Docker host, -v will create the endpoint for you. It is always created as a directory.
So docker will create a folder in the host and try to mount it to a file in the container, and this is why you get error.
To fix it, you just need to check that the file is exist in the host, in your case /tmp/pulseaudio.socket and maybe also /tmp/pulseaudio.client.conf.
Please note that with -v the left path is for the host and the right is for the container.
-v /path/in/host:/path/in/container

Docker is not recognizing a directory as directory in Arch Linux

Basically, I'm getting this error when I try to create my containers:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:337: starting container process caused "process_linux.go:403: container init caused \"rootfs_linux.go:58: mounting \\\"/etc/timezone\\\" to rootfs \\\"/var/lib/docker/overlay2/8864cea6615c7c165fce558661bf297c43ebf90f4de534ca9c9bd38f7af8b487/merged\\\" at \\\"/var/lib/docker/overlay2/8864cea6615c7c165fce558661bf297c43ebf90f4de534ca9c9bd38f7af8b487/merged/etc/timezone\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.
No Idea why this is happening. It was working perfectly on Manjaro, but not working on Arch Labs.
The image used expects a directory at /etc/timezone that is not used on Arch Linux.
Expected /etc/timezone contents example:
Etc/UTC
Simply remove that bind mount from your command or docker-compose file. You need to set the timezone at in the container differently or find a way to keep the /etc/timezone file in sync with /etc/localtime.
/etc/timezone is a Solaris and Debian thing, I guess. It expects the timezone as a pair
Europe/Zürich

Docker rootfs_linux.go permission denied when mounting /proc

I'm using meteor-up to deploy to docker instances inside an LXD container. When it attempts to bring up a MongoDB docker instance, it fails with the following error:
docker: Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused "process_linux.go:368: container init caused \"rootfs_linux.go:57: mounting \\\"proc\\\" to rootfs \\\"/var/lib/docker/vfs/dir/20a621a73755db3f4030bc67bbf7ff9540bd1d63bb348d8be440d8ca63d3c922\\\" at \\\"/proc\\\" caused \\\"permission denied\\\"\"".
I've tried deploying as the ubuntu user to my LXD container, and as root, and that hasn't helped. There's obviously some permissions issue here, but I don't know where to start debugging this problem.
According to https://discuss.linuxcontainers.org/t/having-trouble-using-docker/383 it sounds like you might need to set security.nesting=true. Stop the container (lxc stop deploy-container), configure nesting on (lxc config set deploy-container security.nesting true as per https://insights.ubuntu.com/2015/10/30/nested-containers-in-lxd) and lxc start deploy-container.
For Proxmox users: https://www.youtube.com/watch?v=79KiCBNbsbg
Enable Nesting feature on the container to fix the following error
ERROR: for mysql-8.0 Cannot start service mysql-8.0:
failed to create shim: OCI runtime create failed:
container_linux.go:380: starting container process caused: process_linux.go:545:
container init caused: rootfs_linux.go:76: mounting "proc" to rootfs at
"/proc" caused: mount through procfd: permission denied: unknown
But other users Proxmox users say to enable keyctl too.
If you still have errors you may need to remove domain_name and hostname from the docker-compose config to fix the following errors as said here.
ERROR: for mariadb10-4 Cannot start service mariadb10-4: failed to create shim: OCI runtime create failed: container_linux.go:380:
starting container process caused: process_linux.go:545:
container init caused: write sysctl key kernel.domainname:
open /proc/sys/kernel/domainname: permission denied: unknown

Resources