Project

General

Profile

Actions

Bug #15717

closed

getListenAddr behavior with multiple instances on same host

Added by Peter Amstutz about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
-
Release relationship:
Auto

Description

Setting the listen port for keepstore through the legacy config doesn't seem to work, it seems like instead it randomly picks a port to bind to from InternalURLs and if it is in use, it fails, and (in arvbox) it goes into a crash-restart loop until it happens to picks the 2nd port that's still available

Looking at the code, it just adds the legacy "Listen" to InternalURLs, for that to do the right thing, the keepstore InternalURLs needs to be empty to start with.

In getListenAddr in lib/service/cmd.go, it has different behavior depending on the text of the error, in particular, if there are two ports defined for the same host (eg 25107 and 25108) it will fail if it can't bind 25107 and not try to bind 25108.

        } else if strings.Contains(err.Error(), "cannot assign requested address") {
            continue
        } else if strings.Contains(err.Error(), "address already in use") {
            return url, err

Subtasks 1 (0 open1 closed)

Task #15718: Review 15717-svc-select-portResolvedPeter Amstutz10/15/2019Actions
Actions

Also available in: Atom PDF