Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update loki's default port to 3100 #6349

Merged
merged 4 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
* [5777](https://github.com/grafana/loki/pull/5777) **tatchiuleung**: storage: make Azure blobID chunk delimiter configurable
* [5650](https://github.com/grafana/loki/pull/5650) **cyriltovena**: Remove more chunkstore and schema version below v9
* [5643](https://github.com/grafana/loki/pull/5643) **simonswine**: Introduce a ChunkRef type as part of logproto
* [6349](https://github.com/grafana/loki/pull/6349) **simonswine**: Updates default HTTP listen port from 80 to 3100, make sure to configure the port explicitly if you are using port 80.
simonswine marked this conversation as resolved.
Show resolved Hide resolved
simonswine marked this conversation as resolved.
Show resolved Hide resolved
#### Promtail

##### Enhancements
Expand Down
4 changes: 4 additions & 0 deletions docs/sources/upgrading/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ The output is incredibly verbose as it shows the entire internal config struct u

This value now defaults to `loki`, it was previously set to `cortex`. If you are relying on this container name for your chunks or ruler storage, you will have to manually specify `-azure.container-name=cortex` or `-ruler.storage.azure.container-name=cortex` respectively.

#### Default value for `server.http-listen-port` changed

This value now defaults to `3100` so the Loki process doesn't require special privileges anymore (before it had been set to port `80`, which is a privileged port). In case you need Loki to listen on port `80` you can set it back to the previous default using `-server.http-listen-port=80`.
simonswine marked this conversation as resolved.
Show resolved Hide resolved

## 2.5.0

### Loki
Expand Down
2 changes: 1 addition & 1 deletion pkg/loki/config_wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ func TestDefaultUnmarshal(t *testing.T) {
require.NoError(t, err)

assert.True(t, config.AuthEnabled)
assert.Equal(t, 80, config.Server.HTTPListenPort)
assert.Equal(t, 3100, config.Server.HTTPListenPort)
assert.Equal(t, 9095, config.Server.GRPCListenPort)
})
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/loki/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ func (c *Config) registerServerFlagsWithChangedDefaultValues(fs *flag.FlagSet) {

case "server.grpc.keepalive.ping-without-stream-allowed":
_ = f.Value.Set("true")

case "server.http-listen-port":
_ = f.Value.Set("3100")
}

fs.Var(f.Value, f.Name, f.Usage)
Expand Down
5 changes: 5 additions & 0 deletions pkg/loki/loki_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func TestFlagDefaults(t *testing.T) {
require.Contains(t, gotFlags, flagToCheck)
require.Equal(t, c.Server.GRPCServerPingWithoutStreamAllowed, true)
require.Contains(t, gotFlags[flagToCheck], "(default true)")

flagToCheck = "-server.http-listen-port"
require.Contains(t, gotFlags, flagToCheck)
require.Equal(t, c.Server.HTTPListenPort, 3100)
require.Contains(t, gotFlags[flagToCheck], "(default 3100)")
}

func TestLoki_isModuleEnabled(t1 *testing.T) {
Expand Down