CAP.L0.UNOFFERED_HOST — the named host is not one this connection configures
- Category: safety
- Level: 0
- Stability: stable
- Suites: audit
--host names one of the hosts a connection already configures. A value that is not among them
is refused here rather than connected to.
Why refused rather than obeyed
Connecting anyway would audit a server the project never configured, and then report it as the project's database. That is worse than not running at all: the output is a normal-looking report about the wrong machine, and nothing in it says so.
It is also a credentials question. Dialing an operator-named host means sending the project's database credentials over the network to a machine the configuration has never heard of.
A connection that offers no host at all
A socket connection, a DSN, or a url-configured connection names no host. Offering nothing is not
offering everything, so a pin against one of those is refused too. Point --host at a connection
that configures hosts, or drop the flag.
What to do
The notice lists what the connection does offer. Pick one of those, or correct the connection's configuration if the host you meant genuinely belongs there.
Related
- Read/write splits and replicas
- Ambiguous read hosts — the opposite case: several offered, none chosen