This was the exact solution to my problem that is facing issue on set up the agent as a windows service . I followed all the steps and solved my issue .Thanks a lot for this excellent explanation of each and every point.
hello vijay i am facing some issues while trying to install the jar file on CMD using the same way you showed in the video can you please help me for resolving it@@devopsvijay
when we create node and trying to make it online we need to put two command in CLI ,But when i put first command it is not creating correct agent.jar ,it is creating corrupted agent.jar with 1 kb or 71kb of size .I checked using verbose and found my server is not able to find agent.jar URL which we are giving using command .What can be the issue?????
Make sure the jenkins is reachable and connectivity is working on specified port .like 8080. There could be many reason Like Incorrect jenkins url Network connectivity Authentication issue Misconfigured jenkins agent
I love your video on windows and linux agents, but the only complaint I have is you do not talk about java and assume its installed on both. With so many versions of java (Oracle Java, OpenJDK, Amazon Corretto, etc...) it would of been good of you to speak of how to decide which one is best to install on a slave node and what version number of the Java is needed. I'm not sure if CloudBees has a reference page for this
Thanks for the feedback. yes java is needed for jenkins slave. you can find detailed info about java support by jenkins. www.jenkins.io/doc/book/platform-information/support-policy-java/ As of June 2022, Jenkins requires Java 11 or newer. This includes Jenkins releases 2.357 and LTS 2.361.1. Jenkins 2.355 and 2.346.1 LTS support Java 17. you can use any java openjdk or oracle. both works for me.
Thanks Vijay for the viedo, it's so much helpful for persons who are exploring Jenkins I have one question, Like I have my Jenkins setup in the Linux machine and I want to establish connection to remote desktop connection (windows). WIll it be done the same way by creating window agent as you have created in the video?
whenever I'm trying to run the 2nd command after saving the configuration of the agent I'm getting this Error: Invalid or corrupt jarfile agent.jar I tried to delete the agent and created new agent still it gives this error. The first command do installs a jar file, but when I run the 2nd command it gives the above error. is there any input from your side, what should I do ?
this is definitly helpfull i just need a tutorial how i can run selenium chrome drive scripts in the windows slave vm after i upload a script to gitlab
Solution that might work is to run Chrome in a 'headless' mode (without GUI). It works with Jenkins Agent running as a service, when GUI is not available. Here is the code sample of the web driver initialization. var options = new ChromeOptions(); options.BinaryLocation = @"C:\Program Files\Google\Chrome\Application\chrome.exe"; options.AddArgument("Headless"); options.AddArgument("window-size=1920,1080"); driver = new ChromeDriver(@"\Selenium.WebDriver.ChromeDriver.2.37.0\driver\win32", options);
or lets try this solution, lets see if this works or not: 1. Open Windows services (or run: services.msc) 2. Double click on Jenkins service 3. In Logon tab, check this box: "Allow service to interact with Desktop" Let me know if see any issue, i will try to get the solution. please Like & subscribe and stay connected for learning with #devopsvijay
@@devopsvijay thank you for the fast replay and this big solution. i think i didnt decript my problem good enought. i have two vm's one is ubuntu no gui i have installes gitlab and jenkins both are connectet to each other now the secont vm is a windows10 mashine i m running it as jenkins slave server. i never worket with jenkins or gitlab befor. just chromedrive to tinker around trying the software. what i know have to do is upload come script on github jenkins should get triggert and copy script send it to slave vm and it should run there and give back some result. i think i will fail at this i dont have mutch time to complete this task for my diploma last 8H
Ohhkay got you. You need build triggers. Use poll scm method and restrict Build to windows vm. You can go through the tutirial Shared couple of links ua-cam.com/video/IhGtoHY5Wws/v-deo.html ua-cam.com/video/Km2A14scdhQ/v-deo.html
i am able to start jenkins as a serivce after following the step. thanks. But in my case its windows based desktop application hence i keep getting below error: This operation requires an interactive window station It seem service does not support interaction with UI :(
Hi , i have tried same method what you showed in remote desktop machine. Everything is fine(service is running). But I dont know why broken connection is getting with in 1hr of setup. When I open in jenkins agent folder or jenkins.err.log file again agent is online in my local machine.
This is some new kind of error. can you paste any stacktrace which you might see in error log file.. i will try to check Stay connected for more videos on devops topic
Thanks Glad it helped . You can connect with me on below email for any questions or query. Happy to help. vijaygoel88@gmail.com Please Like and subscribe devopsvijay for learning and growing in devops field.
Hi, this is a good video the explanation is very well. I followed all steps but I have this error 2023-04-10 01:27:33,648 FATAL - Cannot start service 'jenkinsAgent' on computer '.'., I'm not sure I't is related with the xml file
@@devopsvijay Hi, Do you know how to connect Jenkins in a map driver using SSH Windows slave ? Maybe if you know can we get InTouch by email , greetings , P.S. I like your videos a lot their very helpful
@@devopsvijay Thanks for the reply. I am running by scripts on chrome I have an issue with screen resolution, it is taking default resolution i.e 1024x768 i have tried all possibilities to set the resolution but not working can u suggest any approach to set this please
even though i provide the java jar command it is not showing that my agent is connected. what can be the reason? i have followed each and every step throughly but it is still not connected
Hi Getting error while running command from windows as below (Did i want to change java?) Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method)
i would say best way to check the status of 4 servers at a time will be with script (batch script or powershell) in jenkins. you can fire the below command from remote server for all 4 server one by one using for loop: curl -I -v [server_ip_address]:80/W3SVC This will give you the status of IIS status of multiple servers at a time. You can also use the following command to check the status of a specific IIS service: curl -i [server_ip_address]/iisinfo/service.aspx?name=W3SVC Hope this will be helpful, Like & Subscribe and Stay connected for more informative videos
This was the exact solution to my problem that is facing issue on set up the agent as a windows service . I followed all the steps and solved my issue .Thanks a lot for this excellent explanation of each and every point.
Glad it helped.
Please like share and subscribe . Stay connected and keep learning.
Perfect solution for setting up windows agent. Thanks a lot.
Glad it helped.
Amazing teaching skills.. Learned so many things.. Great Job bro, keep doing it... Already subscribed the channel.
Thanks for subscribing...
Thanks Vijay , it has helped me to get my slave node running for jenkins as soon as I start my device. 😊
Happy to help
This video was amazing. I was able to get my agent connected running as a service thank you!
Glad it helped.
thank you so much Vijay for giving a solution in such a proper way.
Glad it helped
hello vijay i am facing some issues while trying to install the jar file on CMD using the same way you showed in the video can you please help me for resolving it@@devopsvijay
Your video is wonderful. It's easy to follow and do step by step. Subscribed.
Glad it helped. Stay connected and keep learning
Thanks brother. Very clear explanation, which I was looking for.
Glad it helped.
Excellent,,,Thanks for the video :-) Subscribed, looking for more videos
Thanks for subscribing.. keep learning and stay connected
Great Video and explanation brother!
Thanks.
nice video.
Happy to hear it
when we create node and trying to make it online we need to put two command in CLI ,But when i put first command it is not creating correct agent.jar ,it is creating corrupted agent.jar with 1 kb or 71kb of size .I checked using verbose and found my server is not able to find agent.jar URL which we are giving using command .What can be the issue?????
Make sure the jenkins is reachable and connectivity is working on specified port .like 8080.
There could be many reason
Like
Incorrect jenkins url
Network connectivity
Authentication issue
Misconfigured jenkins agent
I love your video on windows and linux agents, but the only complaint I have is you do not talk about java and assume its installed on both. With so many versions of java (Oracle Java, OpenJDK, Amazon Corretto, etc...) it would of been good of you to speak of how to decide which one is best to install on a slave node and what version number of the Java is needed. I'm not sure if CloudBees has a reference page for this
Thanks for the feedback.
yes java is needed for jenkins slave.
you can find detailed info about java support by jenkins.
www.jenkins.io/doc/book/platform-information/support-policy-java/
As of June 2022, Jenkins requires Java 11 or newer. This includes Jenkins releases 2.357 and LTS 2.361.1. Jenkins 2.355 and 2.346.1 LTS support Java 17.
you can use any java openjdk or oracle. both works for me.
@@devopsvijay thank you for your help and the link!!
awesome
Happy it was helpful
Thanks 🙏
Glad it helped. Stay connected and keep learning
I am unable to download agent.jar file in my agent system.. could you please help me. thank you in advance.
Thanks Vijay for the viedo, it's so much helpful for persons who are exploring Jenkins
I have one question, Like I have my Jenkins setup in the Linux machine and I want to establish connection to remote desktop connection (windows). WIll it be done the same way by creating window agent as you have created in the video?
Gald it helped.
Yes you can use same method to connect windows box from linux jenkins server also.
@@devopsvijayThanks, will try and update you the same.
whenever I'm trying to run the 2nd command after saving the configuration of the agent
I'm getting this
Error: Invalid or corrupt jarfile agent.jar
I tried to delete the agent and created new agent still it gives this error.
The first command do installs a jar file, but when I run the 2nd command it gives the above error.
is there any input from your side, what should I do ?
this is definitly helpfull i just need a tutorial how i can run selenium chrome drive scripts in the windows slave vm after i upload a script to gitlab
Solution that might work is to run Chrome in a 'headless' mode (without GUI). It works with Jenkins Agent running as a service, when GUI is not available. Here is the code sample of the web driver initialization.
var options = new ChromeOptions();
options.BinaryLocation = @"C:\Program Files\Google\Chrome\Application\chrome.exe";
options.AddArgument("Headless");
options.AddArgument("window-size=1920,1080");
driver = new ChromeDriver(@"\Selenium.WebDriver.ChromeDriver.2.37.0\driver\win32", options);
or lets try this solution, lets see if this works or not:
1. Open Windows services (or run: services.msc)
2. Double click on Jenkins service
3. In Logon tab, check this box: "Allow service to interact with Desktop"
Let me know if see any issue, i will try to get the solution.
please Like & subscribe and stay connected for learning with #devopsvijay
@@devopsvijay thank you for the fast replay and this big solution. i think i didnt decript my problem good enought. i have two vm's one is ubuntu no gui i have installes gitlab and jenkins both are connectet to each other now the secont vm is a windows10 mashine i m running it as jenkins slave server. i never worket with jenkins or gitlab befor. just chromedrive to tinker around trying the software. what i know have to do is upload come script on github jenkins should get triggert and copy script send it to slave vm and it should run there and give back some result. i think i will fail at this i dont have mutch time to complete this task for my diploma last 8H
i just dont have the experiens and knowledge to make this happen dont have a script also
Ohhkay got you.
You need build triggers.
Use poll scm method and restrict Build to windows vm. You can go through the tutirial
Shared couple of links
ua-cam.com/video/IhGtoHY5Wws/v-deo.html
ua-cam.com/video/Km2A14scdhQ/v-deo.html
i am able to start jenkins as a serivce after following the step. thanks. But in my case its windows based desktop application hence i keep getting below error:
This operation requires an interactive window station
It seem service does not support interaction with UI :(
thanks for watching the video,
if your slave needs interactive window, then this service might not work
how to establish connection between 2 servers and transfer files
Just do the ssh setup between the servers and use scp command for transfer of files.
Also i had created video on ssh connection setup also.
Were you able connect 2 server for file transfer?
Hi , i have tried same method what you showed in remote desktop machine. Everything is fine(service is running). But I dont know why broken connection is getting with in 1hr of setup. When I open in jenkins agent folder or jenkins.err.log file again agent is online in my local machine.
This is some new kind of error. can you paste any stacktrace which you might see in error log file.. i will try to check
Stay connected for more videos on devops topic
Working fine now... I have given prod ip instead of local host..
Great, Happy to see your debugging skill.
Good Going.. keep learning.
@@devopsvijay Thanks vijay
Danke Brüder
Schön, dass es geholfen hat....
bitte liken teilen und abonnieren
This is exactly what I was looking for. You explained very well. Keep it up bro. Appreciate your help😊 How do I connect with you via email?
Thanks
Glad it helped .
You can connect with me on below email for any questions or query. Happy to help.
vijaygoel88@gmail.com
Please Like and subscribe devopsvijay for learning and growing in devops field.
Hi, this is a good video the explanation is very well. I followed all steps but I have this error 2023-04-10 01:27:33,648 FATAL - Cannot start service 'jenkinsAgent' on computer '.'., I'm not sure I't is related with the xml file
Hi,
Check if you are running those command in adminstrator window. Since for service command you have to open cli in admin mode.
@@devopsvijay Hi, Do you know how to connect Jenkins in a map driver using SSH Windows slave ? Maybe if you know can we get InTouch by email , greetings , P.S. I like your videos a lot their very helpful
I'm not able to view agent.jar file as a hyperlink, so not able to download it
If hyperlink is not visible then some curl command also will there on the screen. You can use that and download
Is there a time limit for the number of executors? For example, if I run 10 jobs in parallel, will those jobs run indefinitely?
Yes it will , no limit until you mention
@@devopsvijay Thanks for the reply. I am running by scripts on chrome I have an issue with screen resolution, it is taking default resolution i.e 1024x768 i have tried all possibilities to set the resolution but not working can u suggest any approach to set this please
But my PC is not downloading the jar file why bor
Might be firewall issue
how to resolve this issue then bcoz even I am facing the same issue
@@devopsvijay
even though i provide the java jar command it is not showing that my agent is connected. what can be the reason? i have followed each and every step throughly but it is still not connected
Please paste the error which you might seeing in jenkins ui page for manage nodes
Hi
Getting error while running command from windows as below (Did i want to change java?)
Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
Yes, there java version mismatch as per error
Hi i have doubt on jenkins can you share your contact info please
Please put your doubts in comments box.
I will try to answer ASAP.
I need to check the IIS status of 4 servers at a time in jenkins how can we do that.
i would say best way to check the status of 4 servers at a time will be with script (batch script or powershell) in jenkins.
you can fire the below command from remote server for all 4 server one by one using for loop:
curl -I -v [server_ip_address]:80/W3SVC
This will give you the status of IIS status of multiple servers at a time.
You can also use the following command to check the status of a specific IIS service:
curl -i [server_ip_address]/iisinfo/service.aspx?name=W3SVC
Hope this will be helpful,
Like & Subscribe and Stay connected for more informative videos