Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to start service (e.g. SSHD or MariaDB)? #20

Open
bures opened this issue Jan 24, 2019 · 48 comments
Open

How to start service (e.g. SSHD or MariaDB)? #20

bures opened this issue Jan 24, 2019 · 48 comments

Comments

@bures
Copy link

bures commented Jan 24, 2019

How should one start a service in WSLFedoraRemix. I tried systemctl, but that complaints about systemd not being started. Is there another trick?

Thanks.

@sirredbeard
Copy link
Contributor

The old fashioned way, with a script.

There is no init in WSL, when you launch WSL you are taken straight to your default terminal.

If you want to launch a service you can call it via script and do so in the background using tmux.

You could also create a Windows batch file and run `fedoraremix run and set that somewhere.

You can then create a Windows service around that batch file using sc.

I am going to leave this issue open because this is a common question and I welcome community ideas and input.

@onuralpszr
Copy link

onuralpszr commented Jan 26, 2019

There is a development for "systemd" hopefully in future we can run "directly via "systemctl" I'm aware of that problem but It is depend on WSL people to handle that. I saw "real example picture" from one of the microsoft developer and I'll share link into here with "all comments" so you can understand better.

alt text

microsoft/WSL#994
systemd/systemd#8036

@WSLUser
Copy link
Contributor

WSLUser commented Feb 6, 2019

He's not a MS developer, just a collaborator. It would be great if he shared his repro steps but as he pointed out later in the issue, it may be trivial since we may get it in the Fall build (probably too late to get in Spring or someone would of said something)

@WSLUser
Copy link
Contributor

WSLUser commented Jun 6, 2019

He released the code if we want to include for use in WSL1: microsoft/WSL#994 (comment)

@starvsion
Copy link

This issue has not been solved, even after WSL2 ... peculiar

@modzilla99
Copy link

One could also just run /usr/sbin/sshd

@modzilla99
Copy link

But be sure to generate the ssh keys first

@nicolaskeller
Copy link

While I understand that I can't have services started automatically in the background, is there an easy way to start and stop services on the console like with systemd (service command)? Otherwise looks like I have to check and simulate the individual configs in /usr/lib/systemd/system which is not very handy.

(The service command works within Pengwin Linux, I would love to see it behaving the same way in Fedora Remix.)

@crramirez
Copy link
Contributor

crramirez commented Jan 16, 2020

Hello,

As Pengwin is Debian based you have the service command. In Fedora depending on the service, you may have the former /etc/init.d/xxxx start or yes simulate the individual configs. I can find a tool that can simulate systemd for starting services or try to enable something like service compatible with Fedora.

For starting them automatically the script must be put in /etc/profile.d/xxx.sh and make an exception in sudoers so it starts automatically without asking a password.

Regards

@crramirez
Copy link
Contributor

Maybe the answer can be around including this in Fedora Remix: https://github.com/gdraheim/docker-systemctl-replacement

@WSLUser
Copy link
Contributor

WSLUser commented Jan 16, 2020

Problem with that is that would mean we're running Fedora in Docker. We aren't. We're running it in WSL, which admittedly is container-based approach but the implementation details are very different. This doesn't even cover the VM approach for WSL2. Unless we want to fork and adapt for WSL, (i.e. get rid of docker commands and replace something else, perhaps genie), I think a different solution is required. In our case though, I think the best solution is the hardest one: Implement the initd scripts ourselves. I posted a few for starters that can be added by the user optionally. We need to determine what other ones people are most likely to use and add those as well. I would not propose having a script available for everything living under the sun (unless somebody has already done this, in which case, we just ensure we credit the author(s)). We should just include those things that people find most useful (for example, we provide several applications in pengwin-setup that require services to run).

@ningacoding
Copy link

ningacoding commented May 24, 2020

Still with problem
System has not been booted with systemd as init system (PID 1). Can't operate.

This problem can be solved on Ubuntu (no paid subsystem) with:
https://github.com/DamionGans/ubuntu-wsl2-systemd-script

But this one which is a paid subsystem, is not working? 😒

this must be fixed, or i'll request refund.

@crramirez
Copy link
Contributor

crramirez commented May 24, 2020

I am sure that must be better ways to ask for a feature. Ubuntu doesn't include it either. We can take a look and evaluate if it really solves our user's needs.
For refunds: Forward your Microsoft Store confirmation email to contact@whitewaterfoundry.com

Regards,
Carlos

@ningacoding
Copy link

thank you, request sent.

Regards.

@crramirez
Copy link
Contributor

I made some tests using a fake systemd script:

sudo curl https://raw.githubusercontent.com/WhitewaterFoundry/docker-systemctl-replacement/master/files/docker/systemctl3.py -o /usr/bin/systemctl

I tested it with ssh but I needed to generate the keys using:

sudo /usr/bin/ssh-keygen -A

If anyone can test if it suits the needs?

It is only to start services not to run them at startup

Regards

@nicolaskeller
Copy link

Thanks in advance, this looks like a very handy work-around!
I tried sudo systemctl start postgresql and some other services but it doesn't seem to work for me. I get some warnings in verbose mode, nothing critical, but the processes don't start. I'm not sure how to provide more useful information in particular, feel free to ask if I can help.

@crramirez
Copy link
Contributor

I can directly test PostgreSQL don't worry. I tried with MariaDB and it worked.

We are trying with another approach as well but it requires WSL2 and takes more time. Maybe we can ship with this script for WSL1 with some how-to guides and the more complete for WSL2.

Thanks for testing

@crramirez
Copy link
Contributor

If you can provide a list of the services that you want to start, with these we can prioritize the services that our users need.

@nicolaskeller
Copy link

Sorry I forgot to mention I'm already on WSL2. Performance is so much better, I guess most users will switch in the upcoming months. My pain point currently is postgresql, followed by sshd and redis.

@benyaminl
Copy link

benyaminl commented Feb 4, 2021

Seems lack of systemctl cause podman doesn't run on remix.
image
They claim it can run at https://www.redhat.com/sysadmin/podman-windows-wsl2, but seems it isn't on Fedora Remix.

Related to MicrosoftDocs/WSL#457
But some people write daemonize on MicrosoftDocs/WSL#457 (comment) script to be put on /etc/profile, seems work for some

Edit :
Podman work with some minor change on fedora remix 33.1
containers/podman#3288 (comment)

@gbraad
Copy link

gbraad commented Feb 14, 2021

@benyaminl This is not a systemd issue. It will also run on Fedora remix, you just didn't do the steps:

$ dnf reinstall -y shadow-utils

@gbraad
Copy link

gbraad commented Feb 14, 2021

@bures

To get systemd working you can do: arkane-systems/genie#98 (comment). At the moment I'll see if I can make a package build on copr. If you don't wanna install dotnet on your machine, you can use: https://github.com/gbraad/fedora-wsl-genie have set up a build (WIP) on https://gitlab.com/gbraad/fedora-wsl-genie/-/jobs/1028753060 where you can get the artifacts. Place them in /usr/libexec/genie and link as ln -s /usr/libexec/genie/genie /usr/sbin/genie

Will work on a package and a specific wsl.target for this.

@gbraad
Copy link

gbraad commented Feb 18, 2021

I created a PR for genie that creates an RPM package to deal with the systemd setup: arkane-systems/genie#112 I uploaded a test package to https://github.com/gbraad/fedora-wsl-genie/releases/tag/1.34 Please let me know if this works.

PS> wsl -d fedora33
$ dnf install -y genie-1.34-1.fc33.x86_64.rpm
$ genie -i

a time out might occur here (after 180seconds). This can be fixed:

...
$ genie -s
$ sudo systemctl disable auditd
$ sudo systemctl mask systemd-modules-load
$ exit         # leave the systemd namespace
$ genie -u # stop systemd to verify
$ exit         # exit wsl

Now you can start the distro as follows:

PS> wsl -d fedora33 genie -i

and no timeout should occur. Let me know if this works for you.

Note: Next step is to create a minimized target; wsl.target which handles all of this.


Screenshots:
image
image

@crramirez
Copy link
Contributor

Wow this is amazing. Thank you for the collaboration. We will make some tests with it

@gbraad
Copy link

gbraad commented Feb 18, 2021

@crramirez please test the initial package.
At the moment I can not automate the build, as the build process relies on pulling in dependencies with nuget restore and there is no specific minimal wsl.target that avoids the issues with auditd, dmpath and load-modules.

@benyaminl
Copy link

benyaminl commented Feb 18, 2021

I created a PR for genie that creates an RPM package to deal with the systemd setup: arkane-systems/genie#112 I uploaded a test package to https://github.com/gbraad/fedora-wsl-genie/releases/tag/1.34 Please let me know if this works.

PS> wsl -d fedora33
$ dnf install -y genie-1.34-1.fc33.x86_64.rpm
$ genie -i

a time out might occur here (after 180seconds). This can be fixed:

...
$ genie -s
$ sudo systemctl disable auditd
$ sudo systemctl mask systemd-modules-load
$ exit         # leave the systemd namespace
$ genie -u # stop systemd to verify
$ exit         # exit wsl

Now you can start the distro as follows:

PS> wsl -d fedora33 genie -i

and no timeout should occur. Let me know if this works for you.

Note: Next step is to create a minimized target; wsl.target which handles all of this.

Screenshots:
image
image

Hello, why it nag me with

A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/usr/libexec/genie/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].

The .NET runtime can be found at:
  - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=fedoraremixforwsl.33-x64&apphost_version=5.0.2

I install from the RPM you provide, do I still need to install dotnetcore to run genie -i?

Seem using rpm -ql genie rpm doesn't provide it

[ben@BEN-ASUS-A43SV ~]$ rpm -ql genie
/etc/genie.ini
/usr/lib/.build-id
/usr/lib/.build-id/98
/usr/lib/.build-id/98/c14a6574a0327487734680aea323c623135945
/usr/lib/.build-id/98/c14a6574a0327487734680aea323c623135945.1
/usr/libexec/genie/10-genie-envar.sh
/usr/libexec/genie/genie
/usr/libexec/genie/runinwsl

Seems I still need to install .net 5.0 runtime. Let me try.

@gbraad
Copy link

gbraad commented Feb 18, 2021

@benyaminl Can you try:

$ dnf install -y dotnet-runtime-5.0

Note: my bad... I generated the package from the same environment I tested it on.

@benyaminl
Copy link

@benyaminl Can you try:

$ dnf install -y dotnet-runtime

But that means I don't need Basic Desktop right? Only Server no Gui is enough right?

@gbraad
Copy link

gbraad commented Feb 18, 2021

I enabled Basic-Desktop as that provides most of the needed dependencies. but no GUI should work.

Note: updated the PR and will generate a new package. Done with the update

@benyaminl
Copy link

benyaminl commented Feb 18, 2021

I enabled Basic-Desktop as that provides most of the needed dependencies. but no GUI should work.

Note: updated the PR and will generate a new package. Done with the update

Anyway what I'm missing. I got degraded and failing services like
image

● BEN-ASUS-A43SV-wsl
    State: degraded
     Jobs: 0 queued
   Failed: 3 units
    Since: Thu 2021-02-18 20:10:33 +07; 21min ago
   CGroup: /
           ├─user.slice 
           │ └─user-1000.slice 
           │   ├─user@1000.service 
           │   │ ├─dbus-broker.service 
           │   │ │ ├─977 /usr/bin/dbus-broker-launch --scope user
           │   │ │ └─978 dbus-broker --log 4 --controller 10 --machine-id e826643fae8647c8b9c9572496b4bb73 --max-bytes 100000000000000 --max-fds 25000000000000 --max-matches 5000000000
           │   │ ├─init.scope 
           │   │ │ ├─955 /usr/lib/systemd/systemd --user
           │   │ │ └─956 (sd-pam)
           │   │ └─pipewire.service 
           │   │   ├─963 /usr/bin/pipewire
           │   │   └─979 /usr/bin/pipewire-media-session
           │   └─session-c1.scope 
           │     └─995 /usr/bin/dbus-daemon --syslog --fork --print-pid 4 --print-address 6 --session
           ├─init.scope 
           │ └─24 systemd
           └─system.slice 
             ├─abrt-journal-core.service 
             │ └─174 /usr/bin/abrt-dump-journal-core -D -T -f -e
             ├─systemd-udevd.service 
             │ └─69 /usr/lib/systemd/systemd-udevd
             ├─dbus-broker.service 
             │ ├─137 /usr/bin/dbus-broker-launch --scope system --audit
             │ └─138 dbus-broker --log 4 --controller 9 --machine-id e826643fae8647c8b9c9572496b4bb73 --max-bytes 536870912 --max-fds 4096 --max-matches 131072 --audit
             ├─systemd-homed.service 
             │ └─150 /usr/lib/systemd/systemd-homed
             ├─polkit.service 
             │ └─170 /usr/lib/polkit-1/polkitd --no-debug
             ├─rtkit-daemon.service 
             │ └─148 /usr/libexec/rtkit-daemon
             ├─chronyd.service 
             │ └─158 /usr/sbin/chronyd
             ├─accounts-daemon.service 
             │ └─196 /usr/libexec/accounts-daemon
             ├─abrt-xorg.service 
             │ └─176 /usr/bin/abrt-dump-journal-xorg -fxtD
             ├─ModemManager.service 
             │ └─139 /usr/sbin/ModemManager
             ├─systemd-journald.service 
             │ └─61 /usr/lib/systemd/systemd-journald
             ├─atd.service 
             │ └─229 /usr/sbin/atd -f
             ├─sshd.service 
             │ └─214 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
             ├─crond.service 
             │ └─230 /usr/sbin/crond -n
             ├─NetworkManager.service 
             │ └─202 /usr/sbin/NetworkManager --no-daemon
             ├─systemd-machined.service 
             │ └─948 /usr/lib/systemd/systemd-machined
             ├─gssproxy.service 
             │ └─219 /usr/sbin/gssproxy -D
             ├─rsyslog.service 
             │ └─147 /usr/sbin/rsyslogd -n
             ├─abrtd.service 
             │ └─153 /usr/sbin/abrtd -d -s
             ├─firewalld.service 
             │ └─144 /usr/bin/python3 -s /usr/sbin/firewalld --nofork --nopid
             ├─systemd-userdbd.service 
             │ ├─ 950 /usr/lib/systemd/systemd-userdbd
             │ ├─1414 systemd-userwork
             │ ├─1415 systemd-userwork
             │ └─1416 systemd-userwork
             ├─console-getty.service 
             │ └─233 /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 xterm-256color
             ├─sssd.service 
             │ ├─149 /usr/sbin/sssd -i --logger=files
             │ ├─180 /usr/libexec/sssd/sssd_be --domain implicit_files --uid 0 --gid 0 --logger=files
             │ └─192 /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --logger=files
             ├─systemd-resolved.service 
             │ └─135 /usr/lib/systemd/systemd-resolved
             ├─systemd-logind.service 
             │ └─1431 /usr/lib/systemd/systemd-logind
             └─abrt-oops.service 
               └─175 /usr/bin/abrt-dump-journal-oops -fxtD

@gbraad
Copy link

gbraad commented Feb 18, 2021

can you inspect rngd and dbus-daemon with journalctl ?

For me, rngd is active (running) and dbus-daemon is inactive.

@benyaminl
Copy link

benyaminl commented Feb 18, 2021

can you inspect rngd and dbus-daemon with journalctl ?
For me, rngd is active (running) and dbus-daemon is inactive.

[ben@BEN-ASUS-A43SV-wsl ~]$ sudo journalctl -xe _SYSTEMD_UNIT=dbus-daemon.service
-- Logs begin at Thu 2021-02-18 20:04:58 +07, end at Thu 2021-02-18 20:33:56 +07. --
Feb 18 20:08:14 BEN-ASUS-A43SV-wsl dbus-daemon[123]: Failed to start message bus: No socket received.
-- Reboot --
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl dbus-daemon[117]: Failed to start message bus: No socket received.
[ben@BEN-ASUS-A43SV-wsl ~]$ sudo journalctl -xe _SYSTEMD_UNIT=
abrt-journal-core.service    dbus-broker.service          ModemManager.service         rtkit-daemon.service         systemd-resolved.service
abrt-xorg.service            dbus-daemon.service          NetworkManager.service       session-c1.scope             systemd-sysusers.service
accounts-daemon.service      dmraid-activation.service    polkit.service               sshd.service                 systemd-udevd.service
auditd.service               firewalld.service            rngd.service                 sssd.service                 systemd-udev-settle.service
chronyd.service              init.scope                   rpc-statd-notify.service     systemd-journald.service     user@1000.service
crond.service                mcelog.service               rsyslog.service              systemd-logind.service
[ben@BEN-ASUS-A43SV-wsl ~]$ sudo journalctl -xe _SYSTEMD_UNIT=rngd.service
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
Feb 18 20:08:17 BEN-ASUS-A43SV-wsl rngd[127]: Entropy Generation is slow, consider tuning/adding sources
-- Reboot --
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: Initializing available sources
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [hwrng ]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [rdrand]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [jitter]: JITTER rng fails with code 2
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [jitter]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [pkcs11]: No pkcs11 slots available
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [pkcs11]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [rtlsdr]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: can't open any entropy sourceMaybe RNG device modules are not loaded
[ben@BEN-ASUS-A43SV-wsl ~]$ sudo journalctl -xe _SYSTEMD_UNIT=lightdm.service
-- Logs begin at Thu 2021-02-18 20:04:58 +07, end at Thu 2021-02-18 20:34:41 +07. --
-- No entries --
[ben@BEN-ASUS-A43SV-wsl ~]$ systemctl status rngd
● rngd.service - Hardware RNG Entropy Gatherer Daemon
     Loaded: loaded (/usr/lib/systemd/system/rngd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-02-18 20:10:34 +07; 30min ago
   Main PID: 121 (code=exited, status=1/FAILURE)

Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [hwrng ]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [rdrand]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [jitter]: JITTER rng fails with code 2
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [jitter]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [pkcs11]: No pkcs11 slots available
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [pkcs11]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: [rtlsdr]: Initialization Failed
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl rngd[121]: can't open any entropy sourceMaybe RNG device modules are not loaded
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl systemd[1]: rngd.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 20:10:34 BEN-ASUS-A43SV-wsl systemd[1]: rngd.service: Failed with result 'exit-code'.

Anyway I found reproduceable problem, so when the WSL already running, and I run genie -u, the only one left failed is dbus-daemon, buttt, if wsl start from cold boot, then I got rngd error too. Does it safe to disable dbus daemon? I mean it's not that crucial right? Anyway I tried to remove group "Basic Desktop", it failed. haha...

EDIT: rngd at least need about 10s to start, so seems miles vary between host. hemm...

@gbraad
Copy link

gbraad commented Feb 18, 2021

rngd

for me this starts all within ~2s. though, this is an all SSD system.

@benyaminl
Copy link

rngd

for me this starts all within ~2s. though, this is an all SSD system.

I can't reproduce it, it takes longer, and with "Minimal Install", it won't work. So seems it need "Basic Desktop" at least.

@gbraad
Copy link

gbraad commented Feb 18, 2021

Will test more over the weekend

@benyaminl
Copy link

Will test more over the weekend

Anyway I really thankful someone as busy as you at Red Hat put effort in this. I will keep trying. Anyway It's a great Open Source Project :).
God Bless

@gbraad
Copy link

gbraad commented Feb 18, 2021

Thanks. it ties in with the developer story... and it scratches my itch. worked a lot on Fedora before joining RH.... and I worked on the original WSL release for Fedora, but it was never released due to 'reasons'. Besides, knowing the tools we deliver in and out... and seeing how people use it (or want to use it) is important. The feedback loop in Open Source is different; both direct and indirect... if we don't engage, we never get the answers.


Note: I have a lot of great colleagues and friends. They all have contributed in some way to all of this. Some in silence, some in very different parts for different reasons... I am very thankful for all those who contribute.

@crramirez
Copy link
Contributor

Will test more over the weekend

Anyway I really thankful someone as busy as you at Red Hat put effort in this. I will keep trying. Anyway It's a great Open Source Project :).
God Bless

Me too

@gbraad
Copy link

gbraad commented Feb 28, 2021

$ dnf copr enable gbraad/genie
$ dnf install -y genie

@crramirez
Copy link
Contributor

# (source /etc/os-release && sudo dnf copr enable gbraad/genie ${ID_LIKE}-${VERSION_ID}-$(uname
 -m))
# dnf install -y genie

@gbraad
Copy link

gbraad commented Mar 2, 2021

will work with @cerebrate to get an 'official' Copr namespace for the downloads. Pretty much like the wslutilities.
Probably it will be possible to either use a distgit and/or github action to trigger the build publication; arkane-systems/genie#118
/cc: @crramirez

@filbotblue
Copy link

To start something like Podman Socket

systemctl --user start podman.sock

How would one do that without systemd/systemctl?

@crramirez
Copy link
Contributor

Try with wslsystemctl

@filbotblue
Copy link

Try with wslsystemctl

No dice.

~
> wslsystemctl --user start podman.socket
ERROR:systemctl:podman.socket: unknown socket address type (%t/podman/podman.sock)
ERROR:systemctl:unsupported run type 'exec'

@crramirez
Copy link
Contributor

I think you can start many services without Systemd but podman is not one of them.

Fedora Remix supports SystemD in Windows 10 too, use it.

@filbotblue
Copy link

I think you can start many services without Systemd but podman is not one of them.

Fedora Remix supports SystemD in Windows 10 too, use it.

Maybe my setup is not correct?

image

@filbotblue
Copy link

filbotblue commented Nov 4, 2022

However, if I run

podman system service --time 0

The socket does start, it just blocks the terminal. Still cannot connect to it, but I think that's a different thread not related to this.

@crramirez
Copy link
Contributor

Could you try the following commands?

systemctl list-unit-files | grep podman
sudo systemctl enable --now podman.socket
systemctl status podman.socket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests