any succesful session_store redis examples?
-
I'm trying to use redis for session_store, but can't connect for some reason. I've verified that this server works with database clients and the port is open. It seems like when user/pass comes into the picture, nodebb fails?
"session_store": { "name": "redis", "host": "$REDIS_HOST", "password": "$REDIS_PASS", "port": "$REDIS_PORT", "username": "$REDIS_USER", "database": "0" },
The docs seem to suggest this is correct:
session_store This is an object similar to the redis, mongo or postgres block. It defines a database to use for sessions. For example by setting this to a different redis instance you can separate your data and sessions into two different redis instances. name (Name of database to use redis, mongo or postgres) other settings are identical to the database block for the datastore.
and this configuration worked when I setup a localhost server:
"session_store": { "name": "redis", "host": "$REDIS_HOST", "port": "$REDIS_PORT", "database": "0" },
Can anyone verify that the first configuration block is valid and functional somewhere?
-
Thanks but didn't work. Put a console.log on that line to make sure everything was correct:
nodebb-1 | {
nodebb-1 | host: '...',
nodebb-1 | port: ...,
nodebb-1 | username: '...',
nodebb-1 | password: '...',
nodebb-1 | db: '0',
nodebb-1 | }nodebb-1 | error: MaxRetriesPerRequestError: Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details.
Also reverified that the same details connect in another client, they do.
-
Thanks, it looks like this is the fix:
tls: {},
making this the final object:
nodebb-1 | { nodebb-1 | host: '...', nodebb-1 | port: ..., nodebb-1 | username: '...', nodebb-1 | password: '...', nodebb-1 | db: 0, nodebb-1 | tls: {}
Is there any way to get that object through with the current version?
I guess this:
"session_store": { "name": "...", "host": "...", "password": "...", "port": ..., "database": "0", "options": { "username": "...", "tls": {} } },