Opened on 01/25/2016 at 11:05:17 AM

Closed on 02/01/2016 at 12:59:59 PM

#3572 closed defect (fixed)

Cannot restart UI test environment if Python keeps port open

Reported by: greiner Assignee: greiner
Priority: P3 Milestone:
Module: User-Interface Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by greiner)


Ubuntu 14.04

How to reproduce

  1. Start test server with ./
  2. Open http://localhost:5000/options.html
  3. Kill process using CTRL+C

Observed behavior

Console shows the following error message:

socket.error: [Errno 98] Address already in use

Expected behavior

Server should start up normally without any error messages being shown.


Python keeps ports open in case any extra packets show up so telling it to reuse those should be sufficient. However, that requires us to manually bind to the port.

What to change

  • Set the third argument in the server constructor to False to indicate that we want to bind to the port manually.
  • Set the server's allow_reuse_address property to True.
  • Call server_bind() and server_activate() before starting the server.

Attachments (0)

Change History (5)

comment:1 Changed on 01/25/2016 at 11:07:44 AM by greiner

  • Description modified (diff)

comment:2 Changed on 01/25/2016 at 12:43:22 PM by greiner

  • Description modified (diff)

comment:3 Changed on 01/25/2016 at 06:53:33 PM by greiner

  • Owner set to greiner

comment:4 Changed on 01/25/2016 at 06:59:21 PM by greiner

  • Status changed from new to reviewing

comment:5 Changed on 02/01/2016 at 12:59:59 PM by greiner

  • Resolution set to fixed
  • Review URL(s) modified (diff)
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from greiner.
Note: See TracTickets for help on using tickets.