Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2796

Run redis without interactive WSL shell

$
0
0

I'm moving my development environment to a new laptop and cannot get redis installed the same way as the old machine.

To avoid XY, my goal is to have redis server run locally in WSL and I not need an interactive WSL shell running - this was happening on the old machine and what I'm having trouble accomplishing on the new machine.

The biggest difference is the old machine uses Ubuntu 20.04 and the new one pulled down Ubuntu 22.04 and I know a lot has changed.

What I've tried

I usually follow these instructions - I've tried twice and they both end up the same: the new machine works and redis is available to connect to when the console is running, but after about 8 seconds the client is dropped and cannot reconnect.

One thing I noticed is a difference between ps -auxf output, redis is parented by init on the old machine and does not have a parent tree on the new machine.

Old Machine

old-machine:~$ ps -auxfUSER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMANDroot         1  0.0  0.0   2328  1520 ?        Sl   09:34   0:00 /initroot         4  0.0  0.0   2324     4 ?        Sl   09:34   0:00 plan9 --control-socket 5 --log-level 4 --server-fd 6 --pipe-fd 8 --log-truncateroot         7  0.0  0.0   2336   112 ?        Ss   09:34   0:00 /initroot         8  0.0  0.0   2352   120 ?        S    09:34   0:00  \_ /initme           9  0.0  0.0  10196  5204 pts/0    Ss   09:34   0:00      \_ -bashme         118  0.0  0.0  10868  3228 pts/0    R+   09:49   0:00      |   \_ ps -auxfredis       47  0.0  0.0  51712  9948 ?        Ssl  09:36   0:00      \_ /usr/bin/redis-server 127.0.0.1:6379

New Machine

new-machine:~$ ps -auxfUSER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMANDroot           1  0.0  0.0 165840 10944 ?        Ss   09:13   0:00 /sbin/initroot           2  0.0  0.0   2328   940 ?        Sl   09:13   0:00 /initroot           5  0.0  0.0   2352    80 ?        Sl   09:13   0:00  \_ plan9 --control-socket 6 --log-level 4 --server-fd 7 --pipe-fd 9 --log-truncateroot         327  0.0  0.0   2336   112 ?        Ss   09:13   0:00  \_ /initroot         329  0.0  0.0   2352   120 ?        S    09:13   0:00  |   \_ /initme           336  0.0  0.0   6208  5040 pts/0    Ss   09:13   0:00  |       \_ -bashme           459  0.0  0.0   7908  3400 pts/0    R+   09:36   0:00  |           \_ ps -auxfroot         337  0.0  0.0   7528  4896 pts/1    Ss   09:13   0:00  \_ /bin/login -fme           395  0.0  0.0   6120  4940 pts/1    S+   09:13   0:00      \_ -bashroot          38  0.0  0.0  47728 15328 ?        S<s  09:13   0:00 /lib/systemd/systemd-journaldroot          58  0.0  0.0  22084  5872 ?        Ss   09:13   0:00 /lib/systemd/systemd-udevdroot          72  0.0  0.0   4492   156 ?        Ss   09:13   0:00 snapfuse /var/lib/snapd/snaps/bare_5.snap /snap/bare/5 -o ro,nodev,allow_other,suidroot          74  0.0  0.0   4624   172 ?        Ss   09:13   0:00 snapfuse /var/lib/snapd/snaps/gtk-common-themes_1535.snap /snap/gtk-common-themes/1535 -o ro,nodev,allow_other,suidroot          75  0.0  0.0   4784  1720 ?        Ss   09:13   0:00 snapfuse /var/lib/snapd/snaps/core22_607.snap /snap/core22/607 -o ro,nodev,allow_other,suidroot          76  0.1  0.0   4808  1736 ?        Ss   09:13   0:02 snapfuse /var/lib/snapd/snaps/snapd_18933.snap /snap/snapd/18933 -o ro,nodev,allow_other,suidroot          78  0.0  0.0   4768  1768 ?        Ss   09:13   0:00 snapfuse /var/lib/snapd/snaps/ubuntu-desktop-installer_967.snap /snap/ubuntu-desktop-installer/967 -o ro,nodev,allowsystemd+      96  0.0  0.0  25528 12512 ?        Ss   09:13   0:00 /lib/systemd/systemd-resolvedroot         133  0.0  0.0   4304  2680 ?        Ss   09:13   0:00 /usr/sbin/cron -f -Pmessage+     134  0.0  0.0   8596  4576 ?        Ss   09:13   0:00 @dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-onlyroot         139  0.0  0.1  30104 19676 ?        Ss   09:13   0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggerssyslog       140  0.0  0.0 222400 11164 ?        Ssl  09:13   0:00 /usr/sbin/rsyslogd -n -iNONEroot         141  0.0  0.3 1613668 49524 ?       Ssl  09:13   0:00 /usr/lib/snapd/snapdroot         146  0.0  0.0  15320  7224 ?        Ss   09:13   0:00 /lib/systemd/systemd-logindroot         200  0.0  0.0   4780  3380 ?        Ss   09:13   0:00 /bin/bash /snap/ubuntu-desktop-installer/967/bin/subiquity-serverroot         351  0.2  0.4 614084 80424 ?        Sl   09:13   0:03  \_ /snap/ubuntu-desktop-installer/967/usr/bin/python3.10 -m subiquity.cmd.server --use-os-prober --storage-version=root         407  0.1  0.2  43780 37708 ?        S    09:13   0:02      \_ python3 /snap/ubuntu-desktop-installer/967/usr/bin/cloud-init status --waitroot         202  0.0  0.1 107208 21372 ?        Ssl  09:13   0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signalroot         206  0.0  0.0   3236  1116 hvc0     Ss+  09:13   0:00 /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 vt220root         208  0.0  0.0   3192  1060 tty1     Ss+  09:13   0:00 /sbin/agetty -o -p -- \u --noclear tty1 linuxme           388  0.0  0.0  16936  8836 ?        Ss   09:13   0:00 /lib/systemd/systemd --userme           389  0.0  0.0 168748  3356 ?        S    09:13   0:00  \_ (sd-pam)redis        426  0.1  0.1  64252 21788 ?        Ssl  09:15   0:02 /usr/bin/redis-server 127.0.0.1:6379

A lot of snap stuff on the new machine.

Details

.Old MachineNew Machine
HostWin 10 Pro 19045 x64Win 10 Pro 19045 x64
WSL version22
WSL guest distroUbuntu 20.04.3Ubuntu 22.04.3
redis-server5.0.76.0.16

Viewing all articles
Browse latest Browse all 2796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>