Artix Linux Forum

Init systems => runit => Topic started by: fungalnet on 22 April 2018, 13:02:19

Title: Network problems after installing runit and removing openrc
Post by: fungalnet on 22 April 2018, 13:02:19
Personally, I've always found NetworkManager to be a giant pain that mysteriously breaks. I just use dhcpcd and the wpa_supplicant hook.

When I boot now and run ifconfig I only get lo
When I enable eth0 I only get inet6 (ipv6 dns and addressing)
When I used ifcfg eth0 add 192.168.1.1 (router's ip)
If I use the ip that is given by the router it works and inet4 begins to communicate.
I have installed dhcpd maybe I haven't been able to get the service to start and run properly yet

NetworkManager is out of the window and once I figure out how to do this it will be out of the window for my openrc artix as well.

Title: Re: Network problems after installing runit and removing openrc
Post by: konimex on 22 April 2018, 14:43:57
I remembered this is related to NetworkManager using /etc/machine-id.
Using regular dhcpcd (/etc/runit/sv/dhcpcd), I got a normal IPv4 connection.

Try the solution given here (https://wiki.artixlinux.org/Main/Troubleshooting#I.27m_having_dbus-related_problems_and_I_keep_seeing_messages_about_.2Fetc.2Fmachine-id).
Title: Re: Network problems after installing runit and removing openrc
Post by: artoo on 22 April 2018, 15:23:05

NetworkManager is out of the window and once I figure out how to do this it will be out of the window for my openrc artix as well.



https://wiki.gentoo.org/wiki/Netifrc
Title: Re: Network problems after installing runit and removing openrc
Post by: fungalnet on 23 April 2018, 11:18:44
I remembered this is related to NetworkManager using /etc/machine-id.
Using regular dhcpcd (/etc/runit/sv/dhcpcd), I got a normal IPv4 connection.

Try the solution given here (https://wiki.artixlinux.org/Main/Troubleshooting#I.27m_having_dbus-related_problems_and_I_keep_seeing_messages_about_.2Fetc.2Fmachine-id).

Code: [Select]
[artix@mack ~]$ sudo dbus-uuidgen  >| /etc/machine-id
bash: /etc/machine-id: Permission denied
[artix@mack ~]$ sudo dbus-uuidgen  >| /var/lib/dbus/machine-id
bash: /var/lib/dbus/machine-id: Permission denied

The only warning I get now on the boot screen is about lvm device not found and having to fall back lvmetad

Title: Re: Network problems after installing runit and removing openrc
Post by: fungalnet on 23 April 2018, 11:26:57
could this be a problem?  Why would a gremlins pkg be of lower number than stable?
Code: [Select]
1 galaxy-gremlins/dnscrypt-proxy-runit 20180330-1 (runit-galaxy) [installed: 20180406-1]
    runit service scripts for dnscrypt-proxy
2 galaxy/dnscrypt-proxy-runit 20180406-1 (runit-galaxy) [installed]
    runit service scripts for dnscrypt-proxy
Title: Re: Network problems after installing runit and removing openrc
Post by: fungalnet on 23 April 2018, 12:18:14
https://wiki.gentoo.org/wiki/Netifrc

Everything suggested in there I have already done and checks out ok, but network is still problematic.
Seems like a dns related problem, some sites are reachable some are not.
I have used ln -s and sv for the services dhcpd dhcpd4 dhcpd6 and they are all up

Title: Re: Network problems after installing runit and removing openrc
Post by: konimex on 23 April 2018, 14:05:12
Code: [Select]
[artix@mack ~]$ sudo dbus-uuidgen  >| /etc/machine-id
bash: /etc/machine-id: Permission denied
[artix@mack ~]$ sudo dbus-uuidgen  >| /var/lib/dbus/machine-id
bash: /var/lib/dbus/machine-id: Permission denied

The only warning I get now on the boot screen is about lvm device not found and having to fall back lvmetad



Permission is denied because you're only using sudo to generate the dbus-uuid and you're trying to pass it to /etc/machine-id directly as your own user. You need to login as root (just su and running the command again should be enough).

could this be a problem?  Why would a gremlins pkg be of lower number than stable?
Code: [Select]
1 galaxy-gremlins/dnscrypt-proxy-runit 20180330-1 (runit-galaxy) [installed: 20180406-1]
    runit service scripts for dnscrypt-proxy
2 galaxy/dnscrypt-proxy-runit 20180406-1 (runit-galaxy) [installed]
    runit service scripts for dnscrypt-proxy


Huh? Jenkins must've skipped some moves.
Package in [galaxy-gremlins] removed.
Title: Re: Network problems after installing runit and removing openrc
Post by: fungalnet on 23 April 2018, 23:02:15
https://wiki.gentoo.org/wiki/Netifrc

By the way the package itself Netifrc is not installable with runit, but the instructions on how to test stuff in the wiki are valid without netifrc.
Title: Re: Network problems after installing runit and removing openrc
Post by: fungalnet on 24 April 2018, 11:46:40
I am still facing problems, I have exhausted all possiblilities that I know and can think about.
The problem seems to be dns related and I have tried removing and installing pkgs relating to dns or resolv.conf
Some network branches do not seem to resolve correctly, for example on the mirrorlist I get the following errors:

Code: [Select]
:: Synchronizing package databases...
error: failed retrieving file 'gremlins.db' from mirror.clarkson.edu :
error: failed retrieving file 'gremlins.db' from artix.wheaton.edu :
error: failed retrieving file 'gremlins.db' from mirror.strits.dk :
error: failed retrieving file 'gremlins.db' from www.uex.dk :
error: failed retrieving file 'gremlins.db' from mirror1.artixlinux.org :
 gremlins is up to date                 0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'system.db' from mirror.clarkson.edu :
error: failed retrieving file 'system.db' from artix.wheaton.edu :
error: failed retrieving file 'system.db' from mirror.strits.dk :
error: failed retrieving file 'system.db' from www.uex.dk :
error: failed retrieving file 'system.db' from mirror1.artixlinux.org :
 system is up to date                   0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'world.db' from mirror.clarkson.edu :
error: failed retrieving file 'world.db' from artix.wheaton.edu :
error: failed retrieving file 'world.db' from mirror.strits.dk :
error: failed retrieving file 'world.db' from www.uex.dk :
error: failed retrieving file 'world.db' from mirror1.artixlinux.org :
 world is up to date                    0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'galaxy-gremlins.db' from mirror.clarkson.edu :
error: failed retrieving file 'galaxy-gremlins.db' from artix.wheaton.edu :
error: failed retrieving file 'galaxy-gremlins.db' from mirror.strits.dk :
error: failed retrieving file 'galaxy-gremlins.db' from www.uex.dk :
error: failed retrieving file 'galaxy-gremlins.db' from mirror1.artixlinux.org :
 galaxy-gremlins is up to date          0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'galaxy.db' from mirror.clarkson.edu :
error: failed retrieving file 'galaxy.db' from artix.wheaton.edu :
error: failed retrieving file 'galaxy.db' from mirror.strits.dk :
error: failed retrieving file 'galaxy.db' from www.uex.dk :
error: failed retrieving file 'galaxy.db' from mirror1.artixlinux.org :
 galaxy is up to date                   0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'extra.db' from archlinux.beccacervello.it :
error: failed retrieving file 'extra.db' from archlinux.mirror.pkern.at :
error: failed retrieving file 'extra.db' from mirrors.uni-plovdiv.net :
 extra is up to date
error: failed retrieving file 'community-testing.db' from archlinux.beccacervello.it :
error: failed retrieving file 'community-testing.db' from archlinux.mirror.pkern.at :
error: failed retrieving file 'community-testing.db' from mirrors.uni-plovdiv.net :
 community-testing is up to date
error: failed retrieving file 'community.db' from archlinux.beccacervello.it :
error: failed retrieving file 'community.db' from archlinux.mirror.pkern.at :
error: failed retrieving file 'community.db' from mirrors.uni-plovdiv.net :
 community is up to date

I have by shifting the ones that work to the bottom effectively created the list that has problems, I can just switch the order making the one that works on top and get no errors, but that is not the issue.  It doesn't have to do with http or https, I get good hits and bad ones with both.
Browsing some sites is the same, more than half I have no access to.  My resolve.conf was custom made, I reverted to the isp's/router's standard and there is no difference.  So the issue is internal.  On the same machine all other installations including artix-openrc do not have any problems.
Title: Re: Network problems after installing runit and removing openrc
Post by: konimex on 24 April 2018, 13:11:26
I am still facing problems, I have exhausted all possiblilities that I know and can think about.
The problem seems to be dns related and I have tried removing and installing pkgs relating to dns or resolv.conf
Some network branches do not seem to resolve correctly, for example on the mirrorlist I get the following errors:

Code: [Select]
:: Synchronizing package databases...
error: failed retrieving file 'gremlins.db' from mirror.clarkson.edu :
error: failed retrieving file 'gremlins.db' from artix.wheaton.edu :
error: failed retrieving file 'gremlins.db' from mirror.strits.dk :
error: failed retrieving file 'gremlins.db' from www.uex.dk :
error: failed retrieving file 'gremlins.db' from mirror1.artixlinux.org :
 gremlins is up to date                 0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'system.db' from mirror.clarkson.edu :
error: failed retrieving file 'system.db' from artix.wheaton.edu :
error: failed retrieving file 'system.db' from mirror.strits.dk :
error: failed retrieving file 'system.db' from www.uex.dk :
error: failed retrieving file 'system.db' from mirror1.artixlinux.org :
 system is up to date                   0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'world.db' from mirror.clarkson.edu :
error: failed retrieving file 'world.db' from artix.wheaton.edu :
error: failed retrieving file 'world.db' from mirror.strits.dk :
error: failed retrieving file 'world.db' from www.uex.dk :
error: failed retrieving file 'world.db' from mirror1.artixlinux.org :
 world is up to date                    0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'galaxy-gremlins.db' from mirror.clarkson.edu :
error: failed retrieving file 'galaxy-gremlins.db' from artix.wheaton.edu :
error: failed retrieving file 'galaxy-gremlins.db' from mirror.strits.dk :
error: failed retrieving file 'galaxy-gremlins.db' from www.uex.dk :
error: failed retrieving file 'galaxy-gremlins.db' from mirror1.artixlinux.org :
 galaxy-gremlins is up to date          0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'galaxy.db' from mirror.clarkson.edu :
error: failed retrieving file 'galaxy.db' from artix.wheaton.edu :
error: failed retrieving file 'galaxy.db' from mirror.strits.dk :
error: failed retrieving file 'galaxy.db' from www.uex.dk :
error: failed retrieving file 'galaxy.db' from mirror1.artixlinux.org :
 galaxy is up to date                   0.0   B  0.00B/s 00:00 [----------------------------------]   0%
error: failed retrieving file 'extra.db' from archlinux.beccacervello.it :
error: failed retrieving file 'extra.db' from archlinux.mirror.pkern.at :
error: failed retrieving file 'extra.db' from mirrors.uni-plovdiv.net :
 extra is up to date
error: failed retrieving file 'community-testing.db' from archlinux.beccacervello.it :
error: failed retrieving file 'community-testing.db' from archlinux.mirror.pkern.at :
error: failed retrieving file 'community-testing.db' from mirrors.uni-plovdiv.net :
 community-testing is up to date
error: failed retrieving file 'community.db' from archlinux.beccacervello.it :
error: failed retrieving file 'community.db' from archlinux.mirror.pkern.at :
error: failed retrieving file 'community.db' from mirrors.uni-plovdiv.net :
 community is up to date

I have by shifting the ones that work to the bottom effectively created the list that has problems, I can just switch the order making the one that works on top and get no errors, but that is not the issue.  It doesn't have to do with http or https, I get good hits and bad ones with both.
Browsing some sites is the same, more than half I have no access to.  My resolve.conf was custom made, I reverted to the isp's/router's standard and there is no difference.  So the issue is internal.  On the same machine all other installations including artix-openrc do not have any problems.


1. Have you generated /etc/machine-id? I've got no response from you after this post (https://forum.artixlinux.org/index.php/topic,516.msg4050.html#msg4050) aside from.. a like.
2. Have you enabled the dbus service for runit?
3. Have you tried wicd/connman?

I can reproduce this with NetworkManager, but this was caused by an empty/invalid /etc/machine-id.
Title: Re: Network problems after installing runit and removing openrc
Post by: fungalnet on 24 April 2018, 16:10:07
1  yes no difference
2 yes  dbus-daemon and dbus-launch are running
3 neither seem to help but while trying to get this to work I got this error

Code: [Select]
connman-gtk

(connman-gtk:16164): Gtk-WARNING **: 18:06:24.450: Locale not supported by C library.
Using the fallback 'C' locale.

** (connman-gtk:16164): ERROR **: 18:06:24.499: failed to connect to system dbus: Could not connect: No such file or directory
Trace/breakpoint trap
Title: Re: Network problems after installing runit and removing openrc
Post by: fungalnet on 24 April 2018, 16:40:46
out of frustration I did something wild (as in wildcard)

Code: [Select]
$ sudo ln -s /etc/runit/sv/* /run/runit/service/

The problem went away, let's see what happens at reboot!
Well it seems as there were some that are problematic, like the ttys beyond 1-6
and a few other things.  Now I am going backwards, disabling services till I get to the one that was causing the problem

Would you recommend such practice to anyone having problems?

Is this normal or is there an error?
Code: [Select]
$ ls  /run/runit/service/dbus
 /run/runit/service/dbus -> /etc/runit/dbus
$  sv status dbus
fail: dbus: unable to change to service directory: file does not exist

Title: Re: Network problems after installing runit and removing openrc
Post by: Dudemanguy on 24 April 2018, 17:35:04
The symlink working seems to imply to me that for whatever reason the original symlink you did for enabling the service didn't work properly. Perhaps you typo'd the directory name somewhere and didn't realize it?
Title: Re: Network problems after installing runit and removing openrc
Post by: fungalnet on 24 April 2018, 17:53:06
Ok, but now, if there was a typing error, I have too many services linked
Why isn't sv status working or producing an error, like dbus which is essential, but for many services it doesn't work
Title: Re: Network problems after installing runit and removing openrc
Post by: Dudemanguy on 24 April 2018, 19:35:01
What exactly is sv status returning for you? It should at least tell you if something is running or not. For example, something like this.

Code: [Select]
# sv status dbus  
run: dbus: (pid 648) 332775s
Title: Re: Network problems after installing runit and removing openrc
Post by: fungalnet on 24 April 2018, 22:14:06
Is this normal or is there an error?
Code: [Select]
$  sv status dbus
fail: dbus: unable to change to service directory: file does not exist

That's what I get for a bunch of services. 
Title: Re: Network problems after installing runit and removing openrc
Post by: Dudemanguy on 24 April 2018, 22:47:39
Yeah based on that, I would just assume that symlink messed everything up. I would suggest deleting everything in the /run/runit/service directory and then force reinstalling (i.e. using the --force flag) every single runit package you need (runit, runit-artix, dhcpcd-runit, dbus-runit, etc.). Then try the proper symlink again. So for getting internet:
Code: [Select]
# ln -s /etc/runit/sv/dhcpcd /run/runit/service

That should work just fine unless you had some really strange configuration that NetworkManger handled for you. I'm assuming you're just running a standard ethernet cable though. In that case, dhcpcd is all you need.
Title: Re: Network problems after installing runit and removing openrc
Post by: konimex on 24 April 2018, 23:13:05
That's what I get for a bunch of services. 
Yeah based on that, I would just assume that symlink messed everything up. I would suggest deleting everything in the /run/runit/service directory and then force reinstalling (i.e. using the --force flag) every single runit package you need (runit, runit-artix, dhcpcd-runit, dbus-runit, etc.). Then try the proper symlink again. So for getting internet:
Code: [Select]
# ln -s /etc/runit/sv/dhcpcd /run/runit/service

That should work just fine unless you had some really strange configuration that NetworkManger handled for you. I'm assuming you're just running a standard ethernet cable though. In that case, dhcpcd is all you need.

I don't think the symlink messed up.

If all services are symlinked, check it with pstree to see if a runsv process is running.

I simply think that @fungalnet uses

Code: [Select]
$ sv status dbus

instead of

Code: [Select]
 # sv status dbus

But seeing that the return result is not found, that suggests that the dbus service is not enabled yet.

However, just deleting everything in /run/runit/service is not wise since it will delete everything, including agetty. Which means "goodbye, usable system".

Instead, see the contents of /run/runit/service, and delete any unnecessary service.
Title: Re: Network problems after installing runit and removing openrc
Post by: Dudemanguy on 25 April 2018, 00:29:15
I don't think the symlink messed up.

If all services are symlinked, check it with pstree to see if a runsv process is running.

I simply think that @fungalnet uses

Code: [Select]
$ sv status dbus

instead of

Code: [Select]
 # sv status dbus

But seeing that the return result is not found, that suggests that the dbus service is not enabled yet.

However, just deleting everything in /run/runit/service is not wise since it will delete everything, including agetty. Which means "goodbye, usable system".

Instead, see the contents of /run/runit/service, and delete any unnecessary service.

If it was just a permission error, it would have said "access denied" or something like that. That's the error message you get if you try to check a service that does not exist. I'm pretty sure something is just wrong with his symlinks since the directory is not being found. But you are right in pointing out my bad wording. I shouldn't have said delete everything in /run/runit/service. I should have said delete unwanted/not working services. Thanks for that.