Lots of LDAP error with stacktrace

2017-07-30 Thread Dan Tran

Hi,

99% of my Jenkins(LTS 2.60.2, with latest ldap) log has this stack trace. 
 Looks like every login( good or bad) has this log entry.  Any one facing 
with the same issue and resolved this?



ul 30, 2017 11:10:18 PM WARNING 
hudson.security.LDAPSecurityRealm$LDAPUserDetailsService loadUserByUsername

Failed to search LDAP for username= yyy
javax.naming.NameNotFoundException: [LDAP: error code 32 - 208D: NameErr: 
DSID-031522C9, problem 2001 (NO_OBJECT), data 0, best match of:
''
]; remaining name ''
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3161)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3082)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2888)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1846)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1769)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1786)
at 
com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:418)
at 
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:396)
at 
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:378)
at 
javax.naming.directory.InitialDirContext.search(InitialDirContext.java:286)
at 
org.acegisecurity.ldap.LdapTemplate$3.doInDirContext(LdapTemplate.java:249)
at org.acegisecurity.ldap.LdapTemplate.execute(LdapTemplate.java:126)
Caused: org.acegisecurity.ldap.LdapDataAccessException: LdapCallback;[LDAP: 
error code 32 - 208D: NameErr: DSID-031522C9, problem 2001 (NO_OBJECT), 
data 0, best match of:
''
]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 
- 208D: NameErr: DSID-031522C9, problem 2001 (NO_OBJECT), data 0, best 
match of:
''
]; remaining name ''
at 
org.acegisecurity.ldap.LdapTemplate$LdapExceptionTranslator.translate(LdapTemplate.java:295)
at org.acegisecurity.ldap.LdapTemplate.execute(LdapTemplate.java:128)
at 
org.acegisecurity.ldap.LdapTemplate.searchForSingleEntry(LdapTemplate.java:246)


Thanks


-Dan

-- 
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/8105cd62-4dd5-4451-81e9-292e4ce824a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Remote Access API - REST API in Jenkins

2017-07-30 Thread Pradeep Patra


On Monday, July 31, 2017 at 7:21:08 AM UTC+8, mpapo - Michael Pailloncy 
wrote:
>
>
>> I tried it and it is asking for mode? I am not sure what is the mode I 
>> should provide for creating new job. I tried passing  mode=create and it 
>> did not work.
>>
>
> Can you share the command line which you've tried please ?
>

I planned to first try in GUI: 
http://:8080/createItem?name=testjob it gave me error that 
please specify a valid mode. Then I changed it to name=testjob & 
mode=create but it still did not work.

curl -v -X POST 
http://:@:8080/createItem?name=newjob  
–user : --data-urlencode json='{"parameter": 
[{"name":"id", "value":"123"}, {"name":"verbosity", "value":"high"}]}'

Can you please help here in this regard? 

>  
>
>>
>>> However, what do you mean by "for creating jobs based on a specific 
>>> build" ?
>>>
>>
>> I mean the new job should "execute shell" to package local packages. I 
>> guess that I can achieve with the buildWithParameters and by passing the 
>> command. If  you have any example could you please let me know.
>>
>
> You can find an example of a build trigger with parameters from command 
> line here 
> 
> .
>
>

-- 
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/c8f8ba34-8af7-4a5a-8de6-b98f88b821c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Remote Access API - REST API in Jenkins

2017-07-30 Thread Michael Pailloncy
>
>
> I tried it and it is asking for mode? I am not sure what is the mode I
> should provide for creating new job. I tried passing  mode=create and it
> did not work.
>

Can you share the command line which you've tried please ?


>
>> However, what do you mean by "for creating jobs based on a specific
>> build" ?
>>
>
> I mean the new job should "execute shell" to package local packages. I
> guess that I can achieve with the buildWithParameters and by passing the
> command. If  you have any example could you please let me know.
>

You can find an example of a build trigger with parameters from command
line here

.

-- 
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/CAPO77c3LsNafmHUy0eMrSN9aKTaMeOoZ7bXK6FMc1MFRY_%2BzFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing a variable in shell

2017-07-30 Thread Joachim Nilsson
As I understand, it is written in Groovy. That means you can access a variable 
in a (Groovy)string using dollar and optionally curly brackets.

"  variable value is ${variable} "

Skaffa Outlook för Android



Från: Idan Adar
Skickat: söndag 30 juli 13:56
Ämne: Accessing a variable in shell
Till: Jenkins Users


Given the following script block in a stage (Declarative pipeline), how can I 
access the repoName variable?

stages {
stage("...") {
script {
for (String repoName: repoList) {
sshagent (credentials: 
['e276113e-0ec9-4eaa-88f9-a7db5c9635b6']) {
sh """
git clone -b master git@.com:/repoName.git
cd repoName

"""
}
}
 }
 }
}

--
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/d9d247a5-8ab9-4154-99c5-8c77b0861ec2%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/E5FDBCA98976C447.5af66ff2-2a16-45cb-968f-645c0c29ec56%40mail.outlook.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins deployment of a particular build through code

2017-07-30 Thread Deepu Sundar
Hi Team, 

Need your expert advice on the below query, appreciate your help. 

We have a Jenkins CI/CD process in place for deploying AWS lambda functions 
into cloud and it is fully automated. 

Now we are building a service portal to manage all aspects of the services 
being deployed. One of the UI of the portal is deployment history page 
which will list out all the current and past build history (may be similar 
to jenkins shows the build history) 

>From the UI, the user should be able to trigger the build again (like 
redeploying a previous version = run a previous build with same exact 
configuration). What is best way to do this?  What are metadata Jenkins may 
require to run a previous build with same exact configuration?  What 
Jenkins API we can use for this purpose.   

Thanks! 

regards, 
Deepu

-- 
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/b590-1934-4c1a-a153-08c9529a60a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Accessing a variable in shell

2017-07-30 Thread Idan Adar
Given the following script block in a stage (Declarative pipeline), how can 
I access the repoName variable?

stages {
stage("...") {
script {
for (String repoName: repoList) {
sshagent (credentials: [
'e276113e-0ec9-4eaa-88f9-a7db5c9635b6']) {
sh """
git clone -b master git@.com:/repoName.git
cd repoName

"""
}
}
 }
 }
}

-- 
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/d9d247a5-8ab9-4154-99c5-8c77b0861ec2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.