Calling tera term from jenkins hangs

156 views
Skip to first unread message

Chris Amos

unread,
May 18, 2016, 5:01:07 AM5/18/16
to Jenkins Users
Sorry, I know not strictly a jenkins issue, jenkins remains responsive and can kill the hung build so jenkins is fine.

But something about the jenkins environment messes up teraterm and I need a clue.

My build job is pretty straightforward;
1 Source from SVN
2 execute batch file to build (3 types of gcc and visual studio)
3 execute batch to do doxygen and build installer.
4 execute batch to install onto custom hardware and do a simple smoke test.

The batch files mean I can run the processes by hand, it is all working.

Step 4 fails under jenkins, this batch file runs a utility to program my UUT over USB/I2C then calls the teratermpro macro utility to connect over USB/RS232 to configure and interrogate the device, the result of all of this is an IP address in a file (it is a wifi IoT device). I take the IP address and ping it to see the device is on the air and talking.

Under the covers the teraterm macro program opens a copy of the teraterm GUI application and controls it, I think by injecting messages into its windows message Q.

When run under Jenkins the macro step that opens the main application is executed and never returns, in task manager I can see both the macro program and the gui app sitting there doing nothing.

I searched here for tera term issues and found it is new, but perhaps something similar has happened in the past with other program.

If no obvious answers, how do I debug it, a thread dump for jenkins seems popular, but jenkins is fine, would it help in this case (and a how-to)?

Thanks

Chris

running jenkins 2.5 on windows 7, all local.

Eric Engel

unread,
May 18, 2016, 5:47:19 AM5/18/16
to jenkins...@googlegroups.com

This is probably a Windows specific problem, because services under Windows cannot interact with GUI elements. So if you installed Jenkins as a Windows service it may not be able to access the GUI elements of your teraterm application. I witnessed the same problem for automated GUI testing.

On Windows you would need to start the Jenkins master directly from a user session (if everything runs on one machine and you have no slaves) or start the slave for this job by JNLP (you may do this on startup).

 

Regards

Eric

--
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/18411c20-21e8-4511-9c82-ea485caac5de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Hinweis: Diese E-Mail und/oder die Anhänge sind vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Die Weitergabe oder Kopieren dieser E-Mail ist strengstens verboten. Wenn Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte unverzüglich den Absender und vernichten Sie die Nachricht und alle Anhänge. Vielen Dank.

Daniel Beck

unread,
May 18, 2016, 6:27:27 AM5/18/16
to jenkins...@googlegroups.com

> On 18.05.2016, at 11:47, Eric Engel <eric....@motionlogic.de> wrote:
>
> On Windows you would need to start the Jenkins master directly from a user session (if everything runs on one machine and you have no slaves) or start the slave for this job by JNLP (you may do this on startup).
>

It's also possible to enable GUI access to services (but whether that's a good idea, I don't know).

Chris Amos

unread,
May 18, 2016, 8:49:15 AM5/18/16
to Jenkins Users, eric....@motionlogic.de
Thanks Eric,

Good clue, I wonder if a fix may be to run a slave on my machine to get around this, which would fit with the plan.

Right now it is all a simple jenkins service on my dev pc, the plan is a linux server controlling slaves for linux and windows builds.

Chris

Chris Amos

unread,
May 18, 2016, 8:53:46 AM5/18/16
to Jenkins Users, eric....@motionlogic.de
Hi Daniel,

Yep, prompted by Eric I went off and found the service option to allow the process to interact with the desktop.

And now it works.

But not quite perfect, I get a flashing icon on the task bar to tell me that a program wants to interact with the desktop, when I let it interact all I get is an empty cmd window that seems to hail from java/jenkins, nothing from teraterm which I had told to start invisibly anyway.

I just need the 'allow but ignore' option.

Ta

Chris

On Wednesday, 18 May 2016 10:47:19 UTC+1, Eric Engel wrote:
Reply all
Reply to author
Forward
0 new messages