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.78k stars 5.37k forks source link

Issue when trying to setup cluster and install service #590

Open monganir opened 6 years ago

monganir commented 6 years ago

Hello,

I am a bit stumped at this time and am hoping i could get assistance with the problem i am facing. I have a task to setup a redis server alongside a cluster and am currently having issues running the redis-server --service-install function. Steps outlined below:

OS: windows server 2012 R2

  1. Install https://github.com/MicrosoftArchive/redis/releases version 3.2.100 as per instructed
  2. Install Ruby for Windows
  3. Execute gem install redis
  4. Verify redis server can be connected to using CLI and is running in windows service (ALL GOOD)
  5. Begin creation of 3 node cluster 5a. Create folder 7000 within C:\program files\Redis 5b. Create redis.config file as per below: port 7000 cluster-enabled yes cluster-config-file cluster-test/7000/nodes.conf cluster-node-timeout 5000 protected-mode yes bind 0.0.0.0 dbfilename cluster-test.rdb syslog-enabled yes syslog-ident redis loglevel warning logfile "" 5c. Execute the following command as adminstrative cmd prompt: redis-server –-service-install –-service-name Redis_cluster-test-7000 cluster-test/7000/redis.conf

redis service install issue

At this point the command executes but does not return an error or anything as per the screen shot. There is no information in the event log nor redis server_log pertaining to this issue.

Any assistance would be appreciated!

tporadowski commented 6 years ago

Hi @monganir

Please post some information on your actual setup in that Redis folder, i.e. using dir /S /B when in "C:\Program Files\Redis". Also note that:

Finally, please be aware that this Redis port is no longer supported - for a slightly newer version (4.0.2) you can have a look into tporadowski/redis.

Regards, Tomasz

monganir commented 6 years ago

Hi Tomasz,

Thanks for your prompt response, it was my mistake, we are using redis.conf (not config). Please find attached the output (output.txt).

I tried replacing the / with \ and no luck.

Thanks for letting us know re:port.

Let me know if you see anything fishy with the output.

tporadowski commented 6 years ago

I've just given it a try using version 4.0.2 with "cluster-test\7000\redis.conf" set to:

bind 127.0.0.1
protected-mode no
port 7000

loglevel notice
logfile "7000.txt"
syslog-enabled yes
syslog-ident redis7000

rdbcompression yes
rdbchecksum yes
dbfilename dump7000.rdb

cluster-enabled yes
cluster-config-file cluster-test/7000/nodes.conf
cluster-node-timeout 5000

and by running

c:\Program Files\Redis>redis-server.exe --service-install --service-name Redis_cluster-test-7000 cluster-test\7000\redis.conf

You're right that it doesn't yield a thing, but it installed the service which I could see via "Services" (Control Panel/Administrative tools) - so please check it there :). Once started from there it properly got running and logged everything to Event Log. Documentation indeed says that "--service-install" should output a message, but for some reason it doesn't do this (yet, when uninstalling via "--service-uninstall" I got the correct message).

monganir commented 6 years ago

Thanks for the feedback. In our case, the service does not install on the system at all. We used process monitor and noticed the --service-install command returned error code 1 but unfortunately cannot find an actual error message that would help diagnose the issue further. Any thoughts?

tporadowski commented 6 years ago

Does it make any difference if you try to install it from cmd.exe started with administrative privileges? It's not required as the process will try to elevate its privileges when installing itself as a service, but please give it a try :)