Siddesh BG's Build Release Config mgmt Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg
Showing posts with label jenkins-hudson. Show all posts
Showing posts with label jenkins-hudson. Show all posts

Monday, 29 October 2012

Jenkins Failed to locate Cygwin installation. Is Cygwin installed?

Posted on 05:17 by Unknown

You configured a new Windows  (64 bit) node in Jenkins  (either run as Windows servvice or JNLP or ssh) and when you try to execute a shell command from it, you may get the below mentioned error.

FATAL: command execution failedhudson.util.IOException2: Failed to locate Cygwin installation. Is Cygwin installed? at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.getCygwinRoot(CygpathLauncherDecorator.java:122) at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.call(CygpathLauncherDecorator.java:127) at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.call(CygpathLauncherDecorator.java:112) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)Caused by: hudson.util.jna.JnaException: Win32 error: 2 - null at hudson.util.jna.RegistryKey.check(RegistryKey.java:124) at hudson.util.jna.RegistryKey.open(RegistryKey.java:223) at hudson.util.jna.RegistryKey.openReadonly(RegistryKey.java:218) at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.getCygwinRoot(CygpathLauncherDecorator.java:115) ... 11 more

You can try the fix provided in the link https://issues.jenkins-ci.org/browse/JENKINS-6992

If you are still getting the same issue, then check in your Jenkins shell, whether you have
#!/bin/bash
in the first line.
If you have this, remove it. Your shell script will work fine.
Read More
Posted in jenkins-hudson | No comments

Friday, 6 July 2012

jenkins nested views not displaying with read permissions after upgrade

Posted on 01:20 by Unknown
Today I upgraded Jenkins from 1.444 version to 1.470 and to my surprise it was not showing any nested views for anonymous users. It was showing only the default 'All' view. But if we login to jenkins, then it shows all nested views.
When I googled I found this relevant link https://issues.jenkins-ci.org/browse/JENKINS-13429
As suggested I had already had Jenkins version > 1.459, Nested View Plugin 1.8. But I didn't had Role-based Authorization Strategy. Even I added this plugin to my jenkins.

Then I realized that this issue can fixed without adding Role based Authorization Strategy.
We are already using 'Project-based Matrix Authorization Strategy' and migrating to Role based authorization will be some additional tasks, which I didn't wanted to do.

Anyways the solution is enable 'Anonymous' account 'Read' 'View' in 'Project-based Matrix Authorization Strategy'

Here is the detailed way of doing it

Login to Jenkins -> Manage Jenkins -> Configure System -> Access Control -> Authorization -> Project-based Matrix Authorization Strategy
For Anonymous user -> View section -> Click 'Read'





Read More
Posted in jenkins-hudson | No comments

Tuesday, 15 May 2012

ssh command run from Jenkins shell will take “/” as home directory

Posted on 04:18 by Unknown
Issue:
ssh command run from Jenkins shell will take “/” as home directory and hence it tries to look for all the files in that directory like “/.ssh/known_hosts” & /.ssh/id_rsa. It typically happens in Windows cygwin shell

Environment:
 Jenkins 
 Windows Slave
 Cygwin
 ssh


Error:    
debug3: check_host_in_hostfile: filename /.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh_known_hosts
debug3: check_host_in_hostfile: filename /.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh_known_hosts
debug3: check_host_in_hostfile: filename /.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh_known_hosts
debug2: no key of type 0 for host library-blr.ap.rsa.net
debug3: check_host_in_hostfile: filename /.ssh/known_hosts2
debug3: check_host_in_hostfile: filename /etc/ssh_known_hosts2
debug3: check_host_in_hostfile: filename /.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh_known_hosts
debug2: no key of type 2 for host library-blr.ap.rsa.net
Build was aborted

Fix:

1) Run Jenkins service as “Administrator”. By default it will be running  as "Local user"
              Start -> run -> services.msc -> Jenkins Slave -> Right click -> Properties -> Log on -> This account ->
           Give Administrator & password.
       
       Then in  jenkins -> manage nodes -> Select your machine -> Disconnect -> Then reconnect.
       Make sure the slave is launched as "Windows service"

        The above step should fix the issue.

     Note: Step 2 is optional. 

2) Run Cygwin-sshd as “Administrator.  By default it will be running  as “cyg_server”

Jenkins upgrade > 1.444
If you upgrade jenkins to latest versions, again ssh commands through windows will hang for the same reason mentioned above.
The fix is not to run Jenkins service as 'Local user'. Now you can configure it through jenkins node configuration page.
Login to jenkins -> Manage Jenkins -> Manage Nodes -> Click on your node -> configure -> Run service as -> select 'Log on using a different account' ->
For ex: 
User name:   .\Administrator  
pasword:  ********

Note:  .\  in user name is must , otherwise it fails with 
ERROR: Failed to create a service: Status Invalid Service Account




Thats it !!



    Read More
    Posted in jenkins-hudson, ssh | No comments

    Monday, 13 February 2012

    Jenkins - FATAL: Unable to produce a script file

    Posted on 20:22 by Unknown
    Immediately after syncing code from perforce, a job in jenkins fails with the error message:


    09:16:33  Sync complete, took 8001 ms
    09:16:33  No emails were triggered.
    09:16:33  FATAL: Unable to produce a script file
    09:16:33  hudson.util.IOException2: Failed to create a temp file on /export/jenkins/jobs/jenkins-blr-backup/workspace

    Fix: Restarted the jenkins fixed the issue
    Root cause:  No idea !!!!
    Read More
    Posted in jenkins-hudson | No comments

    Friday, 16 December 2011

    Jenkins most useful features

    Posted on 20:21 by Unknown
    Jenkins is a CI (Continuous Integration) tool which is used to widely to manage builds and tests. In this blog, I'm listing some of the add on's which makes Jenkins richer and support it's use to manage builds using Jenkins instead of homegrown scripts. Most of these additional functionality comes through Jenkins plugin's.

    1) Support to GIT source code management
        Plugin: Jenkins GIT plugin
        It checkout code from GIT repository (using http/ssh/local/git protocol), poll for changes and trigger build

    2) Archive the build artifacts (Post build section)
        Provides link for download to artifacts which are built. It acts a one stop dashboard where you build and distribute artifacts to consumers. These artifacts are preserved as long as logs are preserved.
       Plugin: Comes with default Jenkins download

    3) Publishing Junit test result on build dashboard (Post build section)
        If your project running junit tests, provide link to xml reports. Jenkins publish the test results , compose historical trends, web UI for viewing/tracking test results.
       Plugin: Comes with default Jenkins download

    4) Publishing Javadocs on build dashboard (Post build section)
       If your project generating javadocs (for ex: mvn javadoc:javadoc), provide link to xml reports. Jenkins will publish the latest Javadoc and it can also retain older javadocs if needed.
       Plugin: Comes with default Jenkins download

    5) Publishing code coverage metrics ( ex: cobertura )
       If your project calculating code coverage metrics (for ex: mvn cobertura:cobertura), provide link to xml reports generated by your coverage tools like cobertura/clover/Emma. Jenkins will publish the coverage metrics on job dashboard.
         Plugin: Jenkins cobertura plugin
      Cobertura plugin lets you to fine-tune minimum acceptable levels of code coverage.

    6) Build trends
       Clicking "trend" for a project displays build time trend, timeline graph (scroll your mouse on graph to see the historical build timings).
    Read More
    Posted in jenkins-hudson | No comments

    Thursday, 15 December 2011

    jenkins error: java.io.IOException: Authentication method password not supported by the server at this stage

    Posted on 00:38 by Unknown
    When I tried to add a node to jenkins/hudson using ssh as launch method, the authentication keeps on failing with the below error.


    [12/15/11 13:23:12] [SSH] Opening SSH connection to **.**.***.**:22.
    [12/15/11 13:23:12] [SSH] Authenticating as build/******.
    java.io.IOException: Password authentication failed.
    at com.trilead.ssh2.auth.AuthenticationManager.authenticatePassword(AuthenticationManager.java:319)
    at com.trilead.ssh2.Connection.authenticateWithPassword(Connection.java:314)
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:565)
    at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:179)
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:199)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.io.IOException: Authentication method password not supported by the server at this stage.
    at com.trilead.ssh2.auth.AuthenticationManager.authenticatePassword(AuthenticationManager.java:289)
    ... 9 more
    [12/15/11 13:23:12] [SSH] Connection closed.


    The host has SLES OS and I was wondering what's going wrong, even though I gave correct password.

    FIX: Change the sshd configuration
       In /etc/sshd_config (or /etc/ssh/sshd_config) file
      # To disable tunneled clear text passwords, change to no here!
    PasswordAuthentication no
    If set to no, Hudson's SSH client won't be able to connect using password authentication. If you comment this line out (which I believe is the OpenSSH default), or set it to yes, then Hudson can connect just fine.


    Read More
    Posted in jenkins-hudson | No comments

    Wednesday, 1 September 2010

    Error while starting hudson as a service on Windows

    Posted on 05:51 by Unknown
    Error

    Installing a service
    [hudson] $ C:\hudson\hudson.exe install
    WMI.WmiException: StatusServiceExists
       at WMI.WmiRoot.BaseHandler.CheckError(ManagementBaseObject result)
       at WMI.WmiRoot.ClassHandler.Invoke(Object proxy, MethodInfo method, Object[] args)
       at WMI.Win32ServicesProxy.Create(String , String , String , ServiceType , ErrorControl , StartMode , Boolean , String[] )
       at winsw.WrapperService.Run(String[] args)
       at winsw.WrapperService.Main(String[] args)
    Read More
    Posted in jenkins-hudson | No comments
    Older Posts Home
    Subscribe to: Posts (Atom)

    Popular Posts

    • Installing and configuring Fortify on Linux and Windows machines
      Installing Fortify on Linux (RHEL 5 32 bit) Download Fortify archive Fortify-360-2.6.5-Analyzers_and_Apps-Linux-x86.tar.gz and extract it to...
    • AIX: make: 1254-055 Dependency line needs colon or double
      We get this compilation issue "make: 1254-055 Dependency line needs colon or double" while compiling C/C++ code in AIX machines. I...
    • fortifyclient uploadFPR An internal error has occurred
      When you try to upload a .fpr file to Fortify 360 server and you get the below mentioned error. Then, this blog provides one of the route ca...
    • Posting a JIRA bug using Perl Mechanize
      Perl provides modules which can be used as command line browser to automate tasks dependent on web pages. Among them LWP and mechanize are i...
    • Solution to Project Euler Problem 10 - Find the sum of all the primes below two million
      http://projecteuler.net/problem=10 Problem The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two mi...
    • Perforce - can't edit exclusive file already opened
      In perforce, whenever a binary file like doc, xls or ppt files are checked out, it is opened in exclusive lock mode. So no other person can ...
    • What is Apache Hadoop?
      Newbies can get a clean and simple introduction to Hadoop from the following Pivotal blog posts 1)  Demystifying Apache Hadoop in 5 Pictures...
    • Tweak single instance of tinderbox to work on two different perforce servers
      Tinderbox is a tool developed by Mozilla, which collects build logs and presents the logs and the result it in a nice, clear and concise way...
    • How to know architecture of a AIX machine?
      We can easily know the architecture type in Linux or Solaris systems with the help of "uname" command. But uname command in AIX do...
    • Few words about windows service
      What is windows service? it's a program that runs invisibly in the background. But can't the same thing be said for a number of prog...

    Categories

    • AIX
    • AIX ssh
    • ANT
    • apache
    • appliance
    • awk
    • branching
    • build-failures
    • cgi-perl
    • code-signing
    • commands
    • continuous Integration
    • cvs
    • cygwin
    • DNS
    • Drupal
    • EPM
    • euler
    • Fortify
    • hadoop
    • hpux
    • html
    • InstallShield
    • iptables
    • iso
    • jenkins-hudson
    • Jira
    • kiwi
    • linux
    • Makefile
    • maven
    • Miscellaneous
    • mysql
    • nexus
    • NFS
    • package
    • Perforce
    • Perl
    • php
    • rbuilder
    • rpath
    • rpm
    • rsync
    • Solaris
    • ssh
    • SuseStudio
    • tinderbox
    • unix
    • Visual studio 2008
    • vmware
    • war
    • webserver
    • wget
    • windows
    • xterm

    Blog Archive

    • ▼  2013 (12)
      • ▼  December (1)
        • How to restart windows from command line ?
      • ►  July (2)
      • ►  April (2)
      • ►  March (2)
      • ►  February (3)
      • ►  January (2)
    • ►  2012 (43)
      • ►  December (2)
      • ►  November (1)
      • ►  October (4)
      • ►  September (7)
      • ►  August (5)
      • ►  July (4)
      • ►  June (2)
      • ►  May (3)
      • ►  April (4)
      • ►  March (3)
      • ►  February (1)
      • ►  January (7)
    • ►  2011 (23)
      • ►  December (4)
      • ►  November (9)
      • ►  October (4)
      • ►  September (1)
      • ►  June (2)
      • ►  May (1)
      • ►  April (1)
      • ►  March (1)
    • ►  2010 (15)
      • ►  December (2)
      • ►  November (1)
      • ►  September (3)
      • ►  April (1)
      • ►  February (6)
      • ►  January (2)
    • ►  2009 (28)
      • ►  November (5)
      • ►  October (3)
      • ►  September (2)
      • ►  August (1)
      • ►  July (1)
      • ►  June (5)
      • ►  May (3)
      • ►  April (1)
      • ►  February (2)
      • ►  January (5)
    • ►  2008 (20)
      • ►  December (6)
      • ►  November (3)
      • ►  October (1)
      • ►  September (1)
      • ►  July (8)
      • ►  June (1)
    Powered by Blogger.

    About Me

    Unknown
    View my complete profile