I am new to using Docker with Intellij and am using default auto-generated settings. For a new Docker Run configuration we can see the Dockerfile was selected - and crucially the default MacOS Docker Server was selected:
The connection is successful:
However when I attempt to run this configuration an error message and/or dialog box saying "Not connected to docker"
Am i missing a step? What needs to be done to be able to run/debug this Docker image?
The lead QA at JetBrains #CrazyCoder (and highly prolific Answerer here on SOF) requested a bug submission for this : it is at https://youtrack.jetbrains.com/issue/IDEA-277307.
Update: the very very latest version of IJ 20.2.1 has this completely fixed ! The two-weeks ago version was mine at 20.2 (new laptop install) so that minor release did the job!
Related
On my windows server 2022, I recently installed Teamcity Professional 2022.10 (build 116751) using the windows installer, and once I got it up and running I an agent through 'Install Agent' in the GUI, again using the windows installer.
I then created my first project, which I managed to do a successful build for, also running my tests. The next step was creating a docker image from this build, and pushing it to my repository. Here however, I am facing issues: my installed agent is not compatible for that build, giving me the following incompatibility error:
Incompatible runner: Docker
Unmet requirements:
docker.version exists
docker.server.version exists
While it's clear to me that something is going wrong with the docker version, I'm not sure what exactly, or how/where to fix it. Since both the agent and the teamcity installation are running as windows services (Windows server 2022), I'm not sure if the docker version has to be installed in something running in the agent service, or simply on my windows server installation. The latter is the case: running docker info shows that it is installed.
I have tried to somehow connect to my agent, to try and install docker there, using its hostname through RDP, which does promt me for a username and password, but I have no idea which combination to use there. I have tried using the credentials of my account running the process, but none of the credentials seem to work. Nowhere in the installer did I have to pick any credentials, so I am not sure how to connect to the agent at all, or if I even can/must connect to it to install docker on it.
I found also some logging on the agent:
[2022-11-05 17:07:49,729] INFO - rains.buildServer.AGENT.DOCKER - Failed to parse version: Docker version master-dockerproject-2022-03-26, build dd7397342a
[2022-11-05 17:07:49,729] INFO - rains.buildServer.AGENT.DOCKER - Docker client is not available. Check whether it has been installed and PATH environment variable contains path to it.
[2022-11-05 17:07:49,777] INFO - Server.powershell.agent.DETECT - Found through registry: PowerShell Desktop Edition v5.1.20348.1 64-bit(C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe)
[2022-11-05 17:07:49,778] INFO - Server.powershell.agent.DETECT - Detecting PowerShell using CommandLinePowerShellDetector
[2022-11-05 17:07:50,125] INFO - rains.buildServer.AGENT.DOCKER - Docker-compose is not available. Check whether it has been installed and PATH environment variable contains path to it.
In the parameters of my agent I can find the path parameter, which includes 'C:\Program Files\Docker;' which makes me think it is indeed the docker installation of my windows server that matters, but I then fail to see what is going wrong exactly.
Since the agent was installed as a service, it uses the docker version of my windows server installation. I wanted to do a reinstall of docker to see what was going wrong, and I noticed that I couldn't uninstall it through for example control panel, windows seemed to have no idea that it was installed, even though docker info would specify both a client and a server that were running.
After hunting down all the 'hidden' docker files of the installation and reinstalling it on the host machine, these warnings went away.
I'm still not sure if it's possible to connect to the build agent though, but since it seems to use the resources on the host machine, that seems to not be necessary anyhow.
I'm trying to setup docker with WSL 2 to run a Dockerfile. I downloaded Docker Desktop, and when I tried to follow the quick start guide, I got the following error:
docker: error during connect: This error may indicate that the docker daemon is not running.: Post "http://%2F%2F.%2Fpipe%d2Fdocker_engine/v1.24/containers/create?name=repo": open //./pipe/docker_enginer: The system cannot find the file specified.
I set com.docker.service to run in the Task Manager, and have run:
“c:\Program Files\Docker\Docker\DockerCli.exe” -SwitchDaemon
I have also quit Docker Desktop and reopened it in admin mode, and I still get the message that Docker Desktop has stopped.
Please let me know if there's any other options, thanks!
I managed to solve the problem in this way:
delete config file AppData/Roaming/Docker/settings.json
start Docker Desktop (it will create new default settings.json)
You need to re-configure settings, so it is also good idea to save the old settings.json and compare settings with the new one.
If you are running Docker Desktop for Windows 4.5.0 then you should be aware of an existing issue where the default backend selected after installing is not the correct one.
You can switch to the correct backend manually by editing the file located at: %AppData%\Docker\settings.json (full path: C:\Users\%UserName%\AppData\Roaming\Docker\settings.json) and at the bottom of the file change the value for the wslEngineEnabled field to true. After that Docker Desktop should start correctly.
Similar issue and solution is mentioned here by the user mccaa25.
latest version 4.5.0 It won't work for me too, for me downgrade to 4.4.4 it worked. It may be problem with the latest version
for released note and older version Here
Note: You can install an older version and update to latest version 4.5.0
Wow! I spent multiple days trying to get Docker for windows 11 to work. What finally did it was downgrading to version 4.4.4 as #GinglrBell recommended. Here's a link Docker version 4.4.4.
Make sure WSL is installed and virtualization is enabled. If you try to open WSL and you get an error telling you to enable virtualization in BIOS, run this command as Admin in powershell: bcdedit /set hypervisorlaunchtype auto (Docker src). Then restart your PC.
I hit this issue today, and the steps below are what worked for me - the gist is that I needed to install WSL 2 beforehand. Most of my steps were derived from here:
open powershell as admin
wsl -l -v # Windows Subsystem for Linux has no installed distributions
install linux kernel update from here # in my case, x64-based
wsl --set-default-version 2
wsl --list --online # shows several linux distributions, I picked a recent one
wsl --install -d Ubuntu-20.04 # then create default linux user name and password
install windows docker desktop from here # now starts successfully
Manged to switch to Windows Containers. (Docker v4.9.0)
What I did was to change the following in the settings.json:
"useWindowsContainers": true,
"wslEngineEnabled": true,
Also set security on folder:
C:\ProgramData\Docker (I set "Everyone" full control.)
After that I used the "Switch to Windows Containers"-feature from the task-bar icon content menu
I tried Janne Rantala's method.
But the same problem occurs again after several days.
My final solution is to uninstall Docker Desktop, then download and run the installation file as an administrator.
Then the problem no longer appears again.
I was able to resolve this issue on my machine by installing the Linux kernel update package as described in the Microsoft guide
I have been having some Docker setting up troubles for a fair amount of time. I think I had to just make sure I removed all references of Docker. After buying Windows 10 pro I still had issues, I did have to look into the following folders:
C:\Users\%UserName%\AppData\Local\Temp\Docker
C:\Users\%UserName%\AppData\Roaming\Docker
I also deleted the Docker file in my programfiles folder
Navigated to said file and deleted Docker files.
Used the docker installer, checkboxes (to use wsl2).
I was faicing the same issue and resolved. I have just open Microsoft Store application and after that opened the docker and its working fine. This is wired but sharing this so it might helps someone.
I solved this issue by enabling the windows feature "Windows Hypervisor Platform" and restarting my computer.
I installed Docker Desktop v4.16.2
When I try to startup Docker Desktop on a new M1Max, it gets a fatal error that the "Docker daemon failed to start". The last log item for the daemon is just a debug message "Calling HEAD /_ping".
I'd like to try to start the daemon manually on my Mac to see if there are better error details, but all of the docs for that mention using dockerd which isn't available on the Mac install.
Background: I just switched from an older MBP to a new M1Max. I replaced my Docker Desktop with the new version for Apple Silicon and everything started up fine. However, some of my containers were having issues on the new arch. While debugging those issues, I restarted Docker Desktop and began experiencing this issue. I've tried restarting my mac, but it just gives me the same error again. I've tried downgrading Docker Desktop to the last handful of older versions and still get the same message. The strange thing is that my log file for dockerd hasn't been touched since before I restarted Docker Desktop when I first encountered the error. It's like the daemon isn't even trying to start anymore. Any help would be greatly appreciated.
UPDATE: I just reset my Mac back to my starting point (after using the migration assistant to port my old MBP to the new). When I first install Docker Desktop for Apple Silicon, it starts up normally and everything runs fine. If I check on the dockerd logs, I can see it being written to. However, as soon as I restart Docker Desktop, I get the error mentioned above and dockerd stops writing to logs. Then, every time I try to start Docker Desktop, it errors with the message above.
do the following
clean uninstall docker either using brew/appcleaner
Manually install 4.5.0 M1 - https://docs.docker.com/desktop/mac/release-notes/
that is after manually installing ensure to uncheck automatic software update from setting
!! It worked for me !!
I have been trying to update the version of Docker Desktop on my laptop. The latest version as of a couple of weeks ago is Docker Desktop 3.3.3. I downloaded the installer and double clicked on it to begin the installation. I confirmed execution, resulting in a window saying "Downloading package", with a heading of "Extracting installation manifest..." Then a window saying "Do you want to replace your current version of Docker Desktop 3.3.1 (63152) with this new one (64133)?" appears. After I click on "Yes", this attached error window pops up. I tried stopping and uninstalling the previous version (3.3.1), but my PC refuses to do this. I am at the end of my rope trying to get my PC to do the simplest installation. I have been working with Docker for just over a month and want to do some tutorials and labs so that I can hit the ground running once I have real work to do with it. I would appreciate any help I can get.
Had exactly the same problem as you.
You have to delete the key "Docker Desktop" and all its sub-keys, situated at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" in the Windows Key Registry.
When installing Jenkins (LTS) on windows 10 via the installer, after choosing the JDK folder - an error pops when the service is trying to start.
The error reads: "Jenkins failed to start - Verify that you have sufficient privileges to start system services"
Let me make it clear that I DO have sufficient privileges, yet something is not working.
I tried many different suggestions to fix this issue, and read many posts but none helped.
Also, a lot of these posts are getting old and I'm not sure how relevant they are these days.
I found a way to fix this issue, and I'll post it as a suggested answer. This could also work for other installers, but it was only tested with the Jenkins installer.
However, if anyone knows a better way to fix this - please share it with us.
Hope this method will help many people!
Important: If you retried the installation too many times, skip down to "Option 2". The local user account that runs Jenkins may be locked. You will need to unlock that account before attempting either fix below.
This is how I fixed the problem.
Option 1: Re-enter credentials for jenkins user
Please read it all before executing and follow the steps in order:
Delete any Jenkins installation leftovers you currently have
Start the installation process, input your credentials when asked, and continue with the on-screen instructions (including choosing the JDK folder) up until the point where the error is raised.
When the error is raised, >>> DO NOT DO ANYTHING! <<< leave it as it is shown in my question
Now (and only now), open "Services"
Search for the "Jenkins" service. It should be set to "Automatic", but it might be "Disabled"
Open the "Jenkins" properties, and go to the "Log On" tab
Make sure you choose the "This account" radio button, delete the account name and password fields, and enter them AGAIN
Click "Apply"
Go back to the installer and click "Retry"
If everything is according to plan - The installation will now continue without a problem.
This method was tested on a local and VM / AWS computer and worked!
If you still encounter a problem, try changing the startup in step 5 to "Automatic" and make sure you only open "Services" on step 4. "Services" will not update while it is open.
Option 2: Unlock jenkins user account and manually start service
If you encounter the "Service 'Jenkins' failed to start" error too many times, the account on your computer that should run Jenkins will become locked. You will need to unlock that local account first. Keep the Jenkins installation window open with the error message, and then perform the following steps:
Open the "Local Users and Groups" application.
Go into the "Users" folder.
Right-click on the user who will run the Jenkins service, and click "Properties".
Uncheck "Account is locked out". And while you are at it, make sure "Account is disabled" is unchecked as well.
Click OK.
Open the "Services" app on your computer.
Make sure the Jenkins service is set to start automatically.
Right-click the Jenkins service and click "Start". The service should start successfully.
Switch back to the Jenkins installation window with the "insufficient privileges" message still showing.
Click the "Retry" button in the "insufficient privileges" message box. The installer should recognize that the Jenkins service has started.
You should be able to finish the installation.
It didn't work for me until I installed Java Runtime Environment (JRE) 11.
For me wasn't working because java installed was jre-8u301-windows-x64.exe
I installed x86, jdk-8u301-windows-i586.exe and it worked
I had the same issue, I have both jre8, jdk 8 and jdk 11 corretto, I think there are some compatibility issues using these versions of java. I was able to fix it by installing jre mentioned above by #maksym which is this.
The Jenkins versions that I am trying to install are 2.332.2 LTS and 2.345. I am able to successfully install 2.332.2 LTS
I fix it with:
Uninstall all thing what linked with jenkins: foldert where i try to install and installer
Download again the jenkins installer
When i started reinstall next time, i had another issue with not correct jdk version, i downloaded 17.0.4.1 version
After that steps i didn't have previous error (Jenkins failed to start) again
Open cmd prompt as admin
Run
net user administrator
If the property value of Active in the response is No then Run
net user administrator /active:yes
This fixed the issue for me