I'm unable to install Jenkins slave as Windows service and getting the following exception:
WMI.WmiException:AccessDenied
If you facing the access denied issue for install as windows service after installing the jenkins.war.
Just close everything.
- Run command prompt with Admin rights.
- Proceed to your jenkins directory using cd (or just copy paste the path into the command prompt).
- Run the command: java -jar jenkins.war
- wait for jenkins to be up.
- Login into the Jenkins
- Manage Jenkins > Select install as Windows service.
- This will install it as windows service.
Just install the slave using admin rights.
run slave-agent.jnlp using admin cmd.
and then try for install as service option under file.
it will work.
Related
I have freshly installed Docker for Desktop Edge in Windows 10 Home and try to build an image using the docker build command. But unfortunately, it didn't work for me, and got the below error :
CMD - docker build -t heet1996/post:0.0.1 .
error during connect: Post https://192.168.99.100:2376/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=na8ugnpn6d8gnxl3z8ppx4gap&shmsize=0&t=heet1996%2Fpost%3A0.0.1&target=&ulimits=null&version=1: 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.
Earlier I was using a docker toolbox so I had to remove all the environment variables related to the Docker in my User variables before installing Docker for Desktop. After a lot of search on GitHub issues, I am still not getting the solution.
This is what I found in my service.txt file (C:\ProgramData\DockerDesktop\service.txt)
[18:27:22.232][LoggingMessageHandler][Info ] [f9b6b957] <Server end> POST http://localhost/dns/refresh-hosts -> 204 NoContent (took 118ms)
I got this error when i un-installed the docker toolbox and installed the docker desktop.
System Configuration:
OS: Windows 10 Home
Version: 21H1
Steps I Followed:
Un-installed the docker desktop.
Removed the all dockers related environment variables from the user variables.
Navigation: This System-> Properties-> Advance System Settings-> Environment Variables-> User Variables.
Re-installed the docker desktop and it's started working properly.
Try to run it on Docker CLI instead of CMD
Open Powershell as Administrator and run the below commands
cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon
Docker for windows must have:
[✓] Updated Windows 10 version >=2004
[✓] WSL 2 and Default Distro (i.e ubuntu)
The steps are well documented here. These are what to do after the installation:
To confirm ubuntu's installation, open C:/Windows/System32/bash.exe aka bash.
To test if docker is properly installed, run docker version on bash. This should print the docker client and server engine.
After successfully tested and confirmed the installations, try entering your command
$ docker build -t heet1996/post:0.0.1 .
here we are talking about using Docker with PowerShell and not with WSL. And also following the addition of variables in the environment variables of Windows.
Configuration when this response was made:
Windows 10 Pro 20H2 (Build 19042.867)
Docker 20.10.5
Powershell 5.1.19041.610
I also had to configure docker in a dirty way too much, after several hours of research and a comparison of installation on a clean Windows 10 I understood where my error was.
In addition to the user environment variable also make sure that you do not have DOCKER variables in the Windows system environment variables either.
Here is where my error was, I think it was due to the installation of the Docker module
I had the DOCKER_HOST variable in my system variable environment, so i deleted it.
If you want to check all your environment variables with Powershell:
[System.Environment]::GetEnvironmentVariables()
If you really want a Docker fresh installation on Windows, you need to delete the following folders:
C:\ProgramData\Docker
C:\Program Files\Docker\Docker
$HOME\AppData\Local\Docker
$HOME\AppData\Roaming\Docker
$HOME\AppData\Roaming\Docker Desktop
$HOME\.docker
my error, therefore, produced this error:
ERROR ==> error during connect: Get http://docker.artofshell:2376/v1.24/version: dial tcp: lookup docker.artofshell: no such host
After a complete uninstall of all docker (Via chocolatey, official docker ...) and by properly installing Docker from the official executable here everything is back to normal
Then if you want to use docker via Powershell you have to change the configuration of DockerCLI as you can see on many answers
Conclusion
It is possible to use docker with Powershell you must check if the
server daemon is used by Windows/amd64, you can modify the daemon with this command cd "C:\Program Files\Docker\Docker"; .\DockerCli.exe -SwitchDeamon
You can check the configuration of the daemon with the following command: docker version
You must remove all traces of old Docker installations if you had any
You must delete the environment variables from the old installation or from the docker toolbox
You must also activate the experimental features: information here
I installed Dock via chocolatey install docker-toolbox. After installation, docker info is not working.
C:\Users\Chloe>docker info
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/info: open
//./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration
on Windows, the docker client must be run elevated to connect. This error may also indicate that the
docker daemon is not running.
C:\Users\Chloe>docker --version
Docker version 18.03.0-ce, build 0520e24302
https://docs.docker.com/get-started/#test-docker-version
I did run it from an Administrator shell.
Windows 8.1.
Had to run Start > Programs > Docker > Docker Quickstart Terminal which ran a lot of commands. Then in my original Console2 shell, I ran refreshenv. Then docker info would work. (I already had VirtualBox installed (choco install virtualbox).)
To install a Topshelf service, I normally simply do:
myservice.exe install
If I want to install the service on a remote machine, I can't just do:
\\server\c$\myservice.exe install
...because it would still install the service on my local machine.
How can I install a Topshelf service on a remote machine without having to log onto that machine and run the executable directly from there?
Microsoft provides a tool called PsExec. It has a whole bunch of feature one of which is to run command on remote machines.
Edit:
File Deployment: To get the files to the target machine you would have to do some sort of copy, whether that be manually or with some sort of script.
Install: Install psexec on your machine, it may need to be installed on the remote machine but I do not remember. Open command prompt on your machine, type
psexec \\remotecomputername -u admin#domain.com -p p#$$w0rd "c:\applications\myprogram\myprogram.bat"
In this case remotecomputername is the name of the computer your are targeting. If you need to login as another user, use the -u and -p switches in the example and finally, put the path to the exe "c:\applications..."
I see a couple of entires for this error but not on Windows 7. I have installed Client version 1.5.0 (Client API 1.17) in to my Windows 7 SP1 machine. I followed the Windows Install instructions with no problem. I run Boot2Docker Start and it is started successfully. However, when I run the docker version command I am informed on version details with a FATA error message below stating:
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
When I run docker -d I am told there is a permission error:
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
FATA[0000] open /var/run/docker.pid: permission denied
I have tried a chmod on the pid file and have checked I am running with Administrator privilege on the Windows machine. I am not sure whether the permission denied is a red herring.
As it appears Windows 7.1 is supported and the install appeared to run smoothly without errors, I am wondering if anyone has come across this problem or has any ideas as to what try next?
Many thanks, rvon
I have downloaded "jython-installer-2.7-b1.jar". I want to install it on Windows 7. What are the steps can I follow? Please guide me.
Pre requisite: Installation of Java
Follow the following steps:
Run "jython-installer-2.7-b1.jar" as below command:
java -jar jython-installer-2.7-b1.jar
Follow the instruction from Jython Installation pop up
After successful installation set PATH as C:\jython2.7b1\bin
Open command prompt and execute the command as below:
jython --version
The output as "Jython 2.7b1" would verify the complete installation and setting path
I followed #RiponAlWasim answer but at the first step the installer stopped saying unable to create directory
To solve this problem Open command prompt as administrator