RE: Shutting down a Jenkins instance that was still starting up

2018-08-16 Thread 'Burrows, John' via Jenkins Users
A couple more things to check:


1)  Check where the Jenkins Service is pointing to, should be a Jenkins.exe 
file located in folder where Jenkins is installed. Listed under Path to 
executable in Service properties:
For example, this is my entry - D:\SCM\Apps\Jenkins\jenkins.exe

In same folder as listed in Service, check your Jenkins.xml file to ensure it 
only has one  key line in  the xml file, also make sure that you 
have your  key in the xml file and it points to a valid Java 1.8 
version of Java. Include the path in this key, if Java is not in the system 
path, then you need to point directly at it.


jenkins
Jenkins
This service runs Jenkins continuous integration 
system.


D:\SCM\Apps\Java\Ora_jdk1.8.0_144x64\bin\java


  -Xrs -Xms2048m -Xmx8192m 
-Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar 
"%BASE%\jenkins.war" --httpPort=8080

rotate




2)  Make sure there are no other applications using port 8080 (80), if you 
have something like Apache Tomcat, or IIS, it could be using the same port and 
you could have a conflict. You can always change your httpPort in your 
Jenkins.xml file to 8082 or 8090, etc.

Hope this helps.

Thanks,
John

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Steve K
Sent: Thursday, August 16, 2018 9:53 AM
To: Jenkins Users 
Subject: Re: Shutting down a Jenkins instance that was still starting up


Thanks for your ideas John.
I have attempted what you suggested multiple times, but it does not go smoothly.

  *   I shut down Jenkins if necessary (often, it is already down).
  *   Via task manager, I see that Java is running.
  *   I attempt to kill the Java process, but, even though I am an 
administrator, I get "Access Denied".
  *   I attempt to start Jenkins, but that fails (I believe that's when the 
subject of this thread is generated "Shutting down a Jenkins instance that was 
still starting up".
  *   I resort to -- Disabling the Jenkins service.
  *   Reboot the machine (seems to be the only way to get rid of the Java 
process).
  *   After the machine completes the reboot, I enable the service and start 
Jenkins.
  *   Again, I'll see two two "Starting D:\Jenkins\jre\bin\java..." commands in 
the jenkins.wrapper.log  I don't know where the second command comes from.


On Thursday, August 16, 2018 at 6:55:59 AM UTC-4, Burrows, John wrote:
Steve,

Shut down Jenkins, then using Task Manager, check for any rogue Jenkins or Java 
processes running on that machine and if any found, kill those processes.


Start Jenkins back up.

You should only have one Jenkins and one Java process running on the Jenkins 
Master, unless you are also running jobs on that server.
See if that helps.

John

On Aug 15, 2018, at 12:02 PM, Steve K > 
wrote:
Hello,

We have been experiencing periodic crashes of the Jenkins server (almost one 
per week).
It's bad enough that the system goes down, but bringing it back up has been 
problematic as well.

We are running Jenkins version 2.89.2 on Windows Server 2008 R2 Standard.

Here's a look at my jenkins.err.log:

Aug 15, 2018 9:20:20 AM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file 
C:\Users\lx00057\AppData\Local\Temp\winstone\jenkins.war
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @669ms to org.eclipse.jetty.util.log.JavaUtilLog
Aug 15, 2018 9:20:20 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.server.handler.ContextHandler 
setContextPath
WARNING: Empty contextPath
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.webapp.StandardDescriptorProcessor 
visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Aug 15, 2018 9:20:21 AM 
org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Aug 15, 2018 9:20:21 AM 
org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.session.HouseKeeper 
startScavenging
INFO: Scavenging every 60ms
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started 
w.@3cbe{/,file:///D:/Jenkins/war/,AVAILABLE}{D:\Jenkins\war}
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.AbstractConnector doStop
INFO: Stopped 
ServerConnector@172e513{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.session.HouseKeeper 
stopScavenging
INFO: Stopped scavenging
Aug 15, 2018 9:20:21 AM hudson.WebAppMain contextDestroyed
INFO: Shutting down a Jenkins instance that was still starting up
java.lang.Throwable: reason
at 

Re: Shutting down a Jenkins instance that was still starting up

2018-08-16 Thread 'Burrows, John' via Jenkins Users
Steve,

Shut down Jenkins, then using Task Manager, check for any rogue Jenkins or Java 
processes running on that machine and if any found, kill those processes.

Start Jenkins back up.

You should only have one Jenkins and one Java process running on the Jenkins 
Master, unless you are also running jobs on that server.

See if that helps.

John

On Aug 15, 2018, at 12:02 PM, Steve K 
mailto:steve.kerxha...@carestream.com>> wrote:

Hello,

We have been experiencing periodic crashes of the Jenkins server (almost one 
per week).
It's bad enough that the system goes down, but bringing it back up has been 
problematic as well.

We are running Jenkins version 2.89.2 on Windows Server 2008 R2 Standard.

Here's a look at my jenkins.err.log:

Aug 15, 2018 9:20:20 AM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file 
C:\Users\lx00057\AppData\Local\Temp\winstone\jenkins.war
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @669ms to org.eclipse.jetty.util.log.JavaUtilLog
Aug 15, 2018 9:20:20 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.server.handler.ContextHandler 
setContextPath
WARNING: Empty contextPath
Aug 15, 2018 9:20:20 AM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.webapp.StandardDescriptorProcessor 
visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Aug 15, 2018 9:20:21 AM 
org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Aug 15, 2018 9:20:21 AM 
org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.session.HouseKeeper 
startScavenging
INFO: Scavenging every 60ms
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.@3cbe{/,file:///D:/Jenkins/war/,AVAILABLE}{D:\Jenkins\war}
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.AbstractConnector doStop
INFO: Stopped ServerConnector@172e513{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.session.HouseKeeper 
stopScavenging
INFO: Stopped scavenging
Aug 15, 2018 9:20:21 AM hudson.WebAppMain contextDestroyed
INFO: Shutting down a Jenkins instance that was still starting up
java.lang.Throwable: reason
at hudson.WebAppMain.contextDestroyed(WebAppMain.java:388)
at 
org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:898)
at 
org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:545)
at 
org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:873)
at 
org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:355)
at 
org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1507)
at 
org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1471)
at 
org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:927)
at 
org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:271)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:569)
at 
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at 
org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
at 
org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
at 
org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:124)
at org.eclipse.jetty.server.Server.doStop(Server.java:523)
at 
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at winstone.Launcher.shutdown(Launcher.java:307)
at winstone.Launcher.(Launcher.java:167)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:294)
at Main.main(Main.java:132)

Aug 15, 2018 9:20:21 AM org.eclipse.jetty.server.handler.ContextHandler doStop
INFO: Stopped w.@3cbe{/,null,UNAVAILABLE}{D:\Jenkins\war}
Exception in thread "Jenkins initialization thread" 
java.lang.NoClassDefFoundError: hudson/util/HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:247)
Caused by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at 

RE: Alert if master gets disconnected or if any shared slave goes offline.

2018-04-17 Thread 'Burrows, John' via Jenkins Users
Sunshine (Saranya),

We use a simple Groovy (Scriptler) script setup to run as a Job on the Jenkins 
Master every 15 minutes, that  checks to see if Jenkins Nodes/Slaves respond or 
it can get an environment setting from them, and if not, sends an email to us 
alerting that the Node/Slave is disconnected or down.

Id:   monitor.slave.nodes.groovy
Name:   Monitor Slave Nodes
Comment:   Monitors Jenkins Nodes and sends out email if it finds a 
node down.
Permission: X
Restriction: X (only run on Master)
No Parameters

--Script Start
/*** BEGIN META {
  "name" : "Monitor Slave Nodes",
  "comment" : "Monitors Jenkins Nodes and sends out email if it finds a node 
down.",
} END META**/

import hudson.model.*
import hudson.node_monitors.*
import hudson.slaves.*
import java.util.concurrent.*

jenkins = Hudson.instance

import javax.mail.internet.*;
import javax.mail.*
import javax.activation.*

import jenkins.model.JenkinsLocationConfiguration

//SendMail process to send emails for notification purposes.
def sendMail (slave, cause) {

jlc = new jenkins.model.JenkinsLocationConfiguration()
message = slave + " slave is down. Check " + jlc.getUrl() + "/computer/" + 
slave + "\nBecause " + cause
subject = slave + " slave is offline"
//The Email Address(es) you want Notifications Sent to, separated by 
semi-colons(;). We usually put an Email Distribution List here, example – 
ourgroupdistributionl...@mydomain.com
toAddress = "emailaddressfornotificati...@yourdomain.com"
fromAddress = jlc.getAdminAddress()
//Your SMTP Server Fully Qualified Domain Name, example – smtp.yahoo.com
host = "SMTPServerFQDN"
//Port number to use for SMTP Server
port = "25"

//Set properties to support the email process
Properties mprops = new Properties();
mprops.setProperty("mail.transport.protocol","smtp");
mprops.setProperty("mail.host",host);
mprops.setProperty("mail.smtp.port",port);

Session lSession = Session.getDefaultInstance(mprops,null);
MimeMessage msg = new MimeMessage(lSession);


//tokenize out the recipients in case they came in as a list
StringTokenizer tok = new StringTokenizer(toAddress,";");
ArrayList emailTos = new ArrayList();
while(tok.hasMoreElements()){
emailTos.add(new InternetAddress(tok.nextElement().toString()));
}
InternetAddress[] to = new InternetAddress[emailTos.size()];
to = (InternetAddress[]) emailTos.toArray(to);
msg.setRecipients(MimeMessage.RecipientType.TO,to);
InternetAddress fromAddr = new InternetAddress(fromAddress);
msg.setFrom(fromAddr);
msg.setFrom(new InternetAddress(fromAddress));
msg.setSubject(subject);
msg.setText(message)

Transport transporter = lSession.getTransport("smtp");
transporter.connect();
transporter.send(msg);
}

//Get Environment process for getting each Jenkins Node
def getEnviron(computer) {
   def env
   def thread = Thread.start("Getting env from ${computer.name}", { env = 
computer.environment })
   thread.join(2000)
   if (thread.isAlive()) thread.interrupt()
   env
}

//Check to see if the Jenkins Node is accessible (try to get the PATH setting 
from the Node)
def slaveAccessible(computer) {
getEnviron(computer)?.get('PATH') != null
}


def numberOfflineNodes = 0
def numberNodes = 0
for (slave in jenkins.slaves) {
   def computer = slave.computer
   numberNodes ++
   println ""
   println "Checking computer ${computer.name}:"

   //Can you get the PATH and the Node is not OffLine
   def isOK = (slaveAccessible(computer) && !computer.offline)

   //If it responds, it is OK, so just print some info about it
   if (isOK) {
 println "\t\tOK, got PATH back from slave ${computer.name}."
 println('\tcomputer.isOffline: ' + slave.getComputer().isOffline());
 println('\tcomputer.isTemporarilyOffline: ' + 
slave.getComputer().isTemporarilyOffline());
 println('\tcomputer.getOfflineCause: ' + 
slave.getComputer().getOfflineCause());
 println('\tcomputer.offline: ' + computer.offline);


   } else {
 //The Node doesn’t respond or is set OffLine
 numberOfflineNodes ++
 println "  ERROR: can't get PATH from slave ${computer.name}."
 println('\tcomputer.isOffline: ' + slave.getComputer().isOffline());
 println('\tcomputer.isTemporarilyOffline: ' + 
slave.getComputer().isTemporarilyOffline());
 println('\tcomputer.getOfflineCause: ' + 
slave.getComputer().getOfflineCause());
 println('\tcomputer.offline: ' + computer.offline);
 if 
((slave.getComputer().getOfflineCause().toString().contains("Disconnected by")) 
| (computer.name.contains("SetANodeNameHereifYouWantToIgnoreItSpecifically"))) {
//The Node was purposely taken OffLine (disconnected) or is explicitly 
set to be ignored, don’t send anything out
 } else {
   //Send out an email notification for each Node that is OffLine/Down
   sendMail(computer.name, slave.getComputer().getOfflineCause().toString())
 }
 if (slave.getComputer().isTemporarilyOffline()) {
  

Re: Help with Slaves: How to configure

2018-03-23 Thread 'Burrows, John' via Jenkins Users
Ana,

You need to ensure that the credentials you are choosing in the server 
configuration page are valid. It looks like you are not using a valid User ID 
and Password that allows the connection via SSH.

John

On Mar 23, 2018, at 3:54 AM, Ana MB 
> wrote:

Hi!

I did it and now, there's a new error:


[https://lh3.googleusercontent.com/-g7mozSU3-98/WrSxu8ObT0I/AOs/nYnf1KZlwPQY1U_UCkf_E4apxwGrGXWBwCLcBGAs/s400/5.jpg]

And 3 minutes later the error is:


[https://lh3.googleusercontent.com/-pjITKIzRoik/WrSyfU2K1LI/AO0/sHqQLk3j6l4Xv4b00H2w2duKbOohC3tSgCLcBGAs/s400/6.jpg]


How could I solve it?

Thanks s much!



El jueves, 22 de marzo de 2018, 13:00:47 (UTC+1), Ana MB escribió:
Hi guys!

I'm fighting to configure slaves in my Jenkins, but I am not able to do it
One of my proofs is the following, but I can't make it work.

Tell me what I'm doing wrong please... I'm turning crazy...
Thanks so much for your help...


[https://lh3.googleusercontent.com/-qObMjmqoVyQ/WrOak0OshiI/AOE/XdF6Y1szkDoSuD42a1kPSd99BPZiaMIXQCLcBGAs/s400/1.jpg]

[https://lh3.googleusercontent.com/-3dWcwM9LUSo/WrOamSqRElI/AOI/uZ7AYs2lgV4jbD3MBHoJLg3bk25lelssACLcBGAs/s400/2.jpg]

I've changed the kind of "Launch method", but I've got the same result -> WRONG!

Thanks guys!

--
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/4380fddb-b851-404c-aed0-c16e5b287cc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[https://www.aciworldwide.com/-/media/aci-footer]
This email message and any attachments may contain confidential, proprietary or 
non-public information. The information is intended solely for the designated 
recipient(s). If an addressing or transmission error has misdirected this 
email, please notify the sender immediately and destroy this email. Any review, 
dissemination, use or reliance upon this information by unintended recipients 
is prohibited. Any opinions expressed in this email are those of the author 
personally.

-- 
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/0E23C6A9-B5D9-4591-8D03-6B8E4DBAD356%40aciworldwide.com.
For more options, visit https://groups.google.com/d/optout.


RE: Help with Slaves: How to configure

2018-03-22 Thread 'Burrows, John' via Jenkins Users
I agree with Mark 100%, and have found the best way for Windows Jenkins Nodes, 
is to launch the JNLP Jenkins Agent using Windows Task Scheduler set on System 
Startup.

We (my company) uses SSH to launch non-Windows Agents and JNLP for Windows 
Agents. We have more than a dozen Jenkins Masters and close to 100 Jenkins 
Agents.

Thanks,
John


From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Mark Waite
Sent: Thursday, March 22, 2018 11:15 AM
To: jenkinsci-users@googlegroups.com
Subject: Re: Help with Slaves: How to configure

The picture says "unable to access agent.jar".  I think that means you need to 
download the agent.jar file into the directory where you are running the 
command which launches that agent.

I continue to believe that you may be making a more fundamental mistake than 
the command line arguments.

If you want to run an agent, and that agent is a Linux agent (or FreeBSD or 
macOS or Solaris or Raspbian or ...), then my first preference is to use the 
"ssh based" technique to start the agent, instead of using the JNLP based 
technique to start the agent.

If you want to run an agent and that agent is Windows, then you'll need to use 
the JNLP based method.  In my small environments, I've preferred to configure 
Windows agents to launch themselves from a command line on the Windows agent 
computer, rather than trying to make the Jenkins master start the agent.

Mark Waite

On Thu, Mar 22, 2018 at 9:07 AM Ana MB 
> wrote:
This is what I've done and I tried writing:
 $ java -jar agent.jar -jnlpUrl 
http://yourserver:port/computer/agent-name/slave-agent.jnlp

But it's still showing:


[https://lh3.googleusercontent.com/-9To2O1zHHbU/WrPDgCzQikI/AOc/Wn4AIHmGbNkMVuOFyFxwdPKNaC-ixPAjwCLcBGAs/s400/3.jpg]

And I don't know to resolve it...

Thanks so much.

El jueves, 22 de marzo de 2018, 14:46:31 (UTC+1), Mark Waite escribió:

On Thu, Mar 22, 2018 at 6:57 AM Ana MB 
> wrote:
I'm pretty new in this field, so I don't know what I'm doing clearly. I 
read about it but I don't know how to do it works.

What argument is needed for -jnlpURL?


 the JNLP URL of the Jenkins master .

Please read the wiki page 
https://wiki.jenkins.io/display/JENKINS/Distributed+builds .

Mark Waite

Thanks so much!!!



El jueves, 22 de marzo de 2018, 13:48:22 (UTC+1), Mark Waite escribió:
It appears that you're launching a JNLP based agent from the master without 
providing the JNLP URL of the Jenkins master.  The -jnlpURL argument needs a 
value.

It also appears that you're using an outdated name for the jar file.  I believe 
it is now called "agent.jar" instead of "slave.jar".

I'm not sure why you'd launch an agent from the master without having that 
agent run somewhere else (on another machine, for example).  Is this an 
experiment, or intentional?

Refer to 
https://wiki.jenkins.io/display/JENKINS/Distributed+builds#Distributedbuilds-Launchagentheadlessly
 .
On Thu, Mar 22, 2018 at 6:01 AM Ana MB 
> wrote:
Hi guys!

I'm fighting to configure slaves in my Jenkins, but I am not able to do it
One of my proofs is the following, but I can't make it work.

Tell me what I'm doing wrong please... I'm turning crazy...
Thanks so much for your help...


[https://lh3.googleusercontent.com/-qObMjmqoVyQ/WrOak0OshiI/AOE/XdF6Y1szkDoSuD42a1kPSd99BPZiaMIXQCLcBGAs/s400/1.jpg]

[https://lh3.googleusercontent.com/-3dWcwM9LUSo/WrOamSqRElI/AOI/uZ7AYs2lgV4jbD3MBHoJLg3bk25lelssACLcBGAs/s400/2.jpg]
I've changed the kind of "Launch method", but I've got the same result -> WRONG!

Thanks guys!
--
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/ffa2e08a-e931-401a-8447-6fe44cd840ab%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 

RE: Help with Slaves: How to configure

2018-03-22 Thread 'Burrows, John' via Jenkins Users
Make sure the agent.jar file is located in the location where you are running 
the java command from.

You can manually download the agent.jar file from 
http://YOURSERVERNAME/jnlpJars/agent.jar

Thanks,
John


From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Ana MB
Sent: Thursday, March 22, 2018 11:07 AM
To: Jenkins Users 
Subject: Re: Help with Slaves: How to configure

This is what I've done and I tried writing:
 $ java -jar agent.jar -jnlpUrl 
http://yourserver:port/computer/agent-name/slave-agent.jnlp

But it's still showing:


[https://lh3.googleusercontent.com/-9To2O1zHHbU/WrPDgCzQikI/AOc/Wn4AIHmGbNkMVuOFyFxwdPKNaC-ixPAjwCLcBGAs/s400/3.jpg]

And I don't know to resolve it...

Thanks so much.

El jueves, 22 de marzo de 2018, 14:46:31 (UTC+1), Mark Waite escribió:

On Thu, Mar 22, 2018 at 6:57 AM Ana MB 
 wrote:
I'm pretty new in this field, so I don't know what I'm doing clearly. I 
read about it but I don't know how to do it works.

What argument is needed for -jnlpURL?


 the JNLP URL of the Jenkins master .

Please read the wiki page 
https://wiki.jenkins.io/display/JENKINS/Distributed+builds .

Mark Waite

Thanks so much!!!



El jueves, 22 de marzo de 2018, 13:48:22 (UTC+1), Mark Waite escribió:
It appears that you're launching a JNLP based agent from the master without 
providing the JNLP URL of the Jenkins master.  The -jnlpURL argument needs a 
value.

It also appears that you're using an outdated name for the jar file.  I believe 
it is now called "agent.jar" instead of "slave.jar".

I'm not sure why you'd launch an agent from the master without having that 
agent run somewhere else (on another machine, for example).  Is this an 
experiment, or intentional?

Refer to 
https://wiki.jenkins.io/display/JENKINS/Distributed+builds#Distributedbuilds-Launchagentheadlessly
 .
On Thu, Mar 22, 2018 at 6:01 AM Ana MB 
> wrote:
Hi guys!

I'm fighting to configure slaves in my Jenkins, but I am not able to do it
One of my proofs is the following, but I can't make it work.

Tell me what I'm doing wrong please... I'm turning crazy...
Thanks so much for your help...


[https://lh3.googleusercontent.com/-qObMjmqoVyQ/WrOak0OshiI/AOE/XdF6Y1szkDoSuD42a1kPSd99BPZiaMIXQCLcBGAs/s400/1.jpg]

[https://lh3.googleusercontent.com/-3dWcwM9LUSo/WrOamSqRElI/AOI/uZ7AYs2lgV4jbD3MBHoJLg3bk25lelssACLcBGAs/s400/2.jpg]
I've changed the kind of "Launch method", but I've got the same result -> WRONG!

Thanks guys!
--
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/ffa2e08a-e931-401a-8447-6fe44cd840ab%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/04f37c3e-722b-43c7-9d9f-e26ca81da3b6%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/1282e395-435b-4774-a9e3-3ae421a9a7b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[https://www.aciworldwide.com/-/media/aci-footer]
This email message and any attachments may contain 

Re: Git Plugin Issues

2018-03-04 Thread 'Burrows, John' via Jenkins Users
Hi Ram,

Yes, cloning from the command line works fine in all the instances.

We can also get around the issue by creating a credential in Jenkins using the 
private key of the user, but for some reason the Public Key no longer works.

Thanks,
John

On Mar 4, 2018, at 1:31 AM, Ramanathan Muthaiah 
> wrote:

Have you tried running, manually from command line, 'git clone' using the creds 
in the problematic nodes ?

/Ram

[https://www.aciworldwide.com/-/media/aci-footer]
This email message and any attachments may contain confidential, proprietary or 
non-public information. The information is intended solely for the designated 
recipient(s). If an addressing or transmission error has misdirected this 
email, please notify the sender immediately and destroy this email. Any review, 
dissemination, use or reliance upon this information by unintended recipients 
is prohibited. Any opinions expressed in this email are those of the author 
personally.

-- 
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/0F3A6A17-DC54-48D0-B2A7-5E8E7C333771%40aciworldwide.com.
For more options, visit https://groups.google.com/d/optout.


Git Plugin Issues

2018-02-27 Thread 'Burrows, John' via Jenkins Users
Hi All,

I have seen a few write-ups about this and just want to get some clarification, 
as I have not been able to solve this as of yet in our environments.

We are using Jenkins Master v2.89.4 on Windows 2008 R2 Servers. We have the 
latest Git (3.8.0) & Git Client (2.7.1) plugins installed.

We have multiple Jenkins Nodes/Slave Servers setup, using Windows, Linux, AIX, 
Solaris as the OS. The Agent Remoting version is v3.14, Java version matches 
between the Jenkins Masters (v1.8.0) and all of the Jenkins Nodes/Slaves.

We launch the Jenkins Node/Slave Agents using Java Web Start (Windows OS) or 
via SSH (Linux, AIX, Solaris). The Windows JNLP Agents run using a Service ID 
that has Administration privileges on the Windows Server. The SSH agents have a 
local id (same name as the Service ID) with the privileges necessary as well.

BitBucket is setup to utilize SSH for communications.

When we require the use of Git to interact with our BitBucket/Git Projects and 
Repositories, we set the following up to ensure proper communication between 
the Jenkins Nodes/Slave Servers and BitBucket/Git:


1)  We ensure that the Java version in use has the certificates in the 
cacerts for the BitBucket server we interact with for source code

2)  We create ssh keys for the above mentioned Service ID and ensure that 
they are in the .ssh folder under the Users Profile and Home directories.

3)  We copy the same rsa_id.pub ssh key to BitBucket and add the key to the 
Service ID account SSH Keys listings under the Service ID's Profile.

4)  We have credentials created on each Jenkins Master (Network ID and 
Password) for the Service Account, as the BitBucket server utilizes LDAP to 
authenticate as well as the Windows Servers and on the Linux, AIX and Solaris 
machines, we setup the local user with the same password. These credentials are 
chosen in the SCM Section of the Jenkins Job for the Git Repository 
configuration section.

Recently, we have come across the issue where the interaction with Git fails on 
some Windows Servers and some Linux or AIX servers. While we can have one 
Windows server failing and another working just fine on the same Jenkins 
Master. Same with the other OS based Nodes/Slaves. This was working fine 
earlier this year, but in the last 6-8 weeks, it has started to fail for some 
existing servers that worked fine before, and for some servers that have been 
Jenkins Nodes, but we recently added the interaction to Git.

We have 10 Jenkins Masters all set up identically, and as stated above, follow 
the same setup of every Jenkins Node/Slave as well.

Here are the errors we are running into (Credentials Unix BitBucket Groovy are 
the name of the credentials commonly used across all platforms):


Building remotely on XXXJENKINSNODEXXX in workspace d:\scm\checkout\John-Test

 > D:\SCM\Apps\Git\2.8.2\bin\git.exe rev-parse --is-inside-work-tree # 
 > timeout=10

Fetching changes from the remote Git repository

 > D:\SCM\Apps\Git\2.8.2\bin\git.exe config remote.origin.url 
 > ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git # timeout=10

Fetching upstream changes from 
ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git

 > D:\SCM\Apps\Git\2.8.2\bin\git.exe --version # timeout=10

using GIT_ASKPASS to set credentials Unix Bitbucket Groovy

 > D:\SCM\Apps\Git\2.8.2\bin\git.exe fetch --tags --progress 
 > ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git 
 > +refs/heads/*:refs/remotes/origin/*

ERROR: Error fetching remote repo 'origin'

hudson.plugins.git.GitException: Failed to fetch from 
ssh://g...@bitbucket..com:7999/projectname/reponame.git

at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)

at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)

at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160)

at hudson.scm.SCM.checkout(SCM.java:495)

at hudson.model.AbstractProject.checkout(AbstractProject.java:1202)

at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)

at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)

at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)

at hudson.model.Run.execute(Run.java:1724)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

at hudson.model.ResourceController.execute(ResourceController.java:97)

at hudson.model.Executor.run(Executor.java:429)

Caused by: hudson.plugins.git.GitException: Command 
"D:\SCM\Apps\Git\2.8.2\bin\git.exe fetch --tags --progress 
ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git 
+refs/heads/*:refs/remotes/origin/*" returned status code 128:

stdout:

stderr: Permission denied (publickey).

fatal: Could not read from remote repository.



Please make sure you have the correct access rights

and the repository exists.



at