Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#523 closed defect (fixed)

tests using ports shouldn't use same ports as running

Reported by: jreed Owned by: vorner
Priority: medium Milestone: A-Team-Sprint-20110309
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: 1.0 Add Hours to Ticket: 0
Total Hours: 1.0 Internal?: no

Description

[ RUN      ] ResolverConfig.listenAddresses
Unable to set new address: Failed to initialize network servers: Address already in use
terminate called after throwing an instance of 'std::exception'
  what():  St9exception
[1]   Abort trap (core dumped) ${dir}${tst}

We should not use port 5300 for the default the server.

And any unit tests should probably use some unassigned port number

Subtickets

Change History (14)

comment:1 Changed 50 years ago by vorner

  • Add Hours to Ticket changed from 0.0 to 1.0
  • Total Hours changed from 0.0 to 1.0

comment:1 Changed 9 years ago by stephen

  • Milestone set to A-Team-Sprint-20110223

comment:2 follow-up: Changed 9 years ago by vorner

Hello

The mentioned test doesn't use 5300, it uses 5321 (randomly chosen number somewhere nearby). Is it possible you were running two tests in parallel? I need to use some port number, as it is testing configuration, so it must be told what port to configure.

If this is a problem, I might do a heuristic ‒ bind a port without requesting specific one, see which one it is, close the socket and use that port (and hope the OS didn't give it to anybody else already).

Should I change the default port of servers where they listen to 53? Is it part of this ticket as well?

Thanks

comment:3 in reply to: ↑ 2 Changed 9 years ago by jreed

Replying to vorner:

Hello

The mentioned test doesn't use 5300, it uses 5321 (randomly chosen number somewhere nearby). Is it possible you were running two tests in parallel? I need to use some port number, as it is testing configuration, so it must be told what port to configure.

It was fixed in b9b7ef39987bc2f0031bb7f46b9002665a62607a after this ticket was created.

But yes, a system could be running the same test at same time. I don't know if that has happened yet.

5321 is unassigned but is still in the registered ports. We should use a private port (49152 through 65535).

If this is a problem, I might do a heuristic ‒ bind a port without requesting specific one, see which one it is, close the socket and use that port (and hope the OS didn't give it to anybody else already).

Should I change the default port of servers where they listen to 53? Is it part of this ticket as well?

No. That is tickets #617 and #618.

Thanks

comment:4 Changed 9 years ago by vorner

  • Owner set to vorner
  • Status changed from new to accepted

comment:5 follow-up: Changed 9 years ago by vorner

  • Owner changed from vorner to UnAssigned
  • Status changed from accepted to reviewing

Hello

I switched all ports in tests I found from 5300 and 5321 to 53210, which should be in the private range. This should be trivial.

The change is on top of another branch (#575), because that one contains quite some changes to some of the tests affected by this. The only change on this branch is the last commit. If this is reviewed before the #575, I'll wait with merging this after that one is reviewed.

Is this large enough to have a changelog entry? If so, is this OK?:

[bug]       vorner
Tests use port from private range (53210), lowering chance of a conflict
with something else (eg. running bind 10).

Thanks

comment:6 in reply to: ↑ 5 Changed 9 years ago by jinmei

I'm not sure who is supposed to have the ball of this ticket.

Are you asking Jeremy to confirm, or are you asking someone to review
code changes?

comment:7 Changed 9 years ago by jinmei

  • Owner changed from UnAssigned to vorner

comment:8 follow-up: Changed 9 years ago by vorner

  • Owner changed from vorner to UnAssigned

I talked with Jeremy on the jabber bout what I'm doing, so I guess someone looking at the code to see if I didn't do something stupid should be enough.

Thanks

comment:9 in reply to: ↑ 8 Changed 9 years ago by jinmei

Replying to vorner:

I talked with Jeremy on the jabber bout what I'm doing, so I guess someone looking at the code to see if I didn't do something stupid should be enough.

The code changes look okay.

comment:10 Changed 9 years ago by jinmei

  • Owner changed from UnAssigned to vorner

comment:11 Changed 9 years ago by vorner

  • Resolution set to fixed
  • Status changed from reviewing to closed

Thanks, merged.

comment:12 Changed 9 years ago by vorner

  • Add Hours to Ticket changed from 0 to 1

comment:13 Changed 9 years ago by vorner

  • Estimated Difficulty changed from 0.0 to 1
Note: See TracTickets for help on using tickets.