Windows 10 Linux Subsystem Redis not auto-starting
I have installed Redis on Windows 10 Linux Subsystem. I followed the instructions available at https://redis.io/topics/quickstart and I have taken care that I followed all the steps mentioned in section Installing Redis more properly correctly.
However trying to run the following command
sudo update-rc.d redis_6379 defaults
I am getting following error:
~$ sudo update-rc.d redis_6379 defaults
insserv: warning: script 'K01redis_6379' missing LSB tags and overrides
insserv: warning: script 'redis_6379' missing LSB tags and overrides
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'cron' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `cron'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `cron'
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'friendly-recovery' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `friendly-recovery'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `friendly-recovery'
Manually starting the server works:
~$ sudo /etc/init.d/redis_6379 start
Starting Redis server...
~$ redis-cli ping
PONG
Can anybody please help me in configuring Redis on WLS so that it automatically starts in background like it is the case on actual Ubuntu machine?
Thanks.
windows-10 windows-subsystem-for-linux redis
add a comment |
I have installed Redis on Windows 10 Linux Subsystem. I followed the instructions available at https://redis.io/topics/quickstart and I have taken care that I followed all the steps mentioned in section Installing Redis more properly correctly.
However trying to run the following command
sudo update-rc.d redis_6379 defaults
I am getting following error:
~$ sudo update-rc.d redis_6379 defaults
insserv: warning: script 'K01redis_6379' missing LSB tags and overrides
insserv: warning: script 'redis_6379' missing LSB tags and overrides
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'cron' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `cron'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `cron'
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'friendly-recovery' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `friendly-recovery'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `friendly-recovery'
Manually starting the server works:
~$ sudo /etc/init.d/redis_6379 start
Starting Redis server...
~$ redis-cli ping
PONG
Can anybody please help me in configuring Redis on WLS so that it automatically starts in background like it is the case on actual Ubuntu machine?
Thanks.
windows-10 windows-subsystem-for-linux redis
add a comment |
I have installed Redis on Windows 10 Linux Subsystem. I followed the instructions available at https://redis.io/topics/quickstart and I have taken care that I followed all the steps mentioned in section Installing Redis more properly correctly.
However trying to run the following command
sudo update-rc.d redis_6379 defaults
I am getting following error:
~$ sudo update-rc.d redis_6379 defaults
insserv: warning: script 'K01redis_6379' missing LSB tags and overrides
insserv: warning: script 'redis_6379' missing LSB tags and overrides
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'cron' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `cron'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `cron'
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'friendly-recovery' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `friendly-recovery'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `friendly-recovery'
Manually starting the server works:
~$ sudo /etc/init.d/redis_6379 start
Starting Redis server...
~$ redis-cli ping
PONG
Can anybody please help me in configuring Redis on WLS so that it automatically starts in background like it is the case on actual Ubuntu machine?
Thanks.
windows-10 windows-subsystem-for-linux redis
I have installed Redis on Windows 10 Linux Subsystem. I followed the instructions available at https://redis.io/topics/quickstart and I have taken care that I followed all the steps mentioned in section Installing Redis more properly correctly.
However trying to run the following command
sudo update-rc.d redis_6379 defaults
I am getting following error:
~$ sudo update-rc.d redis_6379 defaults
insserv: warning: script 'K01redis_6379' missing LSB tags and overrides
insserv: warning: script 'redis_6379' missing LSB tags and overrides
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'cron' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `cron'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `cron'
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
insserv: warning: script 'friendly-recovery' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `friendly-recovery'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `friendly-recovery'
Manually starting the server works:
~$ sudo /etc/init.d/redis_6379 start
Starting Redis server...
~$ redis-cli ping
PONG
Can anybody please help me in configuring Redis on WLS so that it automatically starts in background like it is the case on actual Ubuntu machine?
Thanks.
windows-10 windows-subsystem-for-linux redis
windows-10 windows-subsystem-for-linux redis
asked Aug 9 '17 at 7:34
Jignesh GohelJignesh Gohel
32838
32838
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
- you can wait for the next release of Windows or install the insider-build that supports background services https://blogs.msdn.microsoft.com/commandline/2017/12/04/background-task-support-in-wsl/
- you can install the windows redis service (no Linux subsystem needed)
https://github.com/MicrosoftArchive/redis Personal experience was, this works fine for a single test instance, but has major headaches trying to create a reliable cluster. - run a Linux instance either as VM or on a separate server.
If this is a developer instance to test code go with 2 or 3. If it is a production deployment and you are expecting to run a cluster then 3.
WSL is create for running small scripts, testing things but I have not found it very friendly as a replacement for Linux server. YMMV
add a comment |
Here are my instructions on how I have configured redis to start as background task on Windows startup.
Install WSL (this is tested with Ubuntu 18.04 version)
Install redis-server inside WSL:
sudo apt install redis-server
Add sudo permission to your user to execute service command without password Open sudoers file sudo visudo and add to end:
your_username ALL=NOPASSWD:/usr/sbin/service redis-server
or if you want to disable sudo passwords generally add this to the end:
your_username ALL=(ALL:ALL) NOPASSWD:ALL
Create vbs file e.g. start-redis.vbs inside startup folder (Open Run and enter shell:startup)
In vbs file insert following:
Set oShell = CreateObject("WScript.Shell")
oShell.Run "wsl", 0
oShell.Run "bash -c ""sudo service redis-server start --daemonize yes"""
That's it. You can try it by running vbs script and then run htop inside WSL terminal. You should see that redis is running.
I have posted these instructions on GitHub.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1239051%2fwindows-10-linux-subsystem-redis-not-auto-starting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
- you can wait for the next release of Windows or install the insider-build that supports background services https://blogs.msdn.microsoft.com/commandline/2017/12/04/background-task-support-in-wsl/
- you can install the windows redis service (no Linux subsystem needed)
https://github.com/MicrosoftArchive/redis Personal experience was, this works fine for a single test instance, but has major headaches trying to create a reliable cluster. - run a Linux instance either as VM or on a separate server.
If this is a developer instance to test code go with 2 or 3. If it is a production deployment and you are expecting to run a cluster then 3.
WSL is create for running small scripts, testing things but I have not found it very friendly as a replacement for Linux server. YMMV
add a comment |
- you can wait for the next release of Windows or install the insider-build that supports background services https://blogs.msdn.microsoft.com/commandline/2017/12/04/background-task-support-in-wsl/
- you can install the windows redis service (no Linux subsystem needed)
https://github.com/MicrosoftArchive/redis Personal experience was, this works fine for a single test instance, but has major headaches trying to create a reliable cluster. - run a Linux instance either as VM or on a separate server.
If this is a developer instance to test code go with 2 or 3. If it is a production deployment and you are expecting to run a cluster then 3.
WSL is create for running small scripts, testing things but I have not found it very friendly as a replacement for Linux server. YMMV
add a comment |
- you can wait for the next release of Windows or install the insider-build that supports background services https://blogs.msdn.microsoft.com/commandline/2017/12/04/background-task-support-in-wsl/
- you can install the windows redis service (no Linux subsystem needed)
https://github.com/MicrosoftArchive/redis Personal experience was, this works fine for a single test instance, but has major headaches trying to create a reliable cluster. - run a Linux instance either as VM or on a separate server.
If this is a developer instance to test code go with 2 or 3. If it is a production deployment and you are expecting to run a cluster then 3.
WSL is create for running small scripts, testing things but I have not found it very friendly as a replacement for Linux server. YMMV
- you can wait for the next release of Windows or install the insider-build that supports background services https://blogs.msdn.microsoft.com/commandline/2017/12/04/background-task-support-in-wsl/
- you can install the windows redis service (no Linux subsystem needed)
https://github.com/MicrosoftArchive/redis Personal experience was, this works fine for a single test instance, but has major headaches trying to create a reliable cluster. - run a Linux instance either as VM or on a separate server.
If this is a developer instance to test code go with 2 or 3. If it is a production deployment and you are expecting to run a cluster then 3.
WSL is create for running small scripts, testing things but I have not found it very friendly as a replacement for Linux server. YMMV
answered Feb 9 '18 at 11:30
robrob
465513
465513
add a comment |
add a comment |
Here are my instructions on how I have configured redis to start as background task on Windows startup.
Install WSL (this is tested with Ubuntu 18.04 version)
Install redis-server inside WSL:
sudo apt install redis-server
Add sudo permission to your user to execute service command without password Open sudoers file sudo visudo and add to end:
your_username ALL=NOPASSWD:/usr/sbin/service redis-server
or if you want to disable sudo passwords generally add this to the end:
your_username ALL=(ALL:ALL) NOPASSWD:ALL
Create vbs file e.g. start-redis.vbs inside startup folder (Open Run and enter shell:startup)
In vbs file insert following:
Set oShell = CreateObject("WScript.Shell")
oShell.Run "wsl", 0
oShell.Run "bash -c ""sudo service redis-server start --daemonize yes"""
That's it. You can try it by running vbs script and then run htop inside WSL terminal. You should see that redis is running.
I have posted these instructions on GitHub.
add a comment |
Here are my instructions on how I have configured redis to start as background task on Windows startup.
Install WSL (this is tested with Ubuntu 18.04 version)
Install redis-server inside WSL:
sudo apt install redis-server
Add sudo permission to your user to execute service command without password Open sudoers file sudo visudo and add to end:
your_username ALL=NOPASSWD:/usr/sbin/service redis-server
or if you want to disable sudo passwords generally add this to the end:
your_username ALL=(ALL:ALL) NOPASSWD:ALL
Create vbs file e.g. start-redis.vbs inside startup folder (Open Run and enter shell:startup)
In vbs file insert following:
Set oShell = CreateObject("WScript.Shell")
oShell.Run "wsl", 0
oShell.Run "bash -c ""sudo service redis-server start --daemonize yes"""
That's it. You can try it by running vbs script and then run htop inside WSL terminal. You should see that redis is running.
I have posted these instructions on GitHub.
add a comment |
Here are my instructions on how I have configured redis to start as background task on Windows startup.
Install WSL (this is tested with Ubuntu 18.04 version)
Install redis-server inside WSL:
sudo apt install redis-server
Add sudo permission to your user to execute service command without password Open sudoers file sudo visudo and add to end:
your_username ALL=NOPASSWD:/usr/sbin/service redis-server
or if you want to disable sudo passwords generally add this to the end:
your_username ALL=(ALL:ALL) NOPASSWD:ALL
Create vbs file e.g. start-redis.vbs inside startup folder (Open Run and enter shell:startup)
In vbs file insert following:
Set oShell = CreateObject("WScript.Shell")
oShell.Run "wsl", 0
oShell.Run "bash -c ""sudo service redis-server start --daemonize yes"""
That's it. You can try it by running vbs script and then run htop inside WSL terminal. You should see that redis is running.
I have posted these instructions on GitHub.
Here are my instructions on how I have configured redis to start as background task on Windows startup.
Install WSL (this is tested with Ubuntu 18.04 version)
Install redis-server inside WSL:
sudo apt install redis-server
Add sudo permission to your user to execute service command without password Open sudoers file sudo visudo and add to end:
your_username ALL=NOPASSWD:/usr/sbin/service redis-server
or if you want to disable sudo passwords generally add this to the end:
your_username ALL=(ALL:ALL) NOPASSWD:ALL
Create vbs file e.g. start-redis.vbs inside startup folder (Open Run and enter shell:startup)
In vbs file insert following:
Set oShell = CreateObject("WScript.Shell")
oShell.Run "wsl", 0
oShell.Run "bash -c ""sudo service redis-server start --daemonize yes"""
That's it. You can try it by running vbs script and then run htop inside WSL terminal. You should see that redis is running.
I have posted these instructions on GitHub.
edited Feb 7 at 9:37
Scott
16k113990
16k113990
answered Feb 7 at 8:07
Tomislav BrabecTomislav Brabec
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1239051%2fwindows-10-linux-subsystem-redis-not-auto-starting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown