Re: ssh-agent plugin problems

2013-10-08 Thread Maciej Sawicki
On Tue, Oct 8, 2013 at 12:21 PM, Stephen Connolly
stephen.alan.conno...@gmail.com wrote:
 Suffice it to say that the key reported by ssh-add -l is the one injected by
 the ssh-agent that is held only by the credentials plugin as a direct-entry
 key (so it is not in a file or on a keychain anywhere)

 So this should work, out of the box, with OSX slaves unless you have mucked
 up your slave's shell environment or something

Thank you very much Stephen!
It works for me. On one slave - with OS X 10.7 - it worked out of the
box after plugin update. On second one I had to updated java to
1.7.0_40 and remove /opt/boxen/bin/java symlink. Using boxen on
slave wasn't best idea. I'm not sure which action exactly helped but
before doing it I have libc.dylib image not found error.

I have 2nd problem: We use git. In job config I see following error:

Failed to connect to repository : Command git ls-remote -h
g...@github.com:someOrganization/iOS.git HEAD returned status code
128:
stdout:
stderr: ERROR: Repository not found.
fatal: The remote end hung up unexpectedly

I believe this is is because jenkins master tries to checkout
repository during configuration and ssh-agent plugin is not used in
this phase.
it's not problem it self. Manually triggered build works perfectly.

The problem is that probably the same mechanism is used for git hooks.
I.e. when following url like this:
https://mycompany.pl/jenkins/git/notifyCommit?url=g...@github.com:someOrganization/iOS.git
is opened Jenkins master schedule job poling. It doesn't start job
unless it find changes. Unfortunately while using ssh-agent plugin I
have following error in polling log:

Git Polling Log

Started on Oct 8, 2013 8:17:11 PM
Polling SCM changes on orwell
Using strategy: Default
[poll] Last Built Revision: Revision somerevision (origin/master)
Fetching changes from the remote Git repositories
Fetching upstream changes from origin
ERROR: Problem fetching from origin / origin - could be unavailable.
Continuing anyway
hudson.plugins.git.GitException: Command git fetch -t origin
+refs/heads/*:refs/remotes/origin/* returned status code 128:
stdout:
stderr: ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:880)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:858)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:159)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:227)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:231)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:791)
at hudson.plugins.git.GitSCM.access$000(GitSCM.java:58)
at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:721)
at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:704)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2444)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Polling for changes in
Done. Took 1.6 sec
No changes

I know fixing this will probably require some time, but I will really
appreciate it and I'm willing to help you as much as I can.

best regards,
Maciek Sawicki

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


ssh-agent plugin problems

2013-10-07 Thread Maciej Sawicki
Hi,
I would like to use ssh-agent plugin but I have some problems with it:

*00:00:00.000* Started by user maciej.sawicki 
https://dev.polidea.pl/jenkins/user/maciej.sawicki*00:00:00.004* Building 
remotely on orwell in workspace /Users/jenkins/workspace/xxx*00:00:00.004* 
[ssh-agent] Using credentials jenkins (slave_key)*00:00:00.004* [ssh-agent] 
Looking for ssh-agent implementation...*00:00:00.004* [ssh-agent]   Java/JNR 
ssh-agent*00:00:00.012* [ssh-agent] FATAL: Could not find a suitable ssh-agent 
provider*00:00:00.012* [ssh-agent] Diagnostic report*00:00:00.012* [ssh-agent] 
* Java/JNR ssh-agent*00:00:00.012* java.io.IOException: Remote call on orwell 
failed*00:00:00.012*  at 
hudson.remoting.Channel.call(Channel.java:723)*00:00:00.013* at 
com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentFactory.start(JNRRemoteAgentFactory.java:61)*00:00:00.013*
  at 
com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.init(SSHAgentBuildWrapper.java:203)*00:00:00.013*
  at 
com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:119)*00:00:00.013*
   at 
com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:89)*00:00:00.013*
  at 
jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:78)*00:00:00.013*
   at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)*00:00:00.014*
  at hudson.model.Run.execute(Run.java:1665)*00:00:00.014*at 
hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)*00:00:00.014*at 
hudson.model.ResourceController.execute(ResourceController.java:88)*00:00:00.014*
at hudson.model.Executor.run(Executor.java:246)*00:00:00.014* Caused by: 
java.lang.NoClassDefFoundError: Could not initialize class 
jnr.unixsocket.Native$LibC*00:00:00.014*at 
jnr.unixsocket.Native.libsocket(Native.java:60)*00:00:00.015*at 
jnr.unixsocket.Native.socket(Native.java:68)*00:00:00.015*   at 
jnr.unixsocket.UnixServerSocketChannel.init(UnixServerSocketChannel.java:38)*00:00:00.015*
 at 
jnr.unixsocket.UnixServerSocket.init(UnixServerSocket.java:29)*00:00:00.015*  
 at 
jnr.unixsocket.UnixServerSocketChannel.open(UnixServerSocketChannel.java:48)*00:00:00.015*
   at 
com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.start(AgentServer.java:67)*00:00:00.016*
  at 
com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.init(JNRRemoteAgent.java:64)*00:00:00.016*
   at 
com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:54)*00:00:00.016*
   at 
com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:35)*00:00:00.016*
   at hudson.remoting.UserRequest.perform(UserRequest.java:118)*00:00:00.016*   
   at hudson.remoting.UserRequest.perform(UserRequest.java:48)*00:00:00.017*
   at hudson.remoting.Request$2.run(Request.java:326)*00:00:00.017*at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)*00:00:00.017*
at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)*00:00:00.017*
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)*00:00:00.017*  
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)*00:00:00.018*
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)*00:00:00.018*
at java.lang.Thread.run(Thread.java:722)*00:00:00.018* FATAL: 
[ssh-agent] Unable to start agent*00:00:00.018* java.lang.RuntimeException 
http://stacktrace.jenkins-ci.org/search?query=java.lang.RuntimeException: 
[ssh-agent] Could not find a suitable ssh-agent provider.*00:00:00.018*at 
com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.init(SSHAgentBuildWrapper.java:217)*00:00:00.019*
  at 
com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:119)
 
http://stacktrace.jenkins-ci.org/search/?query=com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironmententity=method*00:00:00.019*
  at 
com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:89)
 
http://stacktrace.jenkins-ci.org/search/?query=com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckoutentity=method*00:00:00.019*
   at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:78) 
http://stacktrace.jenkins-ci.org/search/?query=jenkins.scm.SCMCheckoutStrategy.preCheckoutentity=method*00:00:00.019*
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561) 
http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.runentity=method*00:00:00.019*
 at hudson.model.Run.execute(Run.java:1665) 

config.xml zero size

2012-09-05 Thread Maciej Sawicki
Hi,
I have strange issue - I have Jenkins master on vm. After vm restart few 
jobs configs have 0 size.

of course i have following error then:

SEVERE: Failed Loading job SomeProject_Android
hudson.util.IOException2: Unable to read 
/var/lib/jenkins/jobs/SomeProject_Android/config.xml


I wonder why this happened. Any ideas?

And second question - can I just copy config from config-history dir to fix 
this or should I do something else?

best regards,
Maciek Sawicki