unable to run tests in parallel, capturemock not working

Bug #1424954 reported by Emily Bache on 2015-02-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

My colleague is running ubuntu 14.10, texttest 3.27.1. With no queue system configuration, the tests won't run at all unless he checks 'run tests sequentially'. In that case, texttest works, but capturemock does not. Various stack traces appear, see below.

error from texttest:

Dynamic run failed, with the following errors:
Traceback (most recent call last):
  File "/usr/local/bin/texttest", line 30, in <module>
  File "/usr/local/lib/python2.7/dist-packages/texttestlib/engine.py", line 347, in run
  File "/usr/local/lib/python2.7/dist-packages/texttestlib/engine.py", line 373, in _run
  File "/usr/local/lib/python2.7/dist-packages/texttestlib/engine.py", line 393, in createAndRunSuites
  File "/usr/local/lib/python2.7/dist-packages/texttestlib/engine.py", line 279, in createResponders
    self.observers = map(lambda x : x(self.inputOptions, allApps), responderClasses)
  File "/usr/local/lib/python2.7/dist-packages/texttestlib/engine.py", line 279, in <lambda>
    self.observers = map(lambda x : x(self.inputOptions, allApps), responderClasses)
  File "/usr/local/lib/python2.7/dist-packages/texttestlib/queuesystem/masterprocess.py", line 961, in __init__
    ThreadingTCPServer.__init__(self, (self.getIPAddress(), 0), self.handlerClass())
  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__
  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address

error from capturemock, plus attached log:

> remote: Traceback (most recent call
> remote: File "<writedir>/traffic_intercepts/curl", line 2, in
> remote: import capturemock;
> remote: File "/usr/local/lib/python2.7/dist-packages/capturemock/capturecommand.py", line 76, in
> remote: sock =
> remote: File "/usr/local/lib/python2.7/dist-packages/capturemock/capturecommand.py", line 62, in
> remote:
> remote: AttributeError: 'NoneType' object has no attribute

Emily Bache (emily-bache) wrote :
Geoff Bache (geoff.bache) wrote :

Problem you have is that your colleague's machine cannot open a socket on the local host. Usually this is caused by incorrect networking configuration, for example nonsense in /etc/hosts on Ubuntu.
Lack of this makes communication between processes via sockets impossible, i.e. running in parallel in TextTest or using the CaptureMock server, both of which use sockets.

To debug, something like this needs to be possible:

$ python
Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
>>> socket.gethostbyname(socket.gethostname())
>>> s.bind(('', 0))

If any of this throws an exception, you'll have trouble. It's usually (in my experience) because the IP address you get back is wrong, because the network settings are wrongly configured.

Anders Bergkvist (asse-hemma) wrote :


Emily's colleague here. Turns out it was a problem with our DNS - when asked it returned the wrong IP.

Had our IT department kick my machine from the DNS so it could update to the new address, and now the tests run just fine. So, your analysis was correct, network issue - however not on my machine :-)


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers