patrikx3/redis-ui

Refreshing Browser in Cluster Mode causes "502 Bad Gateway"

jangammohan opened this issue · 7 comments

I see there is an issue opened on this already and it is resolved in v2021.4.106 (#50)

Currently, we are using higher version 2021.4.141, looks like on this version the issue is back again, we see the same "502 Bad Gateway" error.

do you recommend sticking with the 2014.4.106 version to not see this issue?

the bad gateway is not a p3x-redis-ui error, but an nginx output.
unless you show me the error like as #50, i can't help.

Currently, we create our own image by downloading version 2014.4.141 from npm. Our dockerfile has the below command

RUN npm -g --unsafe-perm install p3x-redis-ui@2021.4.141. , we deploy created docker image on kubernetes, UI loads for the first time but after minutes or on refresh it gives see below error.

image

Error Details:

[P3XRS] [PID: 000008] 3/25/2021, 7:41:57 PM unhandledRejection ReplyError: ERR SELECT is not allowed in cluster mode
at parseError (/usr/local/lib/node_modules/p3x-redis-ui/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/usr/local/lib/node_modules/p3x-redis-ui/node_modules/redis-parser/lib/parser.js:302:14) {
command: { name: 'select', args: [ '1' ] }
} Promise {
ReplyError: ERR SELECT is not allowed in cluster mode
at parseError (/usr/local/lib/node_modules/p3x-redis-ui/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/usr/local/lib/node_modules/p3x-redis-ui/node_modules/redis-parser/lib/parser.js:302:14) {
command: { name: 'select', args: [Array] }
}
}

ok, the error is happening, you are not enabling cluster mode in the settings, see:
image

the other issue is not related to me, you can see it is error is happening inside redis-parser which is only used by ioredis

i open this issue as it autmatically is happening when you are connecting without cluster mode and then ioredis tries to select the database, when it should not and there is no way to catch this error, so i will connect this error.

so for now to fix it, is by enabling cluster mode in the gui or the json config.

besides, please print out your connections json file as i sense you not enabled cluster mode in the gui or via a file.

closing as the original user is not responding