I'm having a issue with CI where after i deployed a build i can't get the new version to start. In Jenkins the console output just keeps spinning when it hit the part of the batch file to start the exe-file and then times out.
I have tried both to run it inside the batch file and from the SSH command line but i can't get it to start on our Windows server.
Any suggestions?
Related
Trying to launch Vector CANape via the command line canape32 command, and it works perfectly in the windows command prompt. When attempting to run a windows batch command in our Jenkins multibranch pipeline to do the same thing, it successfully loads the remote client DLL file and then gets stops on "Error 7: Hardlock not found." This error persists in a freestyle project as well, any clues as to what the difference in the environments is? I would expect since it runs the canape32 command just like in the regular command prompt it would work just fine, but I must be missing something.
This is a due to Jenkins redirecting the consule output. When using Vector's ASAP2 Toolset instead of CANape to generate A2L files you can disable the output via the INI files so this doesn't occur.
I am trying to find solution for the jenkins nodes to automatically connect to master in non headleass mode.
Here is what I have done so far
I have written batch script which calls the powershell script. Powershell script has series of commands to start the jenkins slave agent using jnlp.
This batch script is configured in Task Scheduler to run at the startup. The jenkins slave node is connected to master as soon as node starts up.
But execution of GUI test is not visible in the node when the test starts.
When I manually run this batch script from command line, it works fine i.e non headless mode and I can see the execution of GUI test.
I've read few articles about this kind of setup and none worked.
I also wrote a small piece of powershell script to allow a Windows Service to Interact with Desktop. This script runs after the batch script to start jenkins slave agent.
Task scheduler job is configured to Run as Administrator and I login as administrator to see the execution.
Since this batch script is running via Task scheduler I am guessing its running in a different session.
How do I solve it.
Try to put your script into shell:startup.
On a Windows 10 machine with the Jenkins slave under the user you need, press Windows+R (Run...) and type shell:startup and put your script into opened folder. It will run once the user logged in.
This is how you'll see console and any windows it spawns.
I am using the "Send files or execute commands over SSH after the build runs" option in my Jenkins job configuration. I am running a .bat file on a remote server. The .bat file is starting an authentication server. The authentication server needs to remain up and running on the remote server.
The authentication server is delivered with a .bat file to start and stop the server. When I run the delivered .bat file my jenkins job hangs and never completes. The delivered .bat file named startAuth.bat looks like this:
call java -jar Auth.jar db migrate Auth.yml
call java -jar Auth.jar server Auth.yml
Based on some end user restrictions, I cannot modify the startAuth.bat file, so I have create another .bat file to call startAuth.bat named runStartAuth.bat. It looks like this:
cd c:\tmp
start runStartAuth.bat
exit /b
My thinking was by using "start" the .bat should be run in a separate process, one that could remain up and running until the next Jenkins job run, and the calling .bat would exit with the exit /b line. Unfortunately, the Jenkins job seems to ignore the exit and just spins and spins.
What am I doing wrong?
I'm not really an expert with Jenkins ... but I think since the slave agent JVM wrapper over your batch file knows that the child process has not yet finished, it will not return control to the executor.
Instead, can you try having the same commands on the Jenkins slave node configuration ? I believe you will have slave launcher prefix command in the Advanced section of the slave node.
When I try to execute "vstest.console.exe" file in Jenkins CI (service mode), it responses
Error: Could not start test run for unit tests for Windows Store app:
Unit tests for Windows Store apps cannot be run from a service or non
interactive process. Please run unit tests from an interactive
process..
However it will be able to run successful if I execute the same command from a Command prompt.
So I want to ask if there is a way to open Command Prompt from a service such as Jenkins CI.
I have tried with "start ExecuteVSTest.bat /I /K /REALTIME" but the result is still the same.
I couldn't find a way to open Command Prompt from a service. However I am able to resolve the problem between Jenkins CI and "vstest.console.exe".
We just need to deploy Jenkins from the WAR file via Tomcat server instead of installing Jenkins service native package.
Since the Tomcat is running in the console mode so Jenkins CI won't have the same trouble when executing "vstest.console.exe" as when it run in service mode.
I am trying to run a command from a node.js app that's installed on the machine. The command runs fine (it is a command to launches Tomcat). However, the command I run actually open the command line window that is launching Tomcat. Is there a way to do the same thing (run the same command to launch Tomcat) but without the command line window opening up?
Let me know if you need more info!
Your problem isn't with node.js but rather with tomcat. You are probably running the wrong command.
instead of calling catalina.bat start, rather call catalina.bat run.
alternatively you can set it up as a service and call net start tomcatX