Websphere call back to Jenkins - jenkins

I am using Jenkins to do a deployment to WebSphere. What I want is in the "Console Output ". To show a feedback from WebSphere if the deployment has failed or has been successful in a line. Can someone point me in a direction? How can I get a callback from WebSphere back to Jenkins saying the deployment has failed.
Is there a plugin or an API I can use or a script I can write.
I have tried to look for plugin in but I cannot find anything.

You can use a simple script ant/bat/sh etc. to get server state. I do believe there is the script for that severStatus.sh. If service is running it will return STARTED state.
Also you can jython script command AdminControl.getAttribute(server, "state" ).
Just read/set the state in you jenkins job and analyze a result.
See also the following link: Checking the status of application server

For app deployment, the AdminApp.install returns error messages upon failure. Upon success, you can you use the AdminApp.getDeployStatus to get progress details. Use AdminApp.isAppReady to know when the app is fully deployed and ready to be started.
Documentation is here: https://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.nd.doc/ae/txml_callappinstall.html

Related

GCP Dataflow warning message RMI TCP "java.net.SocketTimeoutException: Accept timed out

I am running apache beam java pipeline and for some reason getting lots of warning logs in GCP.
I tried changing log level of packages java.net,sun.rmi to SEVERE but still no success.
Logs are getting polluted with these warning messages. Any one else facing the same issue ?
jsonPayload: {
exception: "java.net.SocketTimeoutException: Accept timed out
at java.base/java.net.PlainSocketImpl.socketAccept(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:458)
at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:551)
at java.base/java.net.ServerSocket.accept(ServerSocket.java:519)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:394)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:366)
at java.base/java.lang.Thread.run(Thread.java:834)
"
logger: "sun.rmi.transport.tcp"
message: "RMI TCP Accept-5555: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,localport=5555] throws"
Pipeline is simple : Pubsub to Postgres. No additional third party connectivity.
Please refer to public documentation about troubleshooting.
Select the job to view more detailed information on errors and run results. When you select a job, you can view the execution graph as well as some information about the job. Then, click the Logs button to view log messages generated by your pipeline code and the Dataflow service.
Another thing, that you can use is debug option. When running the gcloud command, you can include the option --verbosity=debug to get debugging output.
This might be related to a JVM bug. Please check Java SDK version snd upgrade to a newer (2.17.0 or higher) version.
Additionally, check Encoding errors, IOExceptions, or unexpected behavior in user code error.
I hope you find the above pieces of information useful.
I couldn't figure out the actual issue but in the mean time since it was polluting the logs traces added flag in pipeline options:
--workerLogLevelOverrides={"sun.rmi.transport.tcp":"OFF"}

WinRM - IIS Web App Management Azure Pipelines error

I'm trying to stop the app pool of a website by connecting to it remotely with TFS Step.
The step seems to be configured properly. The Deploy step works but the IIS Management doesn't
This is the Manage IISwebsite step:
In the log i'm getting an error with not so much feedback. I find nothing on the internet either
This is the log error Microsoft.PowerShell.Commands.WriteErrorException: Caught exception while executing main function: The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
Is there any way to do that, or by powershell script that i can run in a powershell task?
The parameter which was null was the adminPassword variable. No details were displayed, needed to debug the actual script of the TFS.

Jenkins doesn't update GitHub check status sometimes

I'm using Jenkins 2.15 (GitHub plugin 1.29.3) based CI for my GitHub core repo. It works fine, but sometimes Jenkins build doesn't update GitHub check status.
I see nothing relevant into Jenkins log.
Any idea how to debug and hopefully fix this issue?
As I know, check status update is just an http request to the status api: https://developer.github.com/v3/repos/statuses/
I experienced a similar behavior with a database. The client application and the database had no errors. Each one was on a different host.
What I did was, create a bash script in host A to perform a ping to host B.
ping www.host_B.com | while read pong; do echo "$(date): $pong"; done >> /tmp/ping-test-$(date +%F).log
Then, when the sporadic error related to the connection of the database occurred, the log file helped me to detect that the error was related to:
Network issues
Latency issues
Internet service provider issues
In your case, you could perform a simple curl to the status api and compare to the sporadic behavior detected.

OpenShift deployment with Jenkins fails

I have an jenkins job that builds and deploys to a tomcat7 instance on OpenShift
Tomcat7 cartridge is copied from http://cartreflect-claytondev.rhcloud.com/github/worldline/openshift-cartridge-tomcat
....
....
Starting tomcat cartridge
Timed out waiting for http listening port
Error deploying to gear
The last command on the build is
gear remotedeploy --deployment-datetime $deployment_dir
So when this job runs, it always fails, however tailing the server logs shows deployment goes fine and application is deployed successfully. Seems to me the jenkins job waiting tomcat startup but never receives a signal. Therefore "Timed out waiting for http listening port" and job thinks deployment failed and so job fails.
Is there anything that I can do to fix this? May be inside build script? Or make remote deploy not to expect an signal?
Please advise, thanks.
Updating this ticket(10/13/2014);
I see a difference in the console output between this failing job and a successful job. below excerpt is always on the successful job (which is deploying to jbossews) and failing job (which is deploying to the aforementioned cartridge) doesn't have that part at all!
I thought this could be an important difference. See below console output;
+ hot_deploy_enabled_for_latest_deployment
++ ruby_sdk latest_deployment_metadata.hot_deploy
++ oo-ruby -I/usr/lib/openshift/cartridge_sdk -rruby/sdk -e 'include OpenShift::CartridgeSdk; puts latest_deployment_metadata.hot_deploy'
+ enabled=
+ '[' '' == true ']'
+ return 1
It would probably be worth logging an issue with the person who built the cartridge here https://github.com/worldline/openshift-cartridge-tomcat, or you could try using one of the standard jbossews (which is tomcat) cartridges that openshift offers. Seems that all they did for this cartridge was rename everything that said "jbossews" to "tomcat". OpenShift offers tomcat 6, tomcat7, jboss as 7, jboss eap, and wildfly cartridges, I am sure one of those would work equally as well, and work correctly with jenkins also.
You could try the worldline-openshift-origin-release-4, it may fix your issue : http://cartreflect-claytondev.rhcloud.com/github/worldline/openshift-cartridge-tomcat?commit=worldline-openshift-origin-release-4

Issue Launching Grails project to cloudfoundry

I am having a problem launching my (grails) project to cloud foundry. I have already launched with cf-push, but I keep getting this error
I/O error: Connection reset; nested exception is java.net.SocketException: Connection reset
when I run cf-update.
I also cannot see my log files with cf-crashlogs. I get this in the terminal window:
grails> cf-crashlogs
| Checking for available resources:.....
And if I try to access the page I get a 404 Not Found page.
Did I completely miss something? has anyone else seen this or know how fix this issue?
please check which version of the cf grails plugin were you using. try listing the plugin updates with this command:
grails list-plugin-updates
after that try to get cloud foundry connection info by:
grails cf-info
i suppose you know how to configure the login info, all the configure properties are listed here: http://grails-plugins.github.com/grails-cloud-foundry/docs/manual/guide/3%20Configuration.html
to access your app log, the most commonly used command is
grails cf-logs [destination] [--appname] [--instance] [--stderr] [--stdout] [--startup]
hope that helps.
I was trying to test Cloud Foundry long time ago. Don't remember but also had some issues which I couldn't overcome using default tool.
However then I used the Cloud Foundry Integration.
As I mentioned it was some time ago, so I won't help with the details, but the plugin worked as expected and I was able to deploy. Maybe you will success with it too :)

Resources