Re: trouble with Bitbucket Branch Source Plugin

2017-11-21 Thread Dan Tran
Hi

did it work before 2.73.3??

-D

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1669c2a8-00de-4e27-9b7b-7bd1093b6c76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why aren't these injected variables making it to my groovy class?

2017-11-21 Thread red 888
It is external in the sense that its a self contained groovy script/class 
that jenkins executes.

So how can I have withCredentials inject these vars into the environment of 
the main process?

On Tuesday, November 21, 2017 at 5:33:36 AM UTC-5, Daniel Butler wrote:
>
> As I’d said the System.getEnv() call returns the environment the Jenkins 
> process is currently running in. 
>
>  
>
> When Jenkins runs an external process (ie sh) it adds the values in the 
> env map to the environment of the external process. The environment of the 
> Jenkins process is left untouched.
>
> Thus “sh ‘printenv’” shows the vars (It’s an external process)
>
> System.getEnv()  does not as you’re just getting the Jenkins process 
> environment.
>
>  
>
> If you’re connecting up to Dynamo you’d generally don’t want to do that 
> from within pipeline script; Things are a lot more robust if you do those 
> sorts of things from an external script. 
>
>  
>
> The recommendation is to use pipeline script to orchestrate the job but 
> leave the actual heavy lifting to external processes and plugins.
>
>  
>
>  
>
> *From: *red 888 
> *Sent: *20 November 2017 18:36
> *To: *Jenkins Users 
> *Subject: *Re: Why aren't these injected variables making it to my groovy 
> class?
>
>  
>
> Can you explain this i don't understand.
>
>  
>
> sh 'printenv' returns my injected variables. System.getenv() inside my 
> function does not. Even if I shell out from the groovy function and run 
> printenv I still don't see the variables. Why aren't they there in the 
> context of my function?
>
>  
>
> The amazon api looks for these variables so when I run this in my function 
> its looking for those two environment vars that should be injected but are 
> not:
>
> def ebClient = new AmazonDynamoDBClientBuilder()
>
> .withCredentials(new EnvironmentVariableCredentialsProvider())
>
> .build()
>
>  
>
>
> On Monday, November 20, 2017 at 6:57:07 AM UTC-5, Daniel Butler wrote:
>
> By doing System.getenv() you're getting the environment of the Jenkins 
> master process.
>
>  
>
> The environment that will be used by any process run in the pipeline is 
> available through the built-in variable env. 
>
>  
>
> Regards, 
>
> Daniel 
>
>  
>
> On 20 Nov 2017 2:14 am, "red 888"  wrote:
>
> In my pipeline I'm injecting aws credentials:
>
>  
>
> withCredentials([[$class: 'AmazonWebServicesCredentialsBinding',
>
> credentialsId: '89h9sfh8shf98shf98he9f8sf',
>
> accessKeyVariable: 'AWS_ACCESS_KEY_ID',
>
> secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
>
>  
>
> sh 'printenv'
>
>  
>
> echo myFunc.myMeth('blah','sdjlfkdf')
>
>  
>
> }
>
>  
>
> myFunc looks like this:
>
>  
>
> class myFunc {
>
> static Object myMeth (String param1, String param2){
>
>  
>
>  
>
> def env = System.getenv()
>
> //Print all the environment variables.
>
> env.each{
>
> println it
>
> }
>
> }
>
> }
>
>  
>
> Looking at the output of sh 'printenv' I see AWS_ACCESS_KEY_ID and 
> AWS_SECRET_ACCESS_KEY are injected. But when I try to echo back what envs 
> myFunc has access to I don't see those variables. Is this by design? Is 
> myFunc isolated and I need change its scope or something?
>
> -- 
> 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-use...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/6dfaad11-29f5-4287-a0a0-a16a2373ecd4%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>  
>
> -- 
> 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-use...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/89ce7f8b-99ae-4e47-abbb-a57e0f306fcc%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>  
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/11993c26-a1e9-4442-8dcf-6e5b4d385ff8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: trouble with Bitbucket Branch Source Plugin

2017-11-21 Thread itchymuzzle
Not an answer to your question, but to get to your issue you must have 
gotten past the one I am having.  Can you take a look at my question? 
[https://groups.google.com/forum/#!topic/jenkinsci-users/n3JaXcXFzVs]  
Thanks.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f77cf19d-5351-499b-9fd1-38e624e64dac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


trouble with Bitbucket Branch Source Plugin

2017-11-21 Thread i.ka...@betterfly-tourism.com
Hello,

I am having trouble setting up trigger of build after a push to Bitbucket. It 
happens on Jenkins version 2.73.3 (LTS)and 2.91 with Bitbucket Branch Source 
Plugin version 2.2.7.

A webhook is registered on Bitbucket when I create a Bitbucket Team/Project, 
that's good. However I am not seeing anything on the custom logger of 
com.cloudbees.jenkins.plugins.bitbucket.hooks for a push from Bitbucket.

To investigate further I setup the access logging as described at the bottom of 
https://support.cloudbees.com/hc/en-us/articles/11551112

I get the following in the log following push "POST /bitbucket-scmsource-hook/ 
HTTP/1.1" 403 406...". I am not too sure what the log format is, but is seems 
like 403 indicates and error.

Is there anything I can do to assist in finding the problem?

Thanks in advance for any suggestions.

Ivan


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/657858251.13267969.1511280056583.JavaMail.zimbra%40betterfly-tourism.com.
For more options, visit https://groups.google.com/d/optout.


Re: Existing credentials are not available for multi-branch jobs

2017-11-21 Thread itchymuzzle
> Suck it and see...
Ha!

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4f225030-5f28-4eb0-832e-f4264f0850a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Existing credentials are not available for multi-branch jobs

2017-11-21 Thread Stephen Connolly
On 21 November 2017 at 16:34, itchymuzzle  wrote:

> Looking at the documentation [https://go.cloudbees.com/
> docs/cloudbees-documentation/cje-user-guide/index.html#bitbucket]
>
> It doesn't mention what permissions to select when creating an app
> password.
>

Suck it and see... try with everything and then step back until you find
something that doesn't work


>
> It also says there are two credentials needed, one for scan and another
> for checkout.  And their screen shot shows that.  But that appears to be
> out of date.  I have the latest version of the plugin and it is only is
> asking for one credential.
>

The UI was updated in 2.2.0. What was "Scan credentials" is now just
"Credentials"

What was "Checkout credentials" is now in the "Additional Behaviour" called
"Checkout over SSH" (the reason for this change is that the only time you
would specify different checkout credentials from the scan credentials is
if you wanted to force the checkout to use SSH)



>
> Thanks.
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/7973062c-c429-4e7d-83fa-d52da2f36031%40googlegroups.
> com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMx%3DiyAu1DaCZKkkWXc%3DtJjqbnbkrmjN8MA4y0Dm9HwW-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Existing credentials are not available for multi-branch jobs

2017-11-21 Thread itchymuzzle
Looking at the documentation [
https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/index.html#bitbucket]

It doesn't mention what permissions to select when creating an app 
password.  

It also says there are two credentials needed, one for scan and another for 
checkout.  And their screen shot shows that.  But that appears to be out of 
date.  I have the latest version of the plugin and it is only is asking for 
one credential.

Thanks.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7973062c-c429-4e7d-83fa-d52da2f36031%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Existing credentials are not available for multi-branch jobs

2017-11-21 Thread itchymuzzle
Attempting to use username and app password I get the error.

 Could not find: 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0402aad5-652e-4b78-946d-8b5527211142%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Existing credentials are not available for multi-branch jobs

2017-11-21 Thread itchymuzzle
Ok, so attempting with my username and password I this message.  It appears 
under the Repo Name drop-down, and there are no selections in the 
drop-down.  I have admin permissions on this account.  

The selected credentials do not have permission to determine whether 
 does ordoes not exist.

And ya, there is no space in "ordoes".  

Atlassian does this thing where I login using my Google password.  Not sure 
it that could be confusing things.





-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4344ac15-0f73-427d-bb3c-fd3e54d764fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Getting the location of the jobs working directory

2017-11-21 Thread Tal Yanai
Hi,

How can I get a handle over hudson.model.Job while running within a 
pipeline step (or even a regular plugin Builder step).

I'm trying to find the job full path of where the config.xml is stored.  
Any other way of knowing that will also be good enough. 

Thanks,

Tal.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0f8e5a0e-d9dd-4ffa-a75f-08da982c596c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


running jar on remote windows slave

2017-11-21 Thread danish siddiqui


Hi,


I have jenkins setup on linux and am trying to run a jar file on a remote 
windows machine. I have no problem launching the jar file through jenkins, 
but the problem is the jar file does not exit out of a command prompt so 
this translates into the console output in jenkins (the job never finishes).

Can someone please advise how to do I launch the jar and exit out cleanly)

Apologies I am new to jenkins so do not know much. I have tried to search 
all over the internet and though I did find out by using javaw (but that 
returns successfully if I am manually run the command on the windows box)


Please let me know if you need any other information.


Thanks

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/59898116-f7bd-46de-891e-06a39f7e0fc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Build failure with Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher

2017-11-21 Thread isovu2012
thx,it works.

在 2016年8月30日星期二 UTC+8下午10:30:24,Michael Giroux写道:
>
> Disconnecting the slave, and then reconnecting solved the problem for us. 
>  This causes jenkins to refresh the runtime jars on the slave.
>
> On Wednesday, June 17, 2015 at 12:55:57 PM UTC-7, 1eyed...@gmail.com 
> wrote:
>>
>> We ultimately got our server administrator to restart Jenkins, and now 
>> the builds are working.  If anybody out there has this same issue - try 
>> that first!
>>
>> On Wednesday, June 17, 2015 at 9:31:10 AM UTC-6, 1eyed...@gmail.com 
>> wrote:
>>>
>>> Hello,
>>>
>>> I have been searching for an answer to this problem, and what I've found 
>>> so far refers to slaves and other terminology I don't know.  I am not an 
>>> administrator, just someone who uses Jenkins to run builds for our Java 
>>> projects.  We have one project that uses Maven, and we have just recently 
>>> started getting errors that show:
>>>
>>>
>>> [EnvInject] - Variables injected successfully.
>>> Parsing POMs
>>> Discovered a new module com.bc.woodCustomer:WoodCustomerBuild Wood Customer 
>>> Build Project (Maven Build)
>>> Discovered a new module com.bc.woodCustomer:WoodCustomerEar Wood Customer 
>>> Ear
>>> Discovered a new module com.bc.woodCustomer:WoodCustomerWeb Wood Customer 
>>> Web
>>> Modules changed, recalculating dependency graph
>>> [WoodCustomerBuild] $ /opt/java//bin/java -cp 
>>> /opt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.4.jar:/opt/maven/boot/plexus-classworlds-2.5.1.jar:/opt/maven/conf/logging
>>>  jenkins.maven3.agent.Maven31Main /opt/maven 
>>> /tmp/jetty-0.0.0.0-8090-jenkins.war--any-/webapp/WEB-INF/lib/remoting-2.32.jar
>>>  /opt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.4.jar 
>>> /opt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.4.jar
>>>  42886
>>> Exception in thread "main" java.lang.ClassNotFoundException: 
>>> hudson.remoting.Launcher
>>> at 
>>> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
>>> at 
>>> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
>>> at 
>>> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
>>> at 
>>> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
>>> at jenkins.maven3.agent.Maven31Main.main(Maven31Main.java:138)
>>> at jenkins.maven3.agent.Maven31Main.main(Maven31Main.java:67)
>>> ERROR: Failed to parse POMsjava.net.SocketException 
>>> : 
>>> Connection reset
>>> at java.net.SocketInputStream.read(SocketInputStream.java:189) 
>>> 
>>> at java.net.SocketInputStream.read(SocketInputStream.java:121) 
>>> 
>>> at java.io.FilterInputStream.read(FilterInputStream.java:133) 
>>> 
>>> at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) 
>>> 
>>> at java.io.BufferedInputStream.read(BufferedInputStream.java:254) 
>>> 
>>> at 
>>> hudson.remoting.ClassicCommandTransport.create(ClassicCommandTransport.java:133)
>>>  
>>> 
>>> at hudson.remoting.Channel.(Channel.java:406) 
>>> 
>>> at hudson.remoting.Channel.(Channel.java:402) 
>>> 
>>> at hudson.remoting.Channel.(Channel.java:363) 
>>> 
>>> at hudson.remoting.Channel.(Channel.java:359) 
>>> 
>>> at hudson.remoting.Channel.(Channel.java:355) 
>>> 
>>> at hudson.slaves.Channels$1.(Channels.java:71) 
>>> 
>>> at hudson.slaves.Channels.forProcess(Channels.java:71) 
>>> 
>>> at 
>>> hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:252)
>>>  
>>> 
>>> at 

Re: Jenkins 2.91 is not available yet

2017-11-21 Thread masaru tsuchiyama
Hi.

Thanks.
I update Jenkins in a weekly basis if a newer version is avalable.

Regards.
Masaru


2017-11-21 3:14 GMT+09:00 Daniel Beck :

>
> > On 20. Nov 2017, at 14:10, Daniel Beck  wrote:
> >
> > Thanks, I informed KK who creates the packages. Meanwhile, the war is
> available, but there's nothing in 2.91 you're likely to urgently need.
>
> Packages are now available.
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/748036BE-33E7-4003-B096-0E062335162D%40beckweb.net.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAKQP9edA4%2BaFCsrxR4DEp8rsJpVAuh1mRybpJxrVG4ZuTh7ysA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Save the installed plugins as a text

2017-11-21 Thread masaru tsuchiyama
Hi

Thank you for the answers.

Regards.
Masaru


2017-11-17 22:33 GMT+09:00 Victor Martinez :

> Stackoverflow ^^ ( I typed too fast )
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/a2c76be2-7ed3-4e56-b2fe-6bf264d3fd91%40googlegroups.
> com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAKQP9ee2%2BOzAGT2wDe-6qHSrkeE6taKSV%2BxzmWUrRrxJWNYXMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: UnsatisfiedLinkError on slaves after restart of master

2017-11-21 Thread Sinai Rijkov
Same here too with Jenkins 1.6.52 . Windows Server 2008 R2 Standard.

only restart help to reconnect slave back to TFS. 

Thank you. 




On Tuesday, September 22, 2015 at 6:00:52 PM UTC+3, Stefan Drissen wrote:
>
> Jenkins: 1.627
> TFS plug-in: 4.0.0
> Java: jre1.8.0_60
>
> Intermittently multiple slaves are failing to build with:
>
> Started by user Stefan Drissen
> [EnvInject] - Loading node environment variables.
> Building remotely on  in workspace 
> c:\exact\jenkins\workspace\7.20\build 
> work
> FATAL: java.io.IOException: Remote call on  failed
> java.lang.RuntimeException: java.io.IOException: Remote call on  
> failed
>  at hudson.plugins.tfs.model.Server.execute(Server.java:110)
>  at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:
> 193)
>  at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.
> java:189)
>  at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.
> java:205)
>  at hudson.plugins.tfs.TeamFoundationServerScm.
> recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:262)
>  at hudson.plugins.tfs.TeamFoundationServerScm.checkout(
> TeamFoundationServerScm.java:211)
>  at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
>  at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(
> AbstractBuild.java:610)
>  at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
>  at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.
> java:532)
>  at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.
> run(MultiJobBuild.java:134)
>  at hudson.model.Run.execute(Run.java:1741)
>  at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.
> java:73)
>  at hudson.model.ResourceController.execute(ResourceController.java:98)
>  at hudson.model.Executor.run(Executor.java:408)
> Caused by: java.io.IOException: Remote call on  failed
>  at hudson.remoting.Channel.call(Channel.java:786)
>  at hudson.plugins.tfs.model.Server.execute(Server.java:106)
>  ... 14 more
> Caused by: java.lang.UnsatisfiedLinkError: com.microsoft.tfs.jni.internal.
> platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/
> String;)Ljava/lang/String;
>
>
>
> A restart of the slave (Windows 2008r2 - started as a Windows scheduled 
> task) solves the issue (for a while). Why?
>
> The 4.0.0 version of the TFS plug-in is supposed to be putting the tfs sdk 
> in a place available for the slave - I have to admit that after searching 
> the machine I cannot find it - but since a restart of the slave solves the 
> issue, it must be somewhere.
>
> The issue *seems* to manifest after a restart of the master Jenkins 
> service (running on Windows 8.1 x64).
>
>
> Best regards,
>
>
> Stefan
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/83e2aa66-c77b-41b3-a8da-2c2977e94cd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed to connect to http://jenkins.build-env.svc.cluster.local:8080/tcpSlaveAgentListener/: jenkins.build-env.svc.cluster.local

2017-11-21 Thread WANG, YAN-HONG
In my case, we run Jenkins also in K8S. So Jenkins expose with K8S service.

2017-11-21 11:38 GMT+01:00 :

> Yes we installed Jenkins separately (not on K8s cluster).
>
> On Tuesday, November 21, 2017 at 1:22:55 PM UTC+5:30, YAN-HONG WANG wrote:
>>
>> You use Jenkins, but *not using as a service?*
>>
>> *Or?*
>>
>> 2017-11-21 8:50 GMT+01:00 YAN-HONG WANG :
>>
>>> Hi Basanta,
>>>
>>> Because the DNS mechanism seem are different in Ubuntu and CentOS.
>>> If using CentOS, and install K8S by default way maybe not a problem.
>>>
>>> But, in Ubuntu. I need to add nameserver into
>>> /etc/resolvconf/resolv.conf.d/head or /etc/resolvconf/resolv.conf.d/
>>> tail.
>>> And then 'resolvconf -u' update /etc/resolv.conf. So kubeadm will also
>>> add my nameserver into K8S.
>>>
>>> That's my environment condition.
>>>
>>> Hope this help you.
>>>
>>> Hong
>>>
>>>
>>> Am Dienstag, 21. November 2017 06:06:27 UTC+1 schrieb
>>> pbasan...@gmail.com:

 Hi Hong,

 Here is the detail of the Environment
 Installed k8s and Jenkins on the one Master server (Linux) and the jobs
 are running on Master.(with out slave nodes)
 But when we tried on 1 Master and 2 slave nodes , the jobs are failing
 with error
 =
 Nov 16, 2017 6:22:51 AM hudson.remoting.jnlp.Main$CuiListener error
 SEVERE: Failed to connect to http://slc13pef.us.oracle.c
 om:8080/tcpSlaveAgentListener/: slc13pef.us.oracle.com
 java.io.IOException: Failed to connect to http://slc13pef.us.oracle.c
 om:8080/tcpSlaveAgentListener/: slc13pef.us.oracle.com
 at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.reso
 lve(JnlpAgentEndpointResolver.java:161)
 at hudson.remoting.Engine.innerRun(Engine.java:495)
 at hudson.remoting.Engine.run(Engine.java:447)
 Caused by: java.net.UnknownHostException: slc13pef.us.oracle.com
 ==
 Here we installed Jenkins and not using as a service.
 Regards,
 Basanta

 On Tuesday, November 21, 2017 at 10:01:24 AM UTC+5:30,
 pbasan...@gmail.com wrote:
>
> Hi Hong,
> We are using Linux machine
> But i think the issue reported on this thread is nothing to do with
> Operating System.
> Regards,
> Basanta
>
> On Monday, November 20, 2017 at 9:13:08 PM UTC+5:30, YAN-HONG WANG
> wrote:
>>
>> Hello,
>>
>> Do you use Ubuntu machine to be your base?
>>
>> Hong
>>
>> Am Montag, 20. November 2017 12:14:02 UTC+1 schrieb
>> pbasan...@gmail.com:
>>>
>>> Hi Hong,
>>> We are hitting the Same error as mentioned above .. Can you please
>>> share the steps followed to resolve this error.
>>> =
>>> Nov 16, 2017 6:22:51 AM hudson.remoting.jnlp.Main$CuiListener error
>>> SEVERE: Failed to connect to http://slc13pef.us.oracle.com:
>>> 8080/tcpSlaveAgentListener/: slc13pef.us.oracle.com
>>> java.io.IOException: Failed to connect to
>>> http://slc13pef.us.oracle.com:8080/tcpSlaveAgentListener/:
>>> slc13pef.us.oracle.com
>>> at org.jenkinsci.remoting.engine.
>>> JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.
>>> java:161)
>>> at hudson.remoting.Engine.innerRun(Engine.java:495)
>>> at hudson.remoting.Engine.run(Engine.java:447)
>>> Caused by: java.net.UnknownHostException: slc13pef.us.oracle.com
>>>
>>> ==
>>> Regards,
>>> Basanta
>>>
>>>
>>> On Thursday, October 12, 2017 at 5:40:36 PM UTC+5:30, YAN-HONG WANG
>>> wrote:

 Hello Carlos,

 I fixed problem already.
 Thanks.

 Hong

 Am Dienstag, 10. Oktober 2017 14:26:47 UTC+2 schrieb YAN-HONG WANG:
>
> Hello Carlos,
>
> In containerTemplate, I define one container "worker".
> 
> 
> --
> $ kubectl --namespace=build-env exec -it slave-0cnkz-gv0bg
> --container=worker *cat /etc/resolv.conf*
>
>
> *nameserver 10.96.0.10search build-env.svc.cluster.local
> svc.cluster.local cluster.localoptions ndots:5*
>
> 
> 
> --
> *FQDN*
> $ kubectl --namespace=build-env exec -it slave-0cnkz-gv0bg
> --container=worker nslookup *jenkins.build-env.svc.cluster.local*
> nslookup: can't resolve '(null)': Name does not resolve
>
>
> *nslookup: can't resolve 'jenkins.build-env.svc.cluster.local':

Re: Publish Over SSH - How to configure to Tunnel/Forward Via Bastion Host (Jump Host)?

2017-11-21 Thread Rachit Bansal
Hi, Have you get any solution for this problem? If yes then please let me 
know the solution. Thanks in advance

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ba2931e4-7310-452d-b36d-cc6bd4268f0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cannot connect to the Docker daemon

2017-11-21 Thread christoph
I am setting up a new Jenkins server under macOS 10.13 from scratch 
(https://jenkins.io/doc/book/installing/#downloading-and-running-jenkins-in-docker)
 
using the jenkinsci blue ocean docker container. It starts-up and runs ok, 
but when trying to use any docker commands to pull containers within 
jenkins I get the error below - am I missing any additional Docker setup 
inside Jenkins?

+ docker pull python:3.6.3

 Warning: failed to get default 
registry endpoint from daemon (Cannot connect to the Docker daemon. Is the 
docker daemon running on this host?). Using system default: 
https://index.docker.io/v1/

 Cannot connect to the Docker 
daemon. Is the docker daemon running on this host?

 script returned exit code 1

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7104c36a-fe56-4b30-bfd0-6d58c8007746%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed to connect to http://jenkins.build-env.svc.cluster.local:8080/tcpSlaveAgentListener/: jenkins.build-env.svc.cluster.local

2017-11-21 Thread pbasanta2002
Yes we installed Jenkins separately (not on K8s cluster).

On Tuesday, November 21, 2017 at 1:22:55 PM UTC+5:30, YAN-HONG WANG wrote:
>
> You use Jenkins, but *not using as a service?*
>
> *Or?*
>
> 2017-11-21 8:50 GMT+01:00 YAN-HONG WANG  >:
>
>> Hi Basanta,
>>
>> Because the DNS mechanism seem are different in Ubuntu and CentOS.
>> If using CentOS, and install K8S by default way maybe not a problem.
>>
>> But, in Ubuntu. I need to add nameserver into 
>> /etc/resolvconf/resolv.conf.d/head or /etc/resolvconf/resolv.conf.d/tail.
>> And then 'resolvconf -u' update /etc/resolv.conf. So kubeadm will also 
>> add my nameserver into K8S.
>>
>> That's my environment condition.
>>
>> Hope this help you.
>>
>> Hong
>>
>>
>> Am Dienstag, 21. November 2017 06:06:27 UTC+1 schrieb pbasan...@gmail.com
>> :
>>>
>>> Hi Hong,
>>>
>>> Here is the detail of the Environment 
>>> Installed k8s and Jenkins on the one Master server (Linux) and the jobs 
>>> are running on Master.(with out slave nodes)
>>> But when we tried on 1 Master and 2 slave nodes , the jobs are failing 
>>> with error 
>>> =
>>> Nov 16, 2017 6:22:51 AM hudson.remoting.jnlp.Main$CuiListener error
>>> SEVERE: Failed to connect to 
>>> http://slc13pef.us.oracle.com:8080/tcpSlaveAgentListener/: 
>>> slc13pef.us.oracle.com
>>> java.io.IOException: Failed to connect to 
>>> http://slc13pef.us.oracle.com:8080/tcpSlaveAgentListener/: 
>>> slc13pef.us.oracle.com
>>> at 
>>> org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:161)
>>> at hudson.remoting.Engine.innerRun(Engine.java:495)
>>> at hudson.remoting.Engine.run(Engine.java:447)
>>> Caused by: java.net.UnknownHostException: slc13pef.us.oracle.com
>>> ==
>>> Here we installed Jenkins and not using as a service.
>>> Regards,
>>> Basanta
>>>
>>> On Tuesday, November 21, 2017 at 10:01:24 AM UTC+5:30, 
>>> pbasan...@gmail.com wrote:

 Hi Hong,
 We are using Linux machine 
 But i think the issue reported on this thread is nothing to do with 
 Operating System.
 Regards,
 Basanta

 On Monday, November 20, 2017 at 9:13:08 PM UTC+5:30, YAN-HONG WANG 
 wrote:
>
> Hello,
>
> Do you use Ubuntu machine to be your base?
>
> Hong
>
> Am Montag, 20. November 2017 12:14:02 UTC+1 schrieb 
> pbasan...@gmail.com:
>>
>> Hi Hong,
>> We are hitting the Same error as mentioned above .. Can you please 
>> share the steps followed to resolve this error.
>> =
>> Nov 16, 2017 6:22:51 AM hudson.remoting.jnlp.Main$CuiListener error
>> SEVERE: Failed to connect to 
>> http://slc13pef.us.oracle.com:8080/tcpSlaveAgentListener/: 
>> slc13pef.us.oracle.com
>> java.io.IOException: Failed to connect to 
>> http://slc13pef.us.oracle.com:8080/tcpSlaveAgentListener/: 
>> slc13pef.us.oracle.com
>> at 
>> org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:161)
>> at hudson.remoting.Engine.innerRun(Engine.java:495)
>> at hudson.remoting.Engine.run(Engine.java:447)
>> Caused by: java.net.UnknownHostException: slc13pef.us.oracle.com
>>  
>> ==
>> Regards,
>> Basanta
>>
>>
>> On Thursday, October 12, 2017 at 5:40:36 PM UTC+5:30, YAN-HONG WANG 
>> wrote:
>>>
>>> Hello Carlos,
>>>
>>> I fixed problem already.
>>> Thanks.
>>>
>>> Hong
>>>
>>> Am Dienstag, 10. Oktober 2017 14:26:47 UTC+2 schrieb YAN-HONG WANG:

 Hello Carlos,

 In containerTemplate, I define one container "worker".

 --
 $ kubectl --namespace=build-env exec -it slave-0cnkz-gv0bg 
 --container=worker *cat /etc/resolv.conf* 


 *nameserver 10.96.0.10search build-env.svc.cluster.local 
 svc.cluster.local cluster.localoptions ndots:5*


 --
 *FQDN*
 $ kubectl --namespace=build-env exec -it slave-0cnkz-gv0bg 
 --container=worker nslookup *jenkins.build-env.svc.cluster.local*
 nslookup: can't resolve '(null)': Name does not resolve


 *nslookup: can't resolve 'jenkins.build-env.svc.cluster.local': Try 
 againcommand terminated with exit code 1*

 -

RE: Why aren't these injected variables making it to my groovy class?

2017-11-21 Thread Daniel Butler
As I’d said the System.getEnv() call returns the environment the Jenkins 
process is currently running in. 

When Jenkins runs an external process (ie sh) it adds the values in the env map 
to the environment of the external process. The environment of the Jenkins 
process is left untouched.
Thus “sh ‘printenv’” shows the vars (It’s an external process)
System.getEnv()  does not as you’re just getting the Jenkins process 
environment.

If you’re connecting up to Dynamo you’d generally don’t want to do that from 
within pipeline script; Things are a lot more robust if you do those sorts of 
things from an external script. 

The recommendation is to use pipeline script to orchestrate the job but leave 
the actual heavy lifting to external processes and plugins.


From: red 888
Sent: 20 November 2017 18:36
To: Jenkins Users
Subject: Re: Why aren't these injected variables making it to my groovy class?

Can you explain this i don't understand.

sh 'printenv' returns my injected variables. System.getenv() inside my function 
does not. Even if I shell out from the groovy function and run printenv I still 
don't see the variables. Why aren't they there in the context of my function?

The amazon api looks for these variables so when I run this in my function its 
looking for those two environment vars that should be injected but are not:
def ebClient = new AmazonDynamoDBClientBuilder()
.withCredentials(new EnvironmentVariableCredentialsProvider())
.build()


On Monday, November 20, 2017 at 6:57:07 AM UTC-5, Daniel Butler wrote:
By doing System.getenv() you're getting the environment of the Jenkins master 
process.

The environment that will be used by any process run in the pipeline is 
available through the built-in variable env. 

Regards, 
Daniel 

On 20 Nov 2017 2:14 am, "red 888"  wrote:
In my pipeline I'm injecting aws credentials:

withCredentials([[$class: 'AmazonWebServicesCredentialsBinding',
credentialsId: '89h9sfh8shf98shf98he9f8sf',
accessKeyVariable: 'AWS_ACCESS_KEY_ID',
secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {

sh 'printenv'

echo myFunc.myMeth('blah','sdjlfkdf')

}

myFunc looks like this:

class myFunc {
static Object myMeth (String param1, String param2){


def env = System.getenv()
//Print all the environment variables.
env.each{
println it
}
}
}

Looking at the output of sh 'printenv' I see AWS_ACCESS_KEY_ID and 
AWS_SECRET_ACCESS_KEY are injected. But when I try to echo back what envs 
myFunc has access to I don't see those variables. Is this by design? Is myFunc 
isolated and I need change its scope or something?
-- 
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-use...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6dfaad11-29f5-4287-a0a0-a16a2373ecd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/89ce7f8b-99ae-4e47-abbb-a57e0f306fcc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5a1400f0.cebe500a.3a6dc.5945%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.