0

I have a build running under Jenkins (Windows 7) that builds a C++ application. I wrote a small test app in python that runs the application after it is built and tests its networking capabilities. The problem is that the python script fails with

socket.error: [Errno 10061] No connection could be made because the target machine actively refused it

The test app works fine if I run it locally (it's only connecting on localhost 127.0.0.1) but it always fails when run under Jenkins.

I thought it was the firewall preventing the connection, but I discovered that the firewall has been turned off on the build machine.

I also have the Jenkins service logging in with an account that has admin access. I don't know where else to look.

Is it possible to run an app that accesses the local network during a Jenkins build?

Update: As it turns out, my issue has nothing to do with networking, as far as I can tell. The C++ app tries to setup some DirectX9 services and is blocked from doing so under the user privileges provided by Jenkins. As a result, it quits before it even gets to setting up the networking. Now I have a different problem to solve.

Murrgon
  • 375
  • 4
  • 13
  • Did you look at this post? http://stackoverflow.com/q/6782732/1464763 – David Levesque Aug 21 '14 at 20:16
  • @DavidLevesque - I read through it and I double checked a number of things (order of launch, port numbers and such) but it turns out that wasn't the issue. See my update. – Murrgon Aug 21 '14 at 21:25
  • If you are running jenkins as windows service, then try to run it from command line. There are some privilege issues when Jenkins runs as Windows Service. – NotAgain Aug 22 '14 at 00:29
  • @NotAgain - I removed the windows service and tried running it from the command line, but when I did that, Jenkins came up a clean slate, with no configuration and no jobs. I would have thought it would load by default its configuration from config.xml, but apparently that isn't the case. – Murrgon Aug 22 '14 at 13:15
  • @NotAgain - I figured it out. Needed to set the JENKINS_HOME variable. – Murrgon Aug 22 '14 at 13:29
  • @NotAgain - Unfortunately, it didn't make any difference. – Murrgon Aug 22 '14 at 14:06
  • Can you post the first error message which comes while setting up DirectX9 services? – NotAgain Aug 22 '14 at 14:25
  • @NotAgain - Calling GetDeviceCaps(0, D3DDEVTYPE_HAL, &d3dCaps) immediately after calling Direct3DCreate9(D3D_SDK_VERSION) returns D3DERR_NOTAVAILABLE. – Murrgon Aug 22 '14 at 17:41

0 Answers0