microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http://redis.io
Other
20.82k stars 5.37k forks source link

Can't connect to redis server. #533

Closed faust21 closed 7 years ago

faust21 commented 7 years ago

I'm running redis-x64-3.0.504 on windows server 2008 r2 as windows service. After a few days, although the service is running,but i can't connect to the server. Here is the logs.

[51068] 03 Feb 09:09:54.847 Redis 3.0.504 (00000000/0) 64 bit, standalone mode, port 6379, pid 51068 ready to start. [51068] 03 Feb 09:09:54.848 # Server started, Redis version 3.0.504 [51068] 03 Feb 09:09:54.849 The server is now ready to accept connections on port 6379 [51068] 05 Feb 12:51:26.443 DB saved on disk [51068] 05 Feb 12:51:26.452 DB saved on disk [51068] 07 Feb 23:08:34.490 Background saving started by pid 19824 [51068] 07 Feb 23:08:34.715 # fork operation complete [51068] 07 Feb 23:08:34.716 Background saving terminated with success [51068] 10 Feb 23:29:50.235 DB saved on disk [51068] 10 Feb 23:29:50.286 DB saved on disk [17852] 11 Feb 14:48:38.000 Redis 3.0.504 (00000000/0) 64 bit, standalone mode, port 6379, pid 17852 ready to start. [17852] 11 Feb 14:48:38.002 # Server started, Redis version 3.0.504 [17852] 11 Feb 14:48:38.003 DB loaded from disk: 0.001 seconds [17852] 11 Feb 14:48:38.003 The server is now ready to accept connections on port 6379 [17852] 16 Feb 20:58:58.283 DB saved on disk [17852] 16 Feb 20:58:58.670 DB saved on disk [64656] 17 Feb 14:28:11.839 Redis 3.0.504 (00000000/0) 64 bit, standalone mode, port 6379, pid 64656 ready to start. [64656] 17 Feb 14:28:11.840 # Server started, Redis version 3.0.504 [64656] 17 Feb 14:28:11.846 DB loaded from disk: 0.006 seconds [64656] 17 Feb 14:28:11.846 The server is now ready to accept connections on port 6379 [64656] 19 Feb 00:06:15.810 DB saved on disk [64656] 19 Feb 00:06:15.927 DB saved on disk [27052] 19 Feb 11:55:47.874 Redis 3.0.504 (00000000/0) 64 bit, standalone mode, port 6379, pid 27052 ready to start. [27052] 19 Feb 11:55:47.875 # Server started, Redis version 3.0.504 [27052] 19 Feb 11:55:47.885 DB loaded from disk: 0.009 seconds [27052] 19 Feb 11:55:47.885 The server is now ready to accept connections on port 6379 [27052] 20 Feb 02:51:27.720 DB saved on disk [27052] 20 Feb 02:51:27.836 DB saved on disk [8868] 20 Feb 17:21:36.448 Redis 3.0.504 (00000000/0) 64 bit, standalone mode, port 6379, pid 8868 ready to start. [8868] 20 Feb 17:21:36.450 # Server started, Redis version 3.0.504 [8868] 20 Feb 17:21:36.457 DB loaded from disk: 0.007 seconds [8868] 20 Feb 17:21:36.458 The server is now ready to accept connections on port 6379

chester89 commented 7 years ago

@WHATSAF what does the client say when you try to connect? is there an error? a timeout?

faust21 commented 7 years ago

@chester89 Thanks for your reply. And these are the logs in Redis Desktop Manager. I haven't try to connect use the redis-cli. 2017-02-19 11:54:08 : Init app log 2017-02-19 11:54:22 : Connection: AUTH 2017-02-19 11:54:22 : Connection: ag > connected 2017-02-19 11:54:22 : Connection: ag > [runCommand] PING 2017-02-19 11:54:22 : Connection: ag > Response received : -NOAUTH Authentication required.

2017-02-19 11:54:22 : Connection: AUTH ERROR 2017-02-19 11:54:22 : Connection: AUTH 2017-02-19 11:54:22 : Connection: ag > connected 2017-02-19 11:54:22 : Connection: ag > [runCommand] PING 2017-02-19 11:54:22 : Connection: ag > Response received : -NOAUTH Authentication required.

2017-02-19 11:54:22 : Connection: AUTH ERROR 2017-02-19 11:55:34 : Connection: Command was canceled. 2017-02-19 11:55:44 : Connection: Cancel running commands 2017-02-19 11:55:44 : Connection: Connection error: The remote host closed the connection 2017-02-19 11:55:57 : Connection: AUTH 2017-02-19 11:55:57 : Connection: ag > connected 2017-02-19 11:55:57 : Connection: ag > [runCommand] PING 2017-02-19 11:55:57 : Connection: ag > Response received : +PONG

chester89 commented 7 years ago

@WHATSAF it's an authentication error. Have you tried providing the password?

faust21 commented 7 years ago

@chester89 but i haven't set the password,is it will change the password automatically?

chester89 commented 7 years ago

what do you mean? Do you have redis on local computer or you rented an instance? ​

2017-02-27 3:00 GMT+03:00 AF notifications@github.com:

@chester89 https://github.com/chester89 but i haven't set the password,is it will change the password automatically?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MSOpenTech/redis/issues/533#issuecomment-282600042, or mute the thread https://github.com/notifications/unsubscribe-auth/AALnfJhY8gEW2OPopOUmwj0nMZAZpyMqks5rghIggaJpZM4MF8ph .

-- Yours faithfully, Gleb

faust21 commented 7 years ago

@chester89 Thanks for your patience, and I'm running redis on local computer.

chester89 commented 7 years ago

So open up configuration file and look for a line that says require-pass.

2017-02-27 14:48 GMT+03:00 AF notifications@github.com:

@chester89 https://github.com/chester89 Thanks for your patience, and I'm running redis on local computer.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MSOpenTech/redis/issues/533#issuecomment-282699513, or mute the thread https://github.com/notifications/unsubscribe-auth/AALnfMw8hTpjyFA8obqTfl9C5lavM8Byks5rgrgggaJpZM4MF8ph .

-- Yours faithfully, Gleb

faust21 commented 7 years ago

@chester89 I found the requirepass line, it commented. Should i uncomment the line and change the password? ################################## SECURITY ###################################

# Require clients to issue AUTH <PASSWORD> before processing any other
# commands.  This might be useful in environments in which you do not trust
# others with access to the host running redis-server.
#
# This should stay commented out for backward compatibility and because most
# people do not need auth (e.g. they run their own servers).
#
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
# requirepass foobared
chester89 commented 7 years ago

If you uncomment it, make sure to provide a password. If right now it's commented, then your commands should work without authorization. Have you tried restarting the server?

https://mailtrack.io/ Sent with Mailtrack https://mailtrack.io/install?source=signature&lang=en&referral=thebitterend77@gmail.com&idSignature=22

2017-02-27 17:12 GMT+03:00 AF notifications@github.com:

@chester89 https://github.com/chester89 I found the requirepass line, it commented. Should i recomment the line and change the password? ################################## SECURITY ##############################

Require clients to issue AUTH before processing any other commands. This might be useful in environments in which you do not trust others with access to the host running redis-server. This should stay commented out for backward compatibility and because most people do not need auth (e.g. they run their own servers). Warning: since Redis is pretty fast an outside user can try up to 150k passwords per second against a good box. This means that you should use a very strong password otherwise it will be very easy to break. requirepass foobared

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MSOpenTech/redis/issues/533#issuecomment-282731249, or mute the thread https://github.com/notifications/unsubscribe-auth/AALnfKQRmFby0ZWU74WFHnH4X7lyvCAYks5rgtnGgaJpZM4MF8ph .

-- Yours faithfully, Gleb

faust21 commented 7 years ago

@chester89 Cause the problem don't occur often,I will try to provide a password and observe it.Thanks so much!