Re: Confusion with JNLP

2021-01-25 Thread Jeff Thompson

On 1/25/21 1:23 PM, Jigar R wrote:

Hello Jenkins community,

I have created jenkins (v2.249.1) agent with launch method "Lauch 
agent by connecting it to the master". This prints a command on 
Jenkins UI i.e. "java -jar agent.jar -jnlpUrl  -secret ". Does 
this method use java web start / JNLP4? Is it going away?



I meant to send the following explanation to the list a few weeks back 
but apparently it didn't work out that way.



On 12/31/20 9:32 AM, jiga...@gmail.com wrote:
I have been running on JNLP for a while. Is it going to be deprecated? 
Should I prepare to move to SSH?


Unfortunately, that's a more confusing question than it should be. There 
are three things related to Jenkins agents that are named "JNLP". Only 
one of them actually has anything to do with JNLP.


First, the one that actually has anything to do with JNLP. If you use 
the "Launch" button on the controller to start your agent, that uses 
Java WebStart and JNLP is the launch protocol / mechanism. WebStart is 
going away. Or not. It has been removed from later versions of Java. 
Though, the OpenWebStart project has reimplemented these capabilities, 
which you could add onto later Java installations. However, I don't 
recommend using WebStart in production. It has no restart capabilities. 
It has become increasingly difficult to get it to work on current 
operating systems, etc.


Second, the one in Jenkins that has been renamed. When you configure an 
agent in Jenkins, there used to be an option to have a JNLP agent. This 
was renamed to "Inbound TCP agent" a while back as it has nothing to do 
with JNLP. This one is not going away.


Third, the one(s) in Jenkins that are still misnamed. Jenkins Remoting 
has had a series of network protocols named "JNLP". Currently, the only 
available one is "JNLP4-connect". This name is incorrect, as it has 
nothing to do with JNLP. The misleading name is retained for backwards 
compatibility purposes. The earlier versions of these protocols had a 
variety of problems and have gone away. The current one is not going away.


Jeff Thompson

--
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/efd7c7d9-3591-ff05-9a26-64ba1dbd10f8%40cloudbees.com.


Confusion with JNLP

2021-01-25 Thread Jigar R
Hello Jenkins community, 

I have created jenkins (v2.249.1) agent with launch method "Lauch agent by 
connecting it to the master". This prints a command on Jenkins UI i.e. 
"java -jar agent.jar -jnlpUrl  -secret ". Does this method use java 
web start / JNLP4? Is it going away?

--
Jigar R

-- 
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/7679139e-e3bd-436d-b50f-23c50b0a5a8dn%40googlegroups.com.


Re: Extended E-mail Notification plugin not working

2021-01-25 Thread Bob S
aghhh I was just missing commas after my addresses 

On Monday, January 25, 2021 at 3:37:46 PM UTC-6 Bob S wrote:

>
> I'm trying to use the Extended E-mail Notification plugin to email me when 
> a build fails.  I keep getting this error:
>
> An attempt to send an e-mail to empty list of recipients, ignored.
>
> I'm trying to send the email from a declarative pipeline 
> like this:
>
> emailext body: 'Check console output at $BUILD_URL to view the results. 
> \n\n ${CHANGES} \n\n -- \n
> ${BUILD_LOG, maxLines=100, escapeHtml=false}', 
> from: "buildm...@mydomain.com"
> to: "m...@mydomain.com"
> subject: 
> 'Build succeeded in Jenkins: $PROJECT_NAME - #$BUILD_NUMBER'
>
>
> regardless of how I have the Default recipients set up in the system 
> configs, shouldn't that work?
>

-- 
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/6a592376-7979-42cc-b037-3306cbc11bd8n%40googlegroups.com.


Extended E-mail Notification plugin not working

2021-01-25 Thread Bob S

I'm trying to use the Extended E-mail Notification plugin to email me when 
a build fails.  I keep getting this error:

An attempt to send an e-mail to empty list of recipients, ignored.

I'm trying to send the email from a declarative pipeline 
like this:

emailext body: 'Check console output at $BUILD_URL to view the results. \n\n
 ${CHANGES} \n\n -- \n
${BUILD_LOG, maxLines=100, escapeHtml=false}', 
from: "buildmach...@mydomain.com"
to: "m...@mydomain.com"
subject: 
'Build succeeded in Jenkins: $PROJECT_NAME - #$BUILD_NUMBER'


regardless of how I have the Default recipients set up in the system 
configs, shouldn't that work?

-- 
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/bfce2817-c978-4aee-a5fc-e5d2e9b093fdn%40googlegroups.com.


Re: Portable Maven launch

2021-01-25 Thread 'Martin Schmude' via Jenkins Users
The if statement is not a pipeline step. It has to be wrapped in a script 
block: 
https://www.jenkins.io/doc/book/pipeline/syntax/#script


jochen@gmail.com schrieb am Sonntag, 24. Januar 2021 um 21:30:54 UTC+1:

> Thanks,
>
> sounds like what I was looking for. But then: Any ideas, what's wrong in 
> my script?
>
> pipeline {
> agent any
> tools { 
> maven 'Maven3' 
> jdk 'Java8' 
> }
> stages {
> stage ('afw-core') {
> steps {
> withMaven(
>  // Maven installation declared in the Jenkins "Global 
> Tool Configuration"
>  maven: 'Maven3',
>
> // Use `$WORKSPACE/.repository` for local repository 
> folder to avoid shared repositories
> mavenLocalRepo: '.repository',
> ) {
> if (isUnix()) {
> sh 'mvn -fafw/afw-core/pom.xml -Pjacoco 
> -Dmaven.test.failure.ignore=true clean install'
> } else {
> bat 'mvn.cmd -fafw/afw-core/pom.xml -Pjacoco 
> -Dmaven.test.failure.ignore=true clean install'
> }
> }
> }
> }
> stage ('afw-bootstrap') {
> steps {
> withMaven(
>  // Maven installation declared in the Jenkins "Global 
> Tool Configuration"
>  maven: 'Maven3',
>
> // Use `$WORKSPACE/.repository` for local repository 
> folder to avoid shared repositories
> mavenLocalRepo: '.repository',
> ) {
> if (isUnix()) {
> sh 'mvn -fafw/afw-bootstrap/pom.xml -Pjacoco 
> -Dmaven.test.failure.ignore=true clean install'
> } else {
> bat 'mvn.cmd -fafw/afw-bootstrap/pom.xml -Pjacoco 
> -Dmaven.test.failure.ignore=true clean install'
> }
> }
> }
> }
> }
> }
>
> The error message I am getting:
>
>
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> WorkflowScript: 17: Expected a step @ line 17, column 9.
> if (isUnix()) {
>^
> WorkflowScript: 34: Expected a step @ line 34, column 9.
> if (isUnix()) {
>^
>
> On Sunday, January 24, 2021 at 5:54:26 PM UTC+1 geoffroy...@gmail.com 
> wrote:
>
>> Hello
>> you probably want to use 
>> https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#isunix-checks-if-running-on-a-unix-like-node
>>
>>
>> On Saturday, 23 January 2021 at 21:19:43 UTC+1 jochen@gmail.com 
>> wrote:
>>
>>>
>>> Hi,
>>>
>>> I've got a pipeline file, that should be executable on a Windows build 
>>> server, and on a Linux build server. The pipeline is launching Maven as 
>>> follows:
>>>
>>> On Linux:
>>>
>>> sh "mvn "
>>>
>>> But on Windows, this appears not to work, so I've got to use:
>>>
>>>bat "mvn.cmd " 
>>>
>>> Right now, I can use either of these steps, so have to choose between 
>>> Windows, and Linux. Is there any possibility to get this portable? I am 
>>> thinking something like
>>>
>>>if (isWindows()) {
>>>bat "mvn.cmd " 
>>>} else {
>>> sh "mvn "
>>>}
>>>
>>> Thanks,
>>>
>>> Jochen
>>>
>>>
>>>
>>>

-- 
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/f318612c-c265-47eb-9546-83d1469ae717n%40googlegroups.com.


Re: JDK8 or JDK11 to be used for Jenkins ?

2021-01-25 Thread mj1414...@gmail.com
Hello Daniel,
yes, we're on 2.263.1. (The open bug on the .2 is blocking us for the 
update)
Obviously should have mentioned the Jenkins version used ;-)

How to handle these " WARNING: Illegal reflective access" ? I see a whole 
bunch of them. 
Given your statement about weekly releases, it probably doesn't make sense 
to report unreported once - does it ?

On the slaves we just found a blocker: We get a problem on building for 
Coverity (SCA). (I suspect a tool to fetch the different parts of the SW, 
which uses Java)
So far I don't understand, why the "normal" build seems to be ok. (Should 
be affected as well) I need a closer look.

Martin
Daniel Beck schrieb am Montag, 25. Januar 2021 um 14:18:07 UTC+1:

>
>
> > On 25. Jan 2021, at 13:37, mj1414...@gmail.com  
> wrote:
> > 
> > WARNING: Illegal reflective access by 
> com.thoughtworks.xstream.core.util.Fields 
> (file:/var/fpwork/ltedlphy/jenkinsCurrent/home/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar)
>  
> to field java.util.TreeMap.comparator
>
> At most you're on the current LTS release. Weekly releases have already 
> been updated beyond this version of X-Stream, see 
> https://www.jenkins.io/blog/2020/11/10/spring-xstream/ 
>
> They may no longer show this warning, or at least not as often. 
> https://github.com/x-stream/xstream/issues/101 seems to track it in 
> general upstream.
>
>

-- 
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/2ca5a5f4-b1ba-41f7-bc1f-ec9cb81e4441n%40googlegroups.com.


Re: JDK8 or JDK11 to be used for Jenkins ?

2021-01-25 Thread Daniel Beck



> On 25. Jan 2021, at 13:37, mj1414...@gmail.com  wrote:
> 
> WARNING: Illegal reflective access by 
> com.thoughtworks.xstream.core.util.Fields 
> (file:/var/fpwork/ltedlphy/jenkinsCurrent/home/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar)
>  to field java.util.TreeMap.comparator

At most you're on the current LTS release. Weekly releases have already been 
updated beyond this version of X-Stream, see 
https://www.jenkins.io/blog/2020/11/10/spring-xstream/ 

They may no longer show this warning, or at least not as often. 
https://github.com/x-stream/xstream/issues/101 seems to track it in general 
upstream.

-- 
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/FFB43344-2054-41B8-94B9-2B74DDA4FBF1%40beckweb.net.


Re: JDK8 or JDK11 to be used for Jenkins ?

2021-01-25 Thread mj1414...@gmail.com
 I've updated from JDK 8 (jdk8u265-b01) to JDK11 (jdk-11.0.9.1+1) 
Now I see in the log:
WARNING: Illegal reflective access by 
com.thoughtworks.xstream.core.util.Fields 
(file:/var/fpwork/ltedlphy/jenkinsCurrent/home/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar)
 
to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of 
com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal 
reflective access operations
*WARNING: All illegal access operations will be denied in a future release*

It is not just this one specifc message, there are other similar ones.
This sounds like a ticking bomb...
Can I do something about this ? Opening tickets ?
Are my worries unfounded ?

Regards

Martin

bma...@gmail.com schrieb am Freitag, 11. Dezember 2020 um 22:28:38 UTC+1:

> Agreed with Richard. 
>
> Plus we literally have a thread on the dev list that's less than 10 days 
> old, where we discussed bumping the minimum requirement to Java 11.
>
> IOW, I'd recommend defaulting to Java 11 unless you've got very compelling 
> reasons to run Java 8.
> This way, when the requirement gets bumped, at some point (no date yet), 
> this will be a no-event for you :-). (or will be facing a wall if you chose 
> Java 8).
>
> Cheers
>
> Le ven. 11 déc. 2020 à 22:22, Richard Bywater  a 
> écrit :
>
>> Personally if you are starting from a new Jenkins version then I'd go 
>> JDK11 unless you hit some strange edge-case issue where you might need to 
>> roll it back to JDK8.
>>
>> Although JDK8 isn't going anywhere in the short term its probably best to 
>> keep with the newest LTS version of Java to not make the upgrade someone 
>> else's problem down the line 😀
>>
>> Richard.
>>
>> On Fri, 11 Dec 2020, 11:00 PM mj1414...@gmail.com,  
>> wrote:
>>
>>> Hello,
>>> I'm trying to decide, whether I should use JDK8 or JDK11 to run Jenkins.
>>> So far I have been using JDK8.
>>>
>>> If I look at the documentation, I find:
>>>
>>> "Installing Jenkins" https://www.jenkins.io/doc/book/installing/
>>> points to 
>>> "Java Requirements" 
>>> https://www.jenkins.io/doc/administration/requirements/java/
>>> which says
>>>
>>>- 
>>>
>>>"Java 8 runtime environments, both 32-bit and 64-bit versions are 
>>>supported"
>>>- 
>>>
>>>"Since Jenkins 2.164 and 2.164.1 [1 
>>>
>>> 
>>>], Java 11 runtime environments are supported
>>>- 
>>>   
>>>   Running Jenkins with Java 11 is documented here 
>>>   
>>> 
>>>   - 
>>>   
>>>   There are some precautions to take when upgrading from Java 8 to 
>>>   Java 11 in Jenkins, please follow these guidelines 
>>>   
>>> 
>>>   ."
>>>   
>>> So this sounds like "both JDK8 and JDK11 are supported"
>>> But the "fine print" below JDK11 sounds different:
>>>
>>> https://www.jenkins.io/doc/administration/requirements/upgrade-java-guidelines/
>>>
>>> So what is the current recommendation:
>>> Use JDK8 ? JDK11 ?
>>> Give JDK11 a try and report issues ?
>>> Is an update planned to make JDK11 the preferred version ?
>>>
>>> Regards
>>>
>>> Martin
>>>
>>> -- 
>>> 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/8b37283f-47d9-495b-9086-2b8bd003876an%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>> -- 
>> 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/CAAy0hwc2d-FCOawn%3D1VGoWOa9mnUuyDczKPNj3tKRmyeTeLCJA%40mail.gmail.com
>>  
>> 
>> .
>>
>

-- 
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/74083c2f-3f30-4b47-b4ac-87947932ecfen%40googlegroups.com.


Re: c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to Gerrit, waiting for 64 secon d(s)

2021-01-25 Thread mj1414...@gmail.com
Update:
Two things happened over the weekend:
- Our Gerrit HW got updated
- I just updated the used JDK from  JDK 8 (jdk8u265-b01) to JDK11 
(jdk-11.0.9.1+1) 

It started up much, much faster. In the logs I (just) found:
"Not connected to Gerrit, waiting for X second(s)", with X=1,2,4

   - Pure luck ?
   - Gerrit update during the weekend helping (a lot) ?
   - JDK update helping ?

mj1414...@gmail.com schrieb am Freitag, 22. Januar 2021 um 14:14:31 UTC+1:

> Hello,
>
> our Jenkins "all of a sudden" takes nearly 3 minutes to start. (Ok, I 
> guess, some of you are now laughing)
>
> I never stopped the time exactely in the past, but it had been 
> significantly less. (I would guess something like 1 minute)
>
> Looking at the log, I see:
>
> 2021-01-21 17:13:18.985+ [id=193] SEVERE 
> hudson.slaves.CommandLauncher#launch: Unable to launch the agent for ...
>
> java.io.EOFException: unexpected stream termination
>
> at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:415)
>
> ...
>
> at java.lang.Thread.run(Thread.java:748)
>
> *2021-01-21 17:13:20*.907+ [id=113] INFO 
> c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: *Not connected 
> to Gerrit, waiting for 16 second(s)*
> 2021-01-21 17:13:20.908+ [id=114] INFO 
> c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to 
> GerritQA, waiting for 16 second(s)
> 2021-01-21 17:13:36.910+ [id=113] INFO 
> c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to 
> Gerrit, waiting for 32 second(s)
> 2021-01-21 17:13:36.911+ [id=114] INFO 
> c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to 
> GerritQA, waiting for 32 second(s)
> 2021-01-21 17:13:44.321+ [id=89] WARNING 
> j.a.s.AdvancedQueueSorterQueueListener#onEnterBuildable: onEnterBuilding() 
> called without prior call to onEnterWaiting() for ''
> 2021-01-21 17:14:08.914+ [id=113] INFO 
> c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to 
> Gerrit, waiting for 64 second(s)
>
> 2021-01-21 17:14:08.915+ [id=114] INFO 
> c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to 
> GerritQA, waiting for 64 second(s)
>
> 2021-01-21 17:15:12.923+ [id=113] INFO 
> c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to 
> Gerrit, waiting for 64 second(s)
>
> *2021-01-21 17:15:12*.924+ [id=114] INFO 
> c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to 
> GerritQA, waiting for 64 second(s)
>
> 2021-01-21 17:15:47.420+ [id=89] WARNING 
> j.a.s.AdvancedQueueSorterQueueListener#onEnterBuildable: onEnterBuilding() 
> called without prior call to onEnterWaiting() for '...'
>
> So it seems, it needs two minutes (out of three !) to connect to Gerrit.
> (Which would explain the difference I see)
> I didn't see Gerrit problems in operation.
>
> How can I get more details to debug the reason ?
> Any ideas to improve this ?
> Regards
>
> Martin
>

-- 
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/c1c7da50-0474-4e3d-a63b-f6b9c8298c16n%40googlegroups.com.