Skip to content

Misleading Error about Invalid Hostname when port not included #5348

@darkn3rd

Description

@darkn3rd

CONFIGURATION

Dgraph Version: v20.03.1
OS: Ubuntu 18.04.3 LTS

$ grep $(hostname -f) /etc/hosts 
127.0.1.1	ubuntu1804.localdomain
127.0.0.1 ubuntu1804.localdomain

STEPS TO REPRODUCE

curl -sSf https://get.dgraph.io | ACCEPT_LICENSE=y VERSION=v20.03.1 bash
dgraph zero --my="$(hostname -f):5080" --idx 1
dgraph alpha --my=$(hostname -f) --zero $(hostname -f):5080 -lru_mb 2048

EXPECTED RESULT

An error message about the port not existing, or default it to 7080.

ACTUAL RESULT

2020/05/02 00:38:02 ubuntu1804.localdomain is not valid address
github.com/dgraph-io/dgraph/x.AssertTruef
	/ext-go/1/src/github.com/dgraph-io/dgraph/x/error.go:101
github.com/dgraph-io/dgraph/worker.StartRaftNodes
	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/groups.go:83
github.com/dgraph-io/dgraph/dgraph/cmd/alpha.run.func4
	/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/alpha/run.go:663
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1373

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/usabilityIssues with usability and error messageskind/bugSomething is broken.status/acceptedWe accept to investigate/work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions