Jenkins is hanging

110 views
Skip to first unread message

SGD53

unread,
Oct 26, 2016, 8:40:41 AM10/26/16
to Jenkins Users

Hi,

 

Every time after restarting Jenkins, e. g. due to updates of plug-ins, the web page stucks in "Please wait while Jenkins is getting ready to work...". I only can resolve this by restarting the corresponding Windows service manually. This is my system configuration:

Jenkins:           2.27

OS:                  Windows Server 2012 R2

RAM:                4 GB

 

The attached documents cover the reports of jmap and jstack.

 

Are there any suggestions how to solve this issue?

 

Regards

Mirko

Reports.zip

Rachel Moreno

unread,
Oct 31, 2016, 6:10:23 PM10/31/16
to Jenkins Users
Hi Mirko,

Please, could you provide what appears in jenkins.log?

Best regards,
Rachel

SGD53

unread,
Nov 1, 2016, 9:27:40 AM11/1/16
to Jenkins Users
Hi Rachel,

Please see the attached file containing the log.

Regards
Mirko
Jenkins.zip

Rachel Moreno

unread,
Nov 1, 2016, 2:14:12 PM11/1/16
to Jenkins Users
Hi Mirko,

Please, could you provide more detail? Why are there two stop-and-start (14:12 and 14:20)? When does it happen the problem?

Best regards,
Rachel

SGD53

unread,
Nov 2, 2016, 4:00:52 AM11/2/16
to Jenkins Users
Hi Rachel,

I did the exercise twice: at 14:12, I called <<Jenkins-URL>>/restart the first time and waited several minutes seeing the "Please wait"-page. Then, I've restarted Jenkins' Windows service.

To reproduce the behaviour, I've executed the same procedure at 14:20 again.

Regards
Mirko

Rachel Moreno

unread,
Nov 2, 2016, 5:52:00 PM11/2/16
to Jenkins Users
Hi Mirko,

I think I've just understood your problem when explaining how you are restarting at first time.

I suggested to include .log, because I had a similar situation and the reason was reflected in that file.

If I'm not mistaken, if Jenkins is installed as a service, it can't be restart with <<Jenkins-URL>>/restart.

An article for reference: https://support.cloudbees.com/hc/en-us/articles/216118748-How-to-Start-Stop-or-Restart-your-Instance

Please, sorry for my misunderstanding.

Best regards,
Rachel

SGD53

unread,
Nov 3, 2016, 3:42:44 AM11/3/16
to Jenkins Users
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

Rachel Moreno

unread,
Nov 3, 2016, 9:03:36 AM11/3/16
to Jenkins Users
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

SGD53

unread,
Nov 7, 2016, 2:40:15 AM11/7/16
to Jenkins Users
Hi Rachel,

I've attached my "observations" to this ticket, but unfortunately no reactions :(

Is ist better to open a new ticket?

Regards
Mirko

Rachel Moreno

unread,
Nov 7, 2016, 3:16:11 PM11/7/16
to Jenkins Users
Hi Mirko,

In my personal opinion, I'd open a new issue with more detail (all data in this thread).

Best regards,
Rachel
Reply all
Reply to author
Forward
0 new messages