How to Setup Jenkins Master Slave Agent in Windows 11 Using JNLP ? | EP 06 | Jenkins Agent Tutorial
HTML-код
- Опубликовано: 10 сен 2024
- Using #JNLP (#java #network #launch #protocol ) or #websocket Method we are going to connect windows server or laptop as #slave #agent in #jenkins
Prerequisite #java should be present on windows.
And using #winsw create #windows #service
#Github #url : github.com/win...
This #tutorial will be helpful in setting end to end windows Agent.
Created one Video on Agent #installation on #linux #server also using #ssh
• How to Setup Linux Mas...
you can install #jenkins on #windows11
• How to Install Jenkin...
jenkins master slave setup
jenkins installation in windows
how to install maven in mac
jenkins tutorial
Follow these #tutorial for more #devops related videos
It will be #helpful in clearing #interview and getting better #jobs
#jenkins #tutorial #devops #devopsproject #devopstraining #devopsvijay #cicd #windows #jnlp
Amazing teaching skills.. Learned so many things.. Great Job bro, keep doing it... Already subscribed the channel.
Thanks for subscribing...
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.
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.
Perfect solution for setting up windows agent. Thanks a lot.
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
Thanks brother. Very clear explanation, which I was looking for.
Glad it helped.
Your video is wonderful. It's easy to follow and do step by step. Subscribed.
Glad it helped. Stay connected and keep learning
Excellent,,,Thanks for the video :-) Subscribed, looking for more videos
Thanks for subscribing.. keep learning and stay connected
I am unable to download agent.jar file in my agent system.. could you please help me. thank you in advance.
awesome
Happy it was helpful
Great Video and explanation brother!
Thanks.
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!!
nice video.
Happy to hear it
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
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
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
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 ?
Thanks 🙏
Glad it helped. Stay connected and keep learning
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
ruclips.net/video/IhGtoHY5Wws/видео.html
ruclips.net/video/Km2A14scdhQ/видео.html
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
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?
Danke Brüder
Schön, dass es geholfen hat....
bitte liken teilen und abonnieren
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
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.
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
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
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