Skip to content

Fleet Server listens on loopback when TLS is disabled in v8.6.0 #2197

@antoineco

Description

@antoineco

Although the host is set to 0.0.0.0 in the config, fleet-server forcibly listens on 127.0.0.1:8220 since v8.6.0 when configured without TLS.

$ ss -tlpn
State     Recv-Q    Send-Q       Local Address:Port        Peer Address:Port    Process                                                                         
LISTEN    0         4096             127.0.0.1:8220             0.0.0.0:*        users:(("fleet-server",pid=167,fd=12))                                         
LISTEN    0         4096             127.0.0.1:8221             0.0.0.0:*        users:(("fleet-server",pid=167,fd=14))                                         
LISTEN    0         4096             127.0.0.1:6789             0.0.0.0:*        users:(("elastic-agent",pid=7,fd=12))                                          
LISTEN    0         4096             127.0.0.1:6791             0.0.0.0:*        users:(("elastic-agent",pid=7,fd=10))                                          
LISTEN    0         4096            127.0.0.11:40239            0.0.0.0:*

The only possibly relevant log entries I could find are:

{"log.level":"info","@timestamp":"2023-01-18T11:42:17.160Z","message":"server listening","component":{"binary":"fleet-server","dataset":"elastic_agent.fleet_server","id":"fleet-server-default","type":"fleet-server"},"ecs.version":"1.6.0","service.name":"fleet-server","bind":"localhost:8220","rdTimeout":60000,"wrTimeout":600000,"@timestamp":"2023-01-18T11:42:17.16Z","ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2023-01-18T11:42:17.160Z","message":"Exposed over insecure HTTP; enablement of TLS is strongly recommended","component":{"binary":"fleet-server","dataset":"elastic_agent.fleet_server","id":"fleet-server-default","type":"fleet-server"},"ecs.version":"1.6.0","service.name":"fleet-server","@timestamp":"2023-01-18T11:42:17.16Z","ecs.version":"1.6.0"}

When TLS is enabled, the "server listening" log entry shows a binding to 0.0.0.0:8200 as expected:

{"log.level":"info","@timestamp":"2023-01-17T14:13:57.314Z","message":"server listening","component":{"binary":"fleet-server","dataset":"elastic_agent.fleet_server","id":"fleet-server-default","type":"fleet-server"},"wrTimeout":600000,"ecs.version":"1.6.0","service.name":"fleet-server","bind":"0.0.0.0:8220","rdTimeout":60000,"ecs.version":"1.6.0"}

Until v8.5 (included), the host input was respected, even if TLS wasn't enabled.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions