• 카테고리

    질문 & 답변
  • 세부 분야

    데브옵스 · 인프라

  • 해결 여부

    해결됨

redis Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command]) 에러

23.11.14 20:08 작성 조회수 455

0

안녕하세요

redis-serve 실행까지는 잘되는데

vsCode 에서 yarn test 만 하면 꼭 아래와 같은 에러가 발생합니다.

기본포트로 할때는 되다가

6380 포트로 바꾼이후로 잘안되고 redis 에서도

바뀐포트로 연결하고 비밀번호까지 쳤는데 아래와 같은 에러가 발생합니다.

그리고 제소스가 에러가 나서

제공해주신

express 소스를 압축을 풀어도 같은 에러가 발생을 합니다.

혹시몰라 build 파일을 삭제하고 재빌드후 다시 켜도 아래와 같은 에러가 나는데

혹시 이유를 알 수 있을까요?

 

 

● POST /messages › responds with a success message

Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command])

at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14)

at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18)

at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9)

● GET /messages › responds with all messages

Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command])

at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14)

at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18)

at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9)

● Test suite failed to run

thrown: "Exceeded timeout of 5000 ms for a hook.

Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

18 | });

19 |

> 20 | afterAll(async () => {

| ^

21 | await client.flushDb();

22 | await client.quit();

23 | });

at Object.<anonymous> (app/index.test.ts:20:1)

Test Suites: 1 failed, 1 total

FAIL app/index.test.ts (101.064 s)

● POST /messages › responds with a success message

Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command])

at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14)

at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18)

at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9)

● GET /messages › responds with all messages

Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command])

FAIL app/index.test.ts (100.278 s)

● POST /messages › responds with a success message

Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command])

at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14)

at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18)

at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9)

● GET /messages › responds with all messages

Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command])

at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14)

at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18)

at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9)

● Test suite failed to run

thrown: "Exceeded timeout of 100000 ms for a hook.

Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

18 | });

19 |

> 20 | afterAll(async () => {

| ^

21 | await client.flushDb();

22 | await client.quit();

23 | }, 100000);

at Object.<anonymous> (app/index.test.ts:20:1)

답변 1

답변을 작성해보세요.

0

음 오류 메시지를 봤을 때 인증 쪽의 문제로 보입니다. 그러면 소스코드를 제가 제공한걸로 해도 문제가 발생하게 되죠. 레디스 서버를 구동하실 때 강의에서와 동일하게 설정했는지 그리고 소스코드에서 사용하는 환경변수는 올바르게 설정되었는지 확인 해주세요!

huk님의 프로필

huk

질문자

2023.11.15

아..넵 답변 감사드립니다.

강의와 똑같이 다시 보고 했는데 redis 서버도 잘구동되는데 계속 에러가 나네요 ㅎㅎ...

test 와 dev 실행만 에러가 나도

그나마 start 가 되어서

aws ubuntu 에서는 잘 적용되니깐 그나마 다행입니다.

 

다시한번 강의돌려보며 따라해보겠습니다.

답변감사드립니다!!

혹시 이 문제는 해결 하셨을까요?

huk님의 프로필

huk

질문자

2023.11.17

하하..아직 해결은 못했지만 그냥 넘어갔습니다..ㅎㅎ

이후 aws lightsail 도 잘 세팅되길래 ㅎㅎ

채널톡 아이콘