Good morning!
You're right! You made me think. I was wrong. If restarting wasn't allowed,
that option shouldn't appear.
But, if a service "dies", how can it start again? I've checked Jenkins'
source code and it's considered (a separated process is created):
core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java
@Override
public void restart() throws IOException, InterruptedException {
File me = getHudsonWar();
File home = me.getParentFile();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
StreamTaskListener task = new StreamTaskListener(baos);
task.getLogger().println("Restarting a service");
String exe = System.getenv("WINSW_EXECUTABLE");
File executable;
if (exe!=null) executable = new File(exe);
else executable = new File(home, "hudson.exe");
if (!executable.exists()) executable = new File(home,
"jenkins.exe");
*// use restart! to run hudson/jenkins.exe restart in a separate process,
so it doesn't kill itself int r = new
LocalLauncher(task).launch().cmds(executable, "restart!")
.stdout(task).pwd(home).join();*
if(r!=0)
throw new IOException(baos.toString());
}
Did you try to reload the page? On first restarting it's shown "INFO:
Jenkins is fully up and running" in log file. Maybe the problem happens
when reloading page.
*In any case*, I suggest you create an issue in
https://issues.jenkins-ci.org, giving detailed information about this fact.
Thanks for your patience,
Rachel
El jueves, 3 de noviembre de 2016, 8:42:44 (UTC+1), SGD53 escribió:
>
> Good morning Rachel,
>
> But what happens within Jenkins when updating the installed plugins and
> checking "restart Jenkins when done"? How can I avoid the hanging of
> Jenkins? Do I have to leave the checkbox "restart Jenkins when done"
> unchecked and restart the Windows service instead?
>
> Regards
> Mirko
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/b8c6ffdf-8f59-4fa7-bf91-a9d618284700%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.