herd can't connect to socket on GNU/Hurd: Connection refused

  • Open
  • quality assurance status badge
Details
2 participants
  • Akib Azmain Turja
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Akib Azmain Turja
Severity
normal
A
A
Akib Azmain Turja wrote on 8 Sep 2021 10:48
875yvb5u6f.fsf@disroot.org
I've downloaded latest QEMU image from build servers (build details:
libvirtd on my Guix System on GNU/Linux. It booted and the login shell
appeared. I logined as root without password and tried to install GNU
Hello (just to make sure everything is working). It failed due to
network problems, although my host machine was connected to the
internet. Then I tried to ping GNU server:

root@guixygnu ~# ping gnu.org

But no output appeared, not even an error message! I checked the return
status immediately:

root@guixygnu ~# echo $?
1

Then I tried ping localhost, but again it returned 1 without any output.
Then tried to see the available interfaces, but this too failed:

root@guixygnu ~# ifconfig
ifconfig: could not get list of interfaces

Then I booted again with QEMU directly with:

$ qemu-system-i386 -m 512 -snapshot -hda <path/to/image.qcow2>

Again, I face the same problem. However, this time I noticed a message
from settrans saying "settrans: /servers/socket/1: Device or resource
busy", a message saying the disk is mounted as read-only, (probably) an
error message from fsck showing it's usage, some warnings from Guile
saying "WARNING: (guile-user): imported module (guix build utils)
overrides core binding `delete'", the following messages during boot:

failed to start service: loopback
failed to start service: networking
failed to start service: ssh-daemon
failed to start service: ssh
failed to start service: sshd

Followed by an incomplete backtrace:

Backtrace:
3 (primitive-load "/gnu/store/n9glgyqlb30wjxia0zcx71x9zw9?")
In shepherd.scm:

I saw many other messages, but I didn't get the time to read and copy
it.

Then I tried to check the status of loopback service:

root@guixygnu ~# herd status loopback
error: connect: /var/run/shepherd/socket: Connection refused

Can someone help me with this issue? The QEMU image is almost unusable
without networking.

Note: all commands and their outputs are copied by hand.

--
Akib Azmain Turja

This message is signed by me with my GnuPG key. It's fingerprint is:

7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5

Get it with:

gpg --recv-keys 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5

See https://emailselfdefense.fsf.org/to learn more and protect your
emails and yourself from surveillance. Please send me encrypted
messages whenever possible.

Never send me Microsoft Office attachments, they use secret proprietary
format so I'll fail to read and trash them; send them in plain text if
possible or in formats like ODF and PDF if your document contains images
learn more.

Please don't send HTML emails, use plain text. HTML emails are usually
vulnerable, about thousand times larger than plain text and look ugly to
me. They contain trackers, so whenever someone opens a messsage he is
tracked by third-party. See http://www.asciiribbon.orgto learn more.

() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmE4ePkACgkQVTX89U2I
YWvC7w/+PCgqsYFJV1WxyX9goXaABKgBRHyr91ZJ3mdkL0fN0WkJK8fhoCikUB15
SYD//hjlso1qtiG1CVkl00CpIPlxEgi+MjZKsvyjN77Ku7XE/eds5mmXWE0asRNe
6IB81vcq+8w+h4q+SURvYcMuQNTu+OpjQ5Zi0yP1w/p1uDV0GmgmC+grAqlTUGFD
yWAglhwt4vm05eUOChjtqvNr6STolrPJo0Js8bw+eB/NGPYpz1nh6+HP4WnXgBNn
Za1AZKPsWiwTuSTheGmteL6YYO1+2utmAkaTQeYgVyQaZL+Vv8912+9Cs+400gfV
Euz9fU9VHdQAfCBoceWpH7UwyjzBmfCtnWD8lGqraH/s7eBji2f7MpWu1yXnZh4Z
+buAW3Drlpuq/th4kj1XfsCdXXAHUnqBwdQslr5f67jOQYiABfx2urgq8wZhR5j3
jcLVnZMZK69CKf7sStrd807P0V9hdghXNhUP0jKZbCQU5Yq0T/SXaqoJNhBATh+e
FUjI2AM7S6q9ujEAEO8MRSspNfCOqbFC4+59bCxSfut0pcJC6jtNpASsVvoKFgfP
87sZUVf1i2OwADpPzH90eFYufPI1Vg0pQJ6eGgTxtOAp2OH5g7IWvhWk7YI1s6vq
Hj9+U8XPmrRTdYxc5mobTFCkJg/gPRzS6+Y33nKly3kWh1uekmM=
=aWRq
-----END PGP SIGNATURE-----

R
R
Ricardo Wurmus wrote on 12 Jul 2022 20:53
(address . 50477@debbugs.gnu.org)
87h73mxir6.fsf@elephly.net
Hi,

ping not working inside qemu is a frequently encountered problem. See
also the Hurd wiki:

[…] note that ping doesn't work with QEMU's user-networking stack.


Toggle quote (3 lines)
> root@guixygnu ~# herd status loopback
> error: connect: /var/run/shepherd/socket: Connection refused

This means that shepherd isn’t running. Can you reliably reproduce
this?

As it is this bug report does not contain enough information to be
actionable as we cannot easily reproduce the problem. Could you please
provide more information? Otherwise I’d like to close it.

Thank you!

--
Ricardo
A
A
Akib Azmain Turja wrote on 13 Jul 2022 15:34
87edypyw42.fsf@disroot.org
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (9 lines)
> Hi,
>
> ping not working inside qemu is a frequently encountered problem. See
> also the Hurd wiki:
>
> […] note that ping doesn't work with QEMU's user-networking stack.
>
> https://www.gnu.org/software/hurd/hurd/running/qemu.html

Yes, it says so. But it's wrong, or the Debian's Hurd port was lying to
me. On Debian, AFAIK ping works, I can't verify it right now, since my
Debian GNU/Hurd image is corrupt. :(

Toggle quote (7 lines)
>
>> root@guixygnu ~# herd status loopback
>> error: connect: /var/run/shepherd/socket: Connection refused
>
> This means that shepherd isn’t running. Can you reliably reproduce
> this?

Yes.

Toggle quote (5 lines)
>
> As it is this bug report does not contain enough information to be
> actionable as we cannot easily reproduce the problem. Could you please
> provide more information? Otherwise I’d like to close it.

Yes, it obviously lacks many information, because I didn't have them
then. But now I have that information:

1. Get a fresh build of the disk image. I'm using
8gk0vdbvz50xc2irps4ijbjpsb2im6qk-hurd-barebones.qcow2, downloaded on
17th January 2022 (this year).

2. Boot with the following:

Toggle snippet (4 lines)
qemu-system-i386 -m 1G -hda <IMAGE> -device rtl8139,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222

3. Login as root.

4. Test shepherd, it works. Everything works.

5. Reboot with "reboot" command.

6. Login as root again.

7. Test shepherd again, it no longer works, and it won't work ever.

Toggle quote (9 lines)
>
> Thank you!
>
> --
> Ricardo
>
>
>

--
Akib Azmain Turja

This message is signed by me with my GnuPG key. It's fingerprint is:

7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmLOye0ACgkQVTX89U2I
YWukaw/+K0zpu51s1C6x/MqTC72lrws9Az7B1eW1/ogT4nF58Xj7yve47tZxZb9P
ruXEtshOxglxyoOu8IpRhCMETR0yzHzP8uB4yRmyYiF1xFtgpan1DQushdUaXv3Z
hngOcuR9XnMPvSSKEUVzMIN5sNovooLPyzSg45h2dj0GHbu3r3BeQwwYn0zoI4Kb
p38lTxF/0yr3k7JM9+Dw9d9PTAHPiSCoc20fzjUyHoqHd1XZkSMSXtnSrGO8znsc
SIvoP7X7tvyuk4R5PR2CwEKobkqF2+qQGv2fpMO5hgFqJS7v8dK3nN3dJQWJ8M2H
b1MjfYpEUqujm4Sg95U/CIyqOhBhg0NKgBugKzC1akDXYS41lt7LY2ALfzMXRU1K
gtpxEOM+jgtdWk9+M2WgPRHxbuJU7/syO0MddWW6q46ibcwa54tE80WxexemyuYD
KmPrXTZgGF5HboiWQZRuPz7a83EWnKwQwV/gFP2IhIHDSl0IywrwkQt4mq5oyq7E
Eydfe8GKOT+B98VrfpqdApYwq4kQC6qu4wbn5pokOcjIZ0zblAMnengPUkhcjCUi
rf7QMuWYYxES6pMtQaxOCWgt0Iih+llOwe0p8/lH+LqAsFOPOi2chk+EUkPpmzBC
hbKkmfV/a1SM9YWDo8KKRlzbeRr9BaLs1J1uBqeaQepbH9dD4uo=
=yk3p
-----END PGP SIGNATURE-----

?