Spawning docker - the requested resource is in use - docker

I creates multiple containers remotely in the VM, but sometimes after rebooting the VM it gets this error and only restarting the VM helps. Do you know what this error means and how to solve it?
Docker API responded with status code=InternalServerError,
response={"message":"hcsshim::CreateComputeSystem
21b0a2583de03c0bb0871be6fc19580b74382c2afe697370b13edac0f31379ab: The
requested resource is in use.\n(extra info:
{"SystemType":"Container","Name":"21b0a2583de03c0bb0871be6fc19580b74382c2afe697370b13edac0f31379ab","Owner":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\Docker\\windowsfilter\\21b0a2583de03c0bb0871be6fc19580b74382c2afe697370b13edac0f31379ab","Layers":[{"ID":"6e512ed6-358b-5ade-be48-2ffe0aca7198","Path":"C:\\ProgramData\\Docker\\windowsfilter\\99f07daca1c1f27cebf6734e629331f2591365fb10f01087af5006daaf08dcfe"},{"ID":"89732e48-50f0-58fc-924e-116de51e7fa8","Path":"C:\\ProgramData\\Docker\\windowsfilter\\ffeb491d61491478f7db8de90727ec187246889b07289fcf0167cd81f81bc578"},{"ID":"4d107d52-32b1-58ef-8300-0a6e663ffc96","Path":"C:\\ProgramData\\Docker\\windowsfilter\\1d3356c9b099fb80301e6e2f4f3a47bbc422e7ddb9c496827d45d9c6e04f5fc2"},{"ID":"0b71aac6-7318-5347-a670-992c14d06613","Path":"C:\\ProgramData\\Docker\\windowsfilter\\def8b69f42a59ecf75bc8f74ab8a89a08378ce9a8c08b23a266e5b3c6a698e5f"},{"ID":"713ec9da-4c17-5a81-b458-3bd4a5f6ed27","Path":"C:\\ProgramData\\Docker\\windowsfilter\\abe1c469fd4c7650f55042c06cbe401b02c8bd5aedcb7fabd8c8d7e4a42f827f"},{"ID":"099b6b2c-1067-50b3-99bc-ec9d34027c52","Path":"C:\\ProgramData\\Docker\\windowsfilter\\3f6a34abe173f55b59669c859cc160436dc0d1222d9771bd907098e65efd2d60"},{"ID":"98b515ee-aa27-5fd2-bc30-ef80416b0f6f","Path":"C:\\ProgramData\\Docker\\windowsfilter\\6968b8cb1c76650fd4cb00f6daa20196c48ed3ea859da838b1e983900ceed1cd"},{"ID":"47ef818f-b569-530b-b886-3b94002eb19e","Path":"C:\\ProgramData\\Docker\\windowsfilter\\75114c4fe304656f0ad6be10eebc8e4a44ea193058bf444b536e2ecd8aa1671b"},{"ID":"0e70a491-247c-5574-b86a-24f209823e52","Path":"C:\\ProgramData\\Docker\\windowsfilter\\0193da6cbfd630787e298c7aa77274cd40ac3b444edbcaacfb725f9365210c36"},{"ID":"c3c2426f-1d1e-59eb-bd25-9fdb6bc2677e","Path":"C:\\ProgramData\\Docker\\windowsfilter\\06552a9e13e92f67a507de20d1e3a68e94a3510e716b7591d731d4637b3b6441"},{"ID":"ff3c665d-3a3b-563e-9c80-1f86fa8e7735","Path":"C:\\ProgramData\\Docker\\windowsfilter\\3d5e3b9c49041934ffa8917fb26401e6844a65ae0609705cecf57c958f0821c6"}],"ProcessorCount":5,"MemoryMaximumInMB":6675,"HostName":"21b0a2583de0","HvPartition":true,"EndpointList":["b1c4f68a-6037-4335-ad37-64cd6330159d"],"HvRuntime":{"ImagePath":"C:\\ProgramData\\Docker\\windowsfilter\\06552a9e13e92f67a507de20d1e3a68e94a3510e716b7591d731d4637b3b6441\\UtilityVM"},"AllowUnqualifiedDNSQuery":true})"}

stupid message but the problem with parameter -memory https://forums.docker.com/t/error-the-requested-resource-is-in-use-only-when-using-memory/95851 I will spawn docker in windows server and I will be able to use parameter isolation which resolves docker bug

Related

Docker Engine Fails to start on Windows Server 2019

Our application is docker based and requires Nat network to be created on the host machine in order to communicate since its a web service. It was working since last 4 months and suddenly stopped working. Checked and found that docker service is stopped. Manually tried restarting the service but it failed to start. Below is the error in the event log:
Error:
fatal: failed to start deamon: Error initializing network controller: Error creating default network: failed during hnsCallRawResponse: hnsCall failed in Win32: There are no more endpoints available from endpoint mapper. (0x6d9)
Tried the below steps:
Deleted the hns.data and restarted the hns service. Then restarted the docker engine service. The issue persists.
Tried running MOFCOMP. Same issue.
Tried removing docker and reinstalling it. Doesn't work.
Tried creating nat network manually. But getting the above mentioned error.
Can someone help here? what needs to be checked or what could be the reason for this issue?

DTLSv1_listen unable to accept second client in a docker container

I'm experiencing an issue with OpenSSL/DTLS server.
Environment: docker container based on CentOs7
OpenSSL version: OpenSSL-1.1.1d
A DTLS server (non-blocking) using DTLSv1_Listen having a UDP socket with SO_REUSEADDR is unable to accept a second
client connection when it has already been accepted a client connection and serving it.
When the first client has finished, the second client connection is accepted.
I have used the dtls_udp_echo.c (taken from http://web.archive.org/web/20150617012520/http://sctp.fh-muenster.de/dtls-samples.html ) to carry out the test and reproduce the issue.
The test application has been compiled and executed within a docker container, having CentOS7 as base image, but the behaviour has been noticed with other base images OS too (e.g. Redhat, Ubuntu, Debian, SLES).
The same application running on a bare metal works without any issue.
Is there any known compatibility issue between Docker and OpenSSL/DTLS?
Is there any specific configuration to be done to overcome this issue?
Best Regards

Jenkins ssh why it shows this error com.jcraft.jsch.JSchException: channel is not opened?

I know I posted a question that was bogging me for days but found a solution for it just 5 minutes after posting so I am posting about this problem that I get ever since 2 hours, anyway, I have a job in Jenkins that executes a series of commands remotely via SSH but before there is a connection establishment it throws me this error: com.jcraft.jsch.JSchException: channel is not opened, on my topology I have the Jenkins server in my main pc and I want to communicate with a CentOS 7 VM, on my jenkins I have configured everything (the SSH agent on global configuration for example), on my CentOS 7 VM I don't think that there's a need to open the port 22, my expected results are obviously the possibility to execute the script (let's begin by connecting), my VM has the ip of 192.168.127.129, if you want another information you can ask me by commenting, thanks in advance
I did not resolve the problem, however my VM was in host only connection, I changed it to NAT and problem solved but it isn't a permanent one nor best practice, now my VM is connected to the internet and is exposed to all of its dangers

Rancher server not finding the rancher agent on same server

Issue
So my problem is that I can't get the rancher server to find the rancher agent. I've looked at the Rancher Troubleshooting FAQs but that haven't helped with my issue. I'm using one server for both the rancher server and the agent and I'm setting the CATTLE_AGENT_IP to the IP of the physical server.
I'm running Ubuntu 16.04 and docker 1.12.3.
Iptables
At first I thought it might be a firewall issue, but I've tried disabled it and no luck.
Logs
Rancher agent error log message
time="2016-10-27T11:56:50Z" level="info" msg="Host not registered yet. Sleeping 1 second and trying again." Attempt=5 reportedUuid="492dc65c-6359-4a40-b6e3-89c6da704ffb"
I feel like I've tried everything without any result. Anyone have an idea what could be wrong or how I could continue to troubleshoot the problem?
Are you reusing the host from a previous Rancher install?
If so, there is sometimes old credentials that are tried instead of the new ones for the host. The files are in /var/lib/rancher. (they are .files so you need ls -a to view)
If you are using a self signed SSL cert it will fail to register if you are not bind mounting the CA root cert. See http://docs.rancher.com/rancher/v1.2/en/installing-rancher/installing-server/basic-ssl-config/ the last section "Adding Hosts" for more info.
I solved my issue. The problem was a faulty CATTLE_AGENT_IP. Apparently you can not have http:// before the IP address.

Docker network issue: Server misbehaving

I am trying to resolve this network issue which I am facing multiple time while performing any docker commands like "Docker search Ubuntu".
I get an error saying:
"Error response from daemon: server misbehaving.
Can anyone help me on this?
For those who have this problem, it is typically related to having an issue with your DNS being unable to resolve index.docker.io. I had this issue today working from home where my internet connection has a default DNS server that is notoriously flakey.
My dev environment is OSX and I easily solved the issue by changing my DNS servers in network settings to Google's DNS servers (8.8.8.8 and 8.8.4.4) and then restarting my docker host through docker-machine restart MACHINENAME
Faster/Easier Solution: login to docker-machine and fix the dns.
Turns out you don't have to go to all the trouble and waiting associated with restarting docker-machine. Just login to the docker machine (i.e. docker-machine ssh default) and edit /etc/resolv.conf - Add the dns settings from your host machine at the top of resolv.conf.
This is more or less what happens when you restart docker-machine and explains why some repositories are unreachable sometimes after you switch networks.
I also had the exact same problem. Then I stopped the docker-machine and started it--it worked.
Make sure that, when you run this, you are connected to the internet, as Docker needs to be able to do this.
My issue not solved with stated Answer here.
This is problem with resolving Host... I was getting random error time out and misbehave
You need to enable through a configuration property experimentalHostResolver in %APPDATA%\rancher-desktop\settings.json. By default this property is set to false, meaning that the default DNS process in the rancher desktop will be handled through dnsmasq. However, if this property is set to true the default DNS lookup will switch to host-resolver.
NOTE: This feature can only be enabled for Windows currently and it is
an experimental feature
You can take a look at the example settings.json file below as a reference:
"kubernetes":{
"experimentalHostResolver":true <== This is the config!
},
Reference

Resources