Running SCOOP unit tests: Exception: Could not start server?

Skip to first unread message

Nick Vandewiele

Jun 10, 2016, 4:34:21 PM6/10/16
to scoop-users
We are using SCOOP in a larger project, and are attempting to write unit tests for our code. We adopted the unit test structure from what is provided in the test/ module, particularly, we are subclassing the TestScoopCommon class.

Unfortunately, when running our tests we run into trouble. In fact, the same error messages appear when running the unit tests located in the test folder of the scoop repository via:

clear;nosetests --verbose --nologcapture --nocapture test/

The behavior is non-deterministic, as far as I can tell. The unit tests sometimes run, sometimes they hang. 

Error messages are diverse:

Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 551, in __bootstrap_inner
  File "/usr/lib/python2.7/", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/vagrant_data/Code/scoop/scoop/_comm/", line 196, in _reportFutures
  File "/home/vagrant/venv/local/lib/python2.7/site-packages/zmq/sugar/", line 329, in send_multipart
    self.send(msg, SNDMORE|flags, copy=copy, track=track)
  File "zmq/backend/cython/socket.pyx", line 617, in zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:6625)
  File "zmq/backend/cython/socket.pyx", line 654, in zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:6271)
  File "zmq/backend/cython/socket.pyx", line 94, in zmq.backend.cython.socket._check_closed (zmq/backend/cython/socket.c:1328)
ZMQError: Socket operation on non-socket


test_wait_with_timeout (tests.TestApi) ... Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/vagrant_data/Code/scoop/scoop/broker/", line 84, in <module>
  File "scoop/broker/", line 85, in __init__
  File "zmq/backend/cython/socket.pyx", line 487, in zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:5156)
  File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:7535)
zmq.error.ZMQError: Address already in use

When aborting via CTRL-C the following error messages would sometimes appear, the following lines would sometimes appear:

    raise Exception('Could not start server!')
Exception: Could not start server!

Is it possible that the tear down steps in TestScoopCommon do not fully clean up everything, e.g. releasing ports etc...
We are running SCOOP from within a linux VM, using ZMQ v15.2.0.

Reply all
Reply to author
0 new messages