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

[bug] redis_db option is not used #487

Closed
capricornusx opened this issue Oct 15, 2021 · 3 comments
Closed

[bug] redis_db option is not used #487

capricornusx opened this issue Oct 15, 2021 · 3 comments

Comments

@capricornusx
Copy link

capricornusx commented Oct 15, 2021

Centrifugo version is 3.0.3 (in Docker)
Operating system is Ubuntu 20.10

config.json:

{
"address": "127.0.0.1",
"port": 8002,

"engine": "redis",
"redis_prefix": "centrifugo",
"redis_tls_skip_verify": true,
"redis_address": ["localhost:6379"],
"redis_db": "3",
"redis_tls": false,
"redis_prefix": "centrifugo",
"history_meta_ttl": "86400s",

"log_level": "debug",
"token_hmac_secret_key": "XXX",
"admin_password": "YYY",
"admin_secret": "ZZZ",
"admin": true,
"api_key": "XXX",
"prometheus": true,
"health": true,
"client_user_connection_limit": 1,
"websocket_message_size_limit": 1000000,
"websocket_compression": true,
"namespaces": [
	{
	"name": "public",
	"anonymous": false,
	"publish": true,
	"watch": true,
	"presence": true,
	"join_leave": false,
	"history_size": 10,
	"sockjs_heartbeat_delay": 30,
	"recover": true,
	"history_ttl": "30s"
	}
],
"allowed_origins": ["*"],
"proxy_http_headers": [
  "Origin",
  "User-Agent",
  "Cookie",
  "Authorization",
  "X-Real-Ip",
  "X-Forwarded-For",
  "X-Request-Id"
]
}

docker-compose logs -f centrifugo:

centrifugo  | {"level":"info","version":"3.0.3","runtime":"go1.17.2","pid":1,"engine":"Redis","gomaxprocs":12,"time":"2021-10-15T15:35:48Z","message":"starting Centrifugo"}
centrifugo  | {"level":"info","path":"/centrifugo/config.json","time":"2021-10-15T15:35:48Z","message":"using config file"}
centrifugo  | {"level":"info","algorithms":"HS256, HS384, HS512","time":"2021-10-15T15:35:48Z","message":"enabled JWT verifiers"}
centrifugo  | {"level":"info","time":"2021-10-15T15:35:48Z","message":"Redis: localhost:6379/0, using password: false"}
centrifugo  | {"level":"debug","shard":"localhost:6379","time":"2021-10-15T15:35:48Z","message":"running Redis control PUB/SUB, num workers: 12"}
centrifugo  | {"level":"debug","shard":"localhost:6379","time":"2021-10-15T15:35:48Z","message":"running Redis PUB/SUB, num workers: 12"}
centrifugo  | {"level":"debug","shard":"localhost:6379","time":"2021-10-15T15:35:48Z","message":"starting RedisBroker Subscriber"}
centrifugo  | {"level":"warn","time":"2021-10-15T15:35:48Z","message":"usage of allowed_origins * is discouraged for security reasons, consider setting exact list of origins"}
centrifugo  | {"level":"info","time":"2021-10-15T15:35:48Z","message":"serving websocket, API, admin, prometheus, health endpoints on 127.0.0.1:8002"}

👉 Redis: localhost:6379/0

but I'am use "redis_db": "3"

@FZambia
Copy link
Member

FZambia commented Oct 15, 2021

@capricornusx hello, thanks - fixed in 633d2ce, will be part of v3.0.4

@FZambia
Copy link
Member

FZambia commented Oct 15, 2021

As a workaround it's possible to use: redis_address option like redis://localhost:6379/3

@FZambia
Copy link
Member

FZambia commented Oct 16, 2021

v3.0.4 released.

@FZambia FZambia closed this as completed Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants