Payara+Jenkins+VisualSVN build successful with no errors, but still not deploying to Payara applications - jenkins

I have created a simple web application in Netbeans 10.0
Integrated successfully with Visual SVN. Regular commits are working fine.
Installed Payara 5
Installed Jenkins
Successfully registered Visual SVN branch in Jenkins job
Successfully configured Ant and DEPLOY TO CONTAINER plugins in Jenkins.
Registered war filename, Context path, Server Glassfish 3.x, port and hostname in Jenkins
Build Now in Jenkins
Successful build.
Logged into Payara Admin console and clicked Applications
WHOOOOOSHHHH... No application found there
There is absolutely no error any where. Tried all options including specifying Target/ Arg settings in build.xml
Nothing works.
Please help me as my job is on the stake.
*** P.S.
No where did I find any setting for Payara domain name. That could be a cause but not sure. How would Jenkins know in which Payara domain to deploy the compiled WAR file. May be I am wrong.
Thanks in anticipation.

Yesterday, I was able to deploy .war on Tomcat successfully. It went straight into webapps.
But the real issue is that when configuring Jenkins with GlassFish, Jenkins doesn't offer an input field for GlassFish Domain. Hence, compilation ends with BUILD SUCCESSFUL and FINISHED messages, but the application could not be seen in any of the Glassfish domains.

Related

Users cannot deploy to Nexus 3 using maven, only using the UI

I am writing instructions on how to set up Travis CI to deploy to our local Nexus 3 maven repository. I am testing my own instructions to make sure everything works. I have discovered that I cannot upload any artifacts using maven unless I use administrator credentials. As a regular user, I can upload using the provided web UI, but not maven.
All the users have full admin rights over the hosted repositories as well as the nx-component-upload privilege which enables the UI upload.
I must be missing something. The error message I get when running maven deploy is:
org.apache.maven.shared.transfer.artifact.deploy.ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact nz.org.riskscape:rsum_api:jar:1.0 from/to juglab-release (https://dais-maven/repository/juglab-release/): Failed to transfer file https://dais-maven/repository/juglab-release/nz/org/riskscape/rsum_api/1.0/rsum_api-1.0.jar with status code 401
Thanx in advance for any help
I finally got it to work. The problem was in the settings file, the username had been misstyped.

Need to deploy from archiva to weblogic using Jenkins

We use Jenkins for building maven projects, analysing code and pushing our builds to archiva(via mvn deploy).
I need to have a deploy item that grabs a war from archiva and pushes it to weblogic.
Checking if this can be easily done without scripting something.
Thanks,
Daniel
you can use WebLogic Deployer Plugin to deploy your files.
**/*.war only selects the war file from your archiva.

Application starting issue websphere application server 8.5 after deployment Jenkins

I am using Jenkins websphere deployer plugin to deploy application to IBM WAS 8.5.5.
The ear deployment is successful but the start up is not successful though Jenkins shows success message.
I assume the ear (around 90MB) takes time for expansion in the remote server, and Jenkins success message is before the complete expansion. Is there a way to delay the process of startup after deployment is done.
Can anyone suggest?
You cannot work around this issue since it requires a modification to the websphere deployer plugin. There is a known synchronization issue for large EAR files. I believe there was a pull request that fixes this issue and was merged into the codebase for v1.3 of the plugin. This version is not yet released but can be viewed on github if you wish to compile and try it out for yourself.
You will need to use maven and to manual imports into your .m2 repository to compile and test this code in jenkins.
Reference: https://github.com/jenkinsci/websphere-deployer-plugin

Install Jenkins as a Service or Run it behind Apatche

I understand that there are two ways of installing Jenkins:
1) Running Jenkins behind Apache (Using the War file)
2) Installing Jenkins as a Windows Service(using the windows Installer)
I am in the process of creating a CI, Auto-Deployment and Scheduled Automation runs for my project. So in this case which kind of installation should be better. I just do not want to choose the wrong one and end up recreating jobs to the other kind.
I have few questions:
1) If I choose to install as a Windows service( using the windows installer), do I still have to install an web server like IIS or Apatche for accessing my Jenkins URL, or does Jenkins have something inbuilt in it and I do not have to add an web server for accessing Jenkins?
2)If Jenkins as a Windows Service(using the windows Installer) needs IIS, I have steps in my project in which I have to restart IIS manually to generate NCover reports. In such cases, would Jenkins also be down?
3) Jenkins website states the following: "In situations where you have existing web sites on your server, you may find it useful to run Jenkins (or the servlet container that Jenkins runs in) behind Apache, so that you can bind Jenkins to the part of a bigger website that you may have.".
I would be hosting our application locally using IIS, in that case, should I chose to use the WAR installer instead of the windows installer.
I do not run Jenkin's on Windows but I believe its the same as other platforms...
No if you install Jenkins with the installer you will not need IIS or Apache
See the answer to 1, If you don't use IIS to run Jenkins restarting it won't bring down Jenkins
It sounds like you want to run your existing site under IIS and leave Jenkins running on its own. I think the windows installer for Jenkins will do exactly this.
I have run Jenkins on Windows and Unix environment.
Just wanted to add more to Ben's answer:
Windows if you install as windows service you will not need anything and for this following wiki should be more than enough:
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service
To add more to 3rd point:
Normally web sites are hosted behind Apache httpd server. If you are using one then you can configure both IIS web server and Jenkins accordingly.
In my previous company, we was running Jenkins as a service (with the solution proposed by Vinay above).
It worked well and you don't have to install an application server like Apache.
The only thing you have to take care is the user which launch the Windows service.
If your Jenkins server needs to access some ressource on the network, maybe you have to use a LDAP user to launch your service instead of using the "local system account".

Jenkins Job disappeared after restart

I have this strange problem in Jenkins 1.5.31 .
I had configured Maven jobs which I still see in Jenkins_Home directory. My Jenkins Windows service was not getting started even though I could still access the Jenkins on default port 8080.
When I found in event viewer found that service is trying for 8080 which it found to be in use, so I did taskkilPID using the 8080 port process and it successfully restarted the Windows Jenkins service.
However, when I opened the Jenkins URL, I saw only two of my jobs were there and rest disappeared.
Has any one faced this issue?
I checked plugins and found that Maven project plugin installed is 1.5.3.1 and 2.1 is available but it has message -Warning: This plugin is built for Jenkins 1.538 or newer. It may or may not work in your Jenkins.
I don't see those jobs in config.xml and nor in its old copy backup.
After Jenkins restarts, there is the case when some jobs are missing if the syntax in their config.xml contains errors.
Check Jenkins logs for errors (Manage Jenkins/System Log)
Fix the errors in config.xml of each job. ( path: JENKINS_HOME/jobs//config.xml)
Restart jenkins or choose option reload configurations from disk (Manage Jenkins/Reload Configuration from Disk).
When all errors are fixed the job should appear. You can validate your configurations against some online tool, f.e.: https://www.xmlvalidation.com/
Another case is when all Jenkins jobs are missing and an empty dashboard is loaded. This indicates that Jenkins home directory is wrong, so make sure to specify JENKINS_HOME correctly and restart Jenkins.
This happened to me too after a restart. But it was not because of errors in the config.xml, but because another containing folder with the same name but in different case existed on the server.
I don't know how this happened, but after copying over the jobs from the second folder and reloading the folder the job came back up again.
For e.g: the job that went missing was FOLDER-NAME/jobs/job-name
On the Jenkins server, on disk, there was both
FOLDER-NAME/jobs/job-name
folder-name/jobs/job-name
After copying the folder FOLDER-NAME/jobs/job-name to folder-name/jobs/
and reloading the folder (https://<jenkins-host>/jobs/FOLDER-NAME/reload) the job came back up.
Upgrade Jenkins to the latest version.This will fix the problem

Resources