Why does my Jenkins Slave Java Web Start Require Sudo? - jenkins

I get symptoms similar to jenkins slave can't get started except my slave is a Mac, my master is a linux box, and I've discovered that running the javaws https-blah-blah.jnlp command only works if I use sudo.
How can I investigate this and get to the point of not needing sudo? When I run javaws, I only see a tiny Jenkins slave agent window. Is there a log file somewhere -- or is there a verbose mode?

Related

Jenkins ssh from Linux server to a Windows node

Linux is the operating system for my Jenkins server. How to configure a job to run a .bat script on a windows node? Is this even possible to go cross platform like that?
We have Ubuntu Jenkins server that runs jobs on Windows slave nodes. We had a Windows Jenkins server and we use the same jobs, without modification, running on the Ubuntu master. Maybe this or this link could be helpful.
We connect Windows nodes to the Ubuntu master the same way we connected them to the Windows master. For more info about connecting nodes see this article.

Jenkins Windows Slave Not displaying Stdout In Console Log

I have a Windows Master running Jenkins and another PC configured as a Windows Slave. I have started the windows slave from both a web browser and from the command line with the same results. The stdout from the build running on my slave isn't captured in the console log on master. Is this possibly due to the fact that I am manually launching the slave so the master doesn't have a connection to the stdout? Are there ways to resolve this? I am considering installing cywin on the slave and seeing if using ssh resolves the issue, but I'd like to avoid that if possible.

How to get a Jenkins slave to open a windows server session

I'm trying to get a Jenkins slave to open a session on a windows server.
Basically, What I'm try to achieve is:
Jenkins slave is running as a service on a windows 2003 server. When master calls slave, it will open a desktop session on the server and kick off an .exe that will perform GUI testing
What I have done:
Jenkins node created (Node A). Dumb slave. Remote FS root set to path on Windows 2003 server. ("C:\Jenkins\Node"). Launch method Java Web Start
Slave 'Node A' installed from Jenkins master using Java Web Start on windows 2003 server
Jenkins slave now running as a service on server
Jenkins project created and 'Restrict where this project can be run' is set to 'Node A'
Project windows batch command 'C:\GUITest.exe'
When I build the project in Jenkins I was expecting that the slave would be able to open a session and run C:\GUITest.exe. But, I'm missing something.
Anyone any ideas, or know if it is possible (plugins I may need ??)
Any advise / direction much appreciated.
Looks like you want to run GUI test on windows session. It won't work if you run Jenkins Slave as service, you have to run JNLP agent on your windows server. Also if you want to run in unattended mode, meaning that the windows remote session would be disconnected, you need some other setup as well. Please provide more information on what you are trying to do.
You must ensure that whatever process runs the GUI tests (might be a java / cmd / ssh process if you're connected to Jenkins) is not running on session 0 as it won't have access to Desktop and the Windows UI in general. I was in a similar situation and running the same process as a scheduled task instead of service solved it for me.

Deploying and starting a webdriver test program on a remote windows vm from jenkins server

I have a test program in Java for testing a web app using webdriver. It builds and runs in my local machine just fine.
Now, I need to build it in jenkins, then deploy and run it on a VM running on Windows (e.g. server 2008 R2).
Obviously, the test program doesn't work on jenkins as it needs to open a browser. This cannot be done under system account in Jenkins server. So I need to deploy it to a remote machine and somehow start the test.
I've heard this can be done using ssh for a linux box, but don't know how to do it for a windows VM.
Any idea?
If you have installed jenkins as service then you need to create a JNLP node in order to run your webdriver tests.
Follow the post for creating JNLP node and running your tests on that.
http://qtp-help.blogspot.in/2013/09/setup-webdriver-maven-project-on-jenkins.html

Is this a supported Jenkins Master-slave configuration?

We have a master Jenkins running on a Linux system. The same master is attached as node using "Launch slave via execution of a command on the master". It has the same FS root as the JENKINS_HOME. The command is ssh "machine_name" "shell_script"
The shell script gets the latest slave.jar and runs it.
The master has 0 executors. The node has been given 7. I'm seeing weird behavior in the builds, like workspaces being deleted once a day, etc. I'm not sure if this is related to the way the Jenkins Master-slave is configured.
Any ideas if this is a supported configuration?

Resources