How to deploy on a remote machine using hudson's WAS Builder Plugin? - hudson

I have a hudson build server (Windows) that does not have Websphere installed. I created a Hudson node that I connect to via SSH. I also installed the WAS Builder Plugin to run jython scripts on the AIX machine. The job that uses the WAS Builder Plugin is tied to the AIX box.
I run into errors. Does anybody know, whether that setup might work or if a different setup will work for the WAS Builder Plugin?
EDIT:
I get following Error Message:
[test] $ cmd /c call /tmp/hudson9035964108103168395.bat
FATAL: command execution failed
java.io.IOException: cmd: not found
at java.lang.UNIXProcess.fullPath(UNIXProcess.java:372)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:178)
at java.lang.ProcessImpl.start(ProcessImpl.java:114)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:466)
at hudson.Proc$LocalProc.<init>(Proc.java:149)
at hudson.Proc$LocalProc.<init>(Proc.java:121)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:633)
at hudson.Launcher$ProcStarter.start(Launcher.java:268)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:778)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:754)
at hudson.remoting.UserRequest.perform(UserRequest.java:114)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:810)
Finished: FAILURE
I am wondering whether that plugin can be executed on a slave, especially in my case where the master is on Windows and the slave on AIX.

Check Here Hudson Deploy Websphere Plugin

Why dont you remotely trigger builds on Hudson via the hudsonurl:8080/jobs/jobname/build?token=TOKEN url. That way you dont have to depend on BAT files.

Finally I got it to work. I upgraded the plugin to Version 1.4 and to the newest Hudson server 1.355. That seemed to do the trick.

Related

Can't run PopSQL in Ubuntu 18.04 with node v11.2.0

To learn MySQL I installed PopSQL using .deb package but it's not working, when I launch PopSQL from terminal with sudo popsql I get these error in the terminal and PopSQL ui shows blank screen.
{"name":"PopSQL","hostname":"ivyRose","pid":16621,"level":30,"msg":"Starting app. Look for crash reports in /tmp and error logs in /home/neon/.config/PopSQL/error.log","time":"2018-11-22T12:15:27.927Z","v":0}
(popsql:16621): IBUS-WARNING **: 18:00:28.174: The owner of /home/neon/.config/ibus/bus is not root!
[Oracle] NJS-045: cannot load the oracledb add-on binary for Node.js 8.2.1 (linux, x64)
Node.js require() error was:
DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help
Node.js require() mapped to /opt/PopSQL/resources/app.asar/node_modules/oracledb/build/Release/oracledb.node
Node-oracledb installation instructions: https://github.com/oracle/node-oracledb/blob/master/INSTALL.md
You must have 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with ldconfig.
If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
[ODBC] libodbc.so.1: cannot open shared object file: No such file or directory
You don't need PopSQL to learn MySQL.
But, if you want it, to get it going, follow the error message instructions:
download the Instant Client Basic Light package from
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
unzip it
add the directory to your library search path, either via LD_LIBRARY_PATH or using ldconfig (I recommend the latter), as shown at
https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst
PopSQL should use a try/catch block when it requires oracledb so you don't see the error.
It looks like you are missing the required driver from mysql. You can download and install this from
https://dev.mysql.com/downloads/connector/odbc/
The answer here should help.
https://askubuntu.com/questions/800216/installing-ubuntu-16-04-lts-how-to-install-odbc?answertab=votes#tab-top

Jenkins doesn't launch the application under test on chromebrowser

I ran into an issue with Jenkins which I've never seen before and I thought I'll get some advice. Jenkins wouldn’t launch the AUT on the chrome browser for running selenium tests.
Steps that I followed:
A Jenkins Master and Slave are setup on the same machine. Not as a windows service, but I launch them manually via command prompt
I setup a project on the Slave node with 2 build steps. One for the MSBuild (I dowloaded the plugin) to build the solution and the second step for executing the windows batch command that will start the tests
I also have a TFS plugin to fetch the server version of the solution to build on Jenkins
So when I build the job on Jenkins Slave,
The solution gets built successfully without any errors
Then for the next build step, Jenkins executes the windows batch command and loads the .dll file. Says “starting execution..”
Chromedriver launches. It opens up the chrome browser
But the chrome browser wouldn’t launch the AUT. It just tries to load it and stays intact indefinitely until my Jenkins job times out
With all this happening, my CPU utilization is at 100%. The browser that runs the Jenkins UI on the local host and Java.exe*32 consumes it to the fullest
I ran the exact same MSTest.exe command (that I entered in the build step) in command prompt when Jenkins is not running and it launches the AUT successfully and tests ran
I ran the exact same MSTest.exe command (that I entered in the build step) in command prompt when Jenkins is running. It again spikes the CPU to 100% and AUT never launches
Any thoughts?
I was also running into this issue and solved it as follows.
Basically the jenkins slave has to be started from the startup through a batch job.
Here is the step by step process.
Node URL : http://host:port/computer/nodeName/
Go to the node "Node URL"
Click on "Mark this node temporarily offline"
Go the the machine where slave is running.
Open command prompt in admin mode.
cd to the location where jenkins is installed
Execute jenkins-slave uninstall
Go to services (type services in run) and stop the jenkins slave running
Restart the machine.
cd C:\Users\myUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Create a new batch job (name say LaunchJenkinsSlave.bat) with following content
>
java -jar C:/Jenkins/slave.jar -jnlpUrl http://host:port/computer/nodeName/slave-agent.jnlp -secret yourSecret
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
<<
fyi : You can refer jenkins-slave.xml in your Jenkins install location for yourSecret, nodeName, host ect if you forgot.
Restart your machine.
Observation : Jenkins slave will be started automatically
12. Go to the "Node URL"
and bring the node back online.
Hope this helps.

Hudson build fails with FATAL: null java.lang.AbstractMethodError

I've installed Hudson on Ubuntu and I am using the git plugin. The git integration and the simple shell script I execute as the build step appear to be working fine, but I get the following error and the build fails:
FATAL: null
java.lang.AbstractMethodError
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:278)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:275)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:565)
at hudson.model.Run.run(Run.java:1386)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
I have no post-build actions.
I got the same exception, and the reason in my case was an incompatibility when using hudson 2.0.0 and the hudson git plugin 2.0.1.
Either upgrade your hudson server or uninstall the git plugin and manually install the older git plugin version from http://hudson-ci.org/downloads/plugins/git/2.0.0/.

Hudson - Install as windows service Initialisation failure

Hudson - Install as Windows Service
I am trying to install hudson build server on a windows xp. Path to the Hudson folder in the E:\Hudson. The Hudson directory contains the hudson.war file. I use the following command to navigate to Hudson dashboard.
java -jar E:\hudon\Hudson.war.
Then I can navigate to http://localhost:8080.
Now the problem is when I try to Install as Windows Service it is thrwoing the below exception.
**Installing a service
[hudsonhome] $ D:\hudsonhome\hudson.exe install
System.Management.ManagementException: Initialization failure
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementScope.InitializeGuts(Object o)
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementScope.Connect()
at WMI.WmiRoot..ctor(String machineName)
at WMI.WmiRoot..ctor()
at winsw.WrapperService.Run(String[] _args)
at winsw.WrapperService.Main(String[] args)**
Is there any one who faced the same issue. Why it is throwing such an exception?
The only case of "Initialization failure" I know about (regarding WMI) is when the WMI repository is corrupted: see "Rebuilding WMI Repository".
Your context is a bit different, and the script detailed in the article might not be the right one for you, but before executing any script anyway, it is still worth to check if the WMI repo is corrupted or not, before attempting to rebuild it.

Hudson .jelly files edit not reflected

I edited a few .jelly files for Hudson, but it's not reflected. How do I restart Hudson ? I hope that this will display the HTML tag changes made in the .jelly files.
I am trying to change the look and feel of the Hudson.
On what OS do you run Hudson? How did you install Hudson? .....
The basic idea is to stop Hudson (or just kill it) and than start it the same way it was started before. If you are not the person who installed it, call the person. After a while they get tired of you asking and will give you the instructions (and also the permissions) to do it yourself. ;)
If you have create plugin with mvn -U org.jenkins-ci.tools:maven-hpi-plugin:create command.
This will have in built Hudson.
You can run mvn hpi:run at location of plugin.
You can debug using mvnDebug hpi:run.
mvnDebug by default uses 8000 port,if you are using eclipse as IDE, Go to Run -> open Debug Config -> Select plugin and port and start debug. This will do remote debugging on 8000 port.