* ssh-daemon service fails to auto start
@ 2018-01-27 22:08 Martin Castillo
2018-01-29 17:00 ` Ludovic Courtès
2018-02-06 20:01 ` Leo Famulari
0 siblings, 2 replies; 7+ messages in thread
From: Martin Castillo @ 2018-01-27 22:08 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
hey guix,
i have a problem with the ssh-service. I want it to autostart on system
boot.
my configuration is (similar to) desk,nossh.scm. sshd does start on
system boot with the no-desk,ssh-works.scm and no-desk,ssh-semi.scm
configuration, but is not reachable from outside the vm with the latter
configuration.
now, one difference between the latter two is the dhcp-client-service.
For some reason, I can not use that service with xfce-service. But I
don't know, how related that is.
Can someone with more insight tell me, why sshd won't autostart?
shepherd tells me only 'ssh-daemon could not be started'. Thank you
shepherd, very helpful!
Martin
--
GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
[-- Attachment #2: no-desk,ssh-works.scm --]
[-- Type: text/x-scheme, Size: 4066 bytes --]
;; Running in Qemu.
;; This config has no gui. ssh-daemon starts and is reachable from outside
(use-modules (gnu) (gnu system nss))
(use-service-modules ssh)
(use-service-modules networking)
(use-service-modules base desktop)
(use-service-modules xorg)
(use-package-modules wm certs linux)
(define cyborg-quirk
"Section \"InputClass\"
Identifier \"Saitek Cyborg R.A.T.5 Mouse\"
MatchIsPointer \"on\"
MatchProduct \"Saitek Cyborg R.A.T.5 Mouse\"
MatchVendor \"Saitek|SAITEK\"
MatchDevicePath \"/dev/input/event*\"
Option \"ButtonMapping\" \"1 2 3 4 5 6 7 2 9 4 5 12 0 0 0\"
Option \"ZAxisMapping\" \"10 11\"
# Option \"AutoReleaseButtons\" \"12 13 14 15\"
EndSection")
(define %my-xorg-conf
(xorg-configuration-file #:extra-config (list cyborg-quirk)))
(define %my-startx
(xorg-start-command #:configuration-file %my-xorg-conf))
(define %my-services
;; My very own list of services.
(modify-services %base-services
(guix-service-type config =>
(guix-configuration
(inherit config)
(substitute-urls (cons "https://berlin.guixsd.org"
(guix-configuration-substitute-urls config)))))
(slim-service-type config =>
(slim-configuration
(inherit config)
(startx %my-startx)
(default-user "mcd")))))
(operating-system
(host-name "komputilo")
(timezone "Europe/Berlin")
(locale "de_DE.UTF-8")
;; Assuming /dev/sdX is the target hard disk, and "my-root" is
;; the label of the target root file system.
(bootloader (bootloader-configuration (bootloader grub-bootloader)
(target "/dev/sda")
;(menu-entries '((menu-entry
; (label "Grub Nixos")
; (multiboot "(hd0)") ; still unsupported
; )))
))
(file-systems (cons (file-system
(device "muh-guix")
(title 'label)
(mount-point "/")
(type "ext4"))
%base-file-systems))
;; This is where user accounts are specified. The "root"
;; account is implicit, and is initially created with the
;; empty password.
(users (cons (user-account
(name "mcd")
(comment "Martin Castillo")
(group "users")
;; Adding the account to the "wheel" group
;; makes it a sudoer. Adding it to "audio"
;; and "video" allows the user to play sound
;; and access the webcam.
(supplementary-groups '("wheel" "audio" "video"
"netdev"))
(home-directory "/home/mcd"))
%base-user-accounts))
;; Globally-installed packages.
;(packages (cons tcpdump %base-packages))
;; Add a bunch of window managers; we can choose one at
;; the log-in screen with F1.
(packages (cons* ;dmenu ;window managers
nss-certs ;for HTTPS access
kbd-neo
%base-packages))
;; Add services to the baseline: a DHCP client and
;; an SSH server.
(services (cons* (dhcp-client-service)
(console-keymap-service (file-append kbd-neo "/share/keymaps/neo.map"));;
(service openssh-service-type
(openssh-configuration
(port-number 2222)))
(simple-service 'store-my-config etc-service-type
`(("config.scm" ,(local-file (assoc-ref
(current-source-location)
'filename)))))
; (xfce-desktop-service)
%my-services))
;; Use the "desktop" services, which include the X11
;; log-in service, networking with Wicd, and more.
;(services %desktop-services)
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
[-- Attachment #3: no-desk,ssh-semi.scm --]
[-- Type: text/x-scheme, Size: 4071 bytes --]
;; Running in Qemu.
;; This config has no gui. ssh-daemon starts, but is not reachable from outside
(use-modules (gnu) (gnu system nss))
(use-service-modules ssh)
(use-service-modules networking)
(use-service-modules base desktop)
(use-service-modules xorg)
(use-package-modules wm certs linux)
(define cyborg-quirk
"Section \"InputClass\"
Identifier \"Saitek Cyborg R.A.T.5 Mouse\"
MatchIsPointer \"on\"
MatchProduct \"Saitek Cyborg R.A.T.5 Mouse\"
MatchVendor \"Saitek|SAITEK\"
MatchDevicePath \"/dev/input/event*\"
Option \"ButtonMapping\" \"1 2 3 4 5 6 7 2 9 4 5 12 0 0 0\"
Option \"ZAxisMapping\" \"10 11\"
# Option \"AutoReleaseButtons\" \"12 13 14 15\"
EndSection")
(define %my-xorg-conf
(xorg-configuration-file #:extra-config (list cyborg-quirk)))
(define %my-startx
(xorg-start-command #:configuration-file %my-xorg-conf))
(define %my-services
;; My very own list of services.
(modify-services %base-services
(guix-service-type config =>
(guix-configuration
(inherit config)
(substitute-urls (cons "https://berlin.guixsd.org"
(guix-configuration-substitute-urls config)))))
(slim-service-type config =>
(slim-configuration
(inherit config)
(startx %my-startx)
(default-user "mcd")))))
(operating-system
(host-name "komputilo")
(timezone "Europe/Berlin")
(locale "de_DE.UTF-8")
;; Assuming /dev/sdX is the target hard disk, and "my-root" is
;; the label of the target root file system.
(bootloader (bootloader-configuration (bootloader grub-bootloader)
(target "/dev/sda")
;(menu-entries '((menu-entry
; (label "Grub Nixos")
; (multiboot "(hd0)") ; still unsupported
; )))
))
(file-systems (cons (file-system
(device "muh-guix")
(title 'label)
(mount-point "/")
(type "ext4"))
%base-file-systems))
;; This is where user accounts are specified. The "root"
;; account is implicit, and is initially created with the
;; empty password.
(users (cons (user-account
(name "mcd")
(comment "Martin Castillo")
(group "users")
;; Adding the account to the "wheel" group
;; makes it a sudoer. Adding it to "audio"
;; and "video" allows the user to play sound
;; and access the webcam.
(supplementary-groups '("wheel" "audio" "video"
"netdev"))
(home-directory "/home/mcd"))
%base-user-accounts))
;; Globally-installed packages.
;(packages (cons tcpdump %base-packages))
;; Add a bunch of window managers; we can choose one at
;; the log-in screen with F1.
(packages (cons* dmenu ;window managers
nss-certs ;for HTTPS access
kbd-neo
%base-packages))
;; Add services to the baseline: a DHCP client and
;; an SSH server.
(services (cons* ;(dhcp-client-service)
(console-keymap-service (file-append kbd-neo "/share/keymaps/neo.map"));;
(service openssh-service-type
(openssh-configuration
(port-number 2222)))
(simple-service 'store-my-config etc-service-type
`(("config.scm" ,(local-file (assoc-ref
(current-source-location)
'filename)))))
; (xfce-desktop-service)
%my-services))
;; Use the "desktop" services, which include the X11
;; log-in service, networking with Wicd, and more.
;(services %desktop-services)
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
[-- Attachment #4: desk,nossh.scm --]
[-- Type: text/x-scheme, Size: 4155 bytes --]
;; Running in Qemu.
;; This config has gui. ssh-daemon fails to start on system boot, but starts
;; with # herd start ssh-daemon
(use-modules (gnu) (gnu system nss))
(use-service-modules ssh)
(use-service-modules networking)
(use-service-modules base desktop)
(use-service-modules xorg)
(use-package-modules wm certs linux)
(define cyborg-quirk
"Section \"InputClass\"
Identifier \"Saitek Cyborg R.A.T.5 Mouse\"
MatchIsPointer \"on\"
MatchProduct \"Saitek Cyborg R.A.T.5 Mouse\"
MatchVendor \"Saitek|SAITEK\"
MatchDevicePath \"/dev/input/event*\"
Option \"ButtonMapping\" \"1 2 3 4 5 6 7 2 9 4 5 12 0 0 0\"
Option \"ZAxisMapping\" \"10 11\"
# Option \"AutoReleaseButtons\" \"12 13 14 15\"
EndSection")
(define %my-xorg-conf
(xorg-configuration-file #:extra-config (list cyborg-quirk)))
(define %my-startx
(xorg-start-command #:configuration-file %my-xorg-conf))
(define %my-services
;; My very own list of services.
; (modify-services %base-services
(modify-services %desktop-services
(guix-service-type config =>
(guix-configuration
(inherit config)
(substitute-urls (cons "https://berlin.guixsd.org"
(guix-configuration-substitute-urls config)))))
(slim-service-type config =>
(slim-configuration
(inherit config)
(startx %my-startx)
(default-user "mcd")))))
(operating-system
(host-name "komputilo")
(timezone "Europe/Berlin")
(locale "de_DE.UTF-8")
;; Assuming /dev/sdX is the target hard disk, and "my-root" is
;; the label of the target root file system.
(bootloader (bootloader-configuration (bootloader grub-bootloader)
(target "/dev/sda")
;(menu-entries '((menu-entry
; (label "Grub Nixos")
; (multiboot "(hd0)") ; still unsupported
; )))
))
(file-systems (cons (file-system
(device "muh-guix")
(title 'label)
(mount-point "/")
(type "ext4"))
%base-file-systems))
;; This is where user accounts are specified. The "root"
;; account is implicit, and is initially created with the
;; empty password.
(users (cons (user-account
(name "mcd")
(comment "Martin Castillo")
(group "users")
;; Adding the account to the "wheel" group
;; makes it a sudoer. Adding it to "audio"
;; and "video" allows the user to play sound
;; and access the webcam.
(supplementary-groups '("wheel" "audio" "video"
"netdev"))
(home-directory "/home/mcd"))
%base-user-accounts))
;; Globally-installed packages.
;(packages (cons tcpdump %base-packages))
;; Add a bunch of window managers; we can choose one at
;; the log-in screen with F1.
(packages (cons* ;dmenu ;window managers
nss-certs ;for HTTPS access
kbd-neo
%base-packages))
;; Add services to the baseline: a DHCP client and
;; an SSH server.
(services (cons* ;(dhcp-client-service)
(console-keymap-service (file-append kbd-neo "/share/keymaps/neo.map"));;
(service openssh-service-type
(openssh-configuration
(port-number 2222)))
(simple-service 'store-my-config etc-service-type
`(("config.scm" ,(local-file (assoc-ref
(current-source-location)
'filename)))))
(xfce-desktop-service)
%my-services))
; '()))
;; Use the "desktop" services, which include the X11
;; log-in service, networking with Wicd, and more.
;(services %desktop-services)
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ssh-daemon service fails to auto start
2018-01-27 22:08 ssh-daemon service fails to auto start Martin Castillo
@ 2018-01-29 17:00 ` Ludovic Courtès
2018-02-06 18:49 ` Martin Castillo
2018-02-06 20:01 ` Leo Famulari
1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2018-01-29 17:00 UTC (permalink / raw)
To: Martin Castillo; +Cc: help-guix
Hi Martin,
Martin Castillo <castilma@uni-bremen.de> skribis:
> i have a problem with the ssh-service. I want it to autostart on system
> boot.
>
> my configuration is (similar to) desk,nossh.scm.
I tried this config in ‘guix system vm’ and sshd is automatically
started on boot, as can be seen with ‘herd status ssh-daemon’ etc.
Does this config work for you in ‘guix system vm’?
> Can someone with more insight tell me, why sshd won't autostart?
> shepherd tells me only 'ssh-daemon could not be started'. Thank you
> shepherd, very helpful!
:-)
Could you check /var/log/shepherd.log? It will tell you which services,
besides sshd, failed to start.
‘ssh-daemon’ depends only on ‘syslogd’, so as long as ‘syslogd’ is
started, ‘ssh-daemon’ should start.
You can view the dependency graph of Shepherd services with:
guix system shepherd-graph config.scm | dot -Tpdf > graph.pdf
HTH!
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ssh-daemon service fails to auto start
2018-01-29 17:00 ` Ludovic Courtès
@ 2018-02-06 18:49 ` Martin Castillo
2018-02-11 9:31 ` Chris Marusich
0 siblings, 1 reply; 7+ messages in thread
From: Martin Castillo @ 2018-02-06 18:49 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: help-guix
On 29.01.2018 18:00, Ludovic Courtès wrote:
> Hi Martin,
>
> Martin Castillo <castilma@uni-bremen.de> skribis:
>
>> i have a problem with the ssh-service. I want it to autostart on system
>> boot.
>>
>> my configuration is (similar to) desk,nossh.scm.
>
> I tried this config in ‘guix system vm’ and sshd is automatically
> started on boot, as can be seen with ‘herd status ssh-daemon’ etc.
>
> Does this config work for you in ‘guix system vm’?
No.
> Could you check /var/log/shepherd.log? It will tell you which services,
> besides sshd, failed to start.
>
> ‘ssh-daemon’ depends only on ‘syslogd’, so as long as ‘syslogd’ is
> started, ‘ssh-daemon’ should start.
>
I checked /var/log/shepherd.log. Only user-homes and ssh-daemon could
not be started.
Has this maybe to do with missing randomness to create keys? (Even
though there are already server keys.)
Maybe shepherd should store the output of launched programs? Is that
really not possible? I can't be the first one to need that.
Martin
--
GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ssh-daemon service fails to auto start
2018-01-27 22:08 ssh-daemon service fails to auto start Martin Castillo
2018-01-29 17:00 ` Ludovic Courtès
@ 2018-02-06 20:01 ` Leo Famulari
2018-02-12 20:02 ` Martin Castillo
1 sibling, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2018-02-06 20:01 UTC (permalink / raw)
To: Martin Castillo; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
On Sat, Jan 27, 2018 at 11:08:23PM +0100, Martin Castillo wrote:
> my configuration is (similar to) desk,nossh.scm.
Can you share the QEMU command line you use to run desk,nossh.scm?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ssh-daemon service fails to auto start
2018-02-06 18:49 ` Martin Castillo
@ 2018-02-11 9:31 ` Chris Marusich
0 siblings, 0 replies; 7+ messages in thread
From: Chris Marusich @ 2018-02-11 9:31 UTC (permalink / raw)
To: Martin Castillo; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]
Martin Castillo <castilma@uni-bremen.de> writes:
> On 29.01.2018 18:00, Ludovic Courtès wrote:
>> Hi Martin,
>>
>> Martin Castillo <castilma@uni-bremen.de> skribis:
>>
>>> i have a problem with the ssh-service. I want it to autostart on system
>>> boot.
>>>
>>> my configuration is (similar to) desk,nossh.scm.
>>
>> I tried this config in ‘guix system vm’ and sshd is automatically
>> started on boot, as can be seen with ‘herd status ssh-daemon’ etc.
>>
>> Does this config work for you in ‘guix system vm’?
>
> No.
>
>
>> Could you check /var/log/shepherd.log? It will tell you which services,
>> besides sshd, failed to start.
>>
>> ‘ssh-daemon’ depends only on ‘syslogd’, so as long as ‘syslogd’ is
>> started, ‘ssh-daemon’ should start.
>>
>
> I checked /var/log/shepherd.log. Only user-homes and ssh-daemon could
> not be started.
>
> Has this maybe to do with missing randomness to create keys? (Even
> though there are already server keys.)
>
> Maybe shepherd should store the output of launched programs? Is that
> really not possible? I can't be the first one to need that.
>
> Martin
I have experienced this problem as well. SSH daemon fails to start, but
unfortunately Shepherd has nothing useful to say about why. If I ever
find a way to reproduce it reliably, I'll share that info.
I think multiple people have reported this problem on IRC. It can't be
a coincidence...
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ssh-daemon service fails to auto start
2018-02-06 20:01 ` Leo Famulari
@ 2018-02-12 20:02 ` Martin Castillo
2018-02-15 0:08 ` Leo Famulari
0 siblings, 1 reply; 7+ messages in thread
From: Martin Castillo @ 2018-02-12 20:02 UTC (permalink / raw)
To: Leo Famulari; +Cc: help-guix
[-- Attachment #1.1: Type: text/plain, Size: 452 bytes --]
On 06.02.2018 21:01, Leo Famulari wrote:
> On Sat, Jan 27, 2018 at 11:08:23PM +0100, Martin Castillo wrote:
>> my configuration is (similar to) desk,nossh.scm.
>
> Can you share the QEMU command line you use to run desk,nossh.scm?
>
qemu-system-x86_64 -m 2048 -smp 2 -enable-kvm \
-net nic,model=virtio \
-net user,hostfwd=tcp::5561-:2222 \
-drive file=guixsd.img
--
GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ssh-daemon service fails to auto start
2018-02-12 20:02 ` Martin Castillo
@ 2018-02-15 0:08 ` Leo Famulari
0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2018-02-15 0:08 UTC (permalink / raw)
To: Martin Castillo; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On Mon, Feb 12, 2018 at 09:02:44PM +0100, Martin Castillo wrote:
>
> On 06.02.2018 21:01, Leo Famulari wrote:
> > On Sat, Jan 27, 2018 at 11:08:23PM +0100, Martin Castillo wrote:
> >> my configuration is (similar to) desk,nossh.scm.
> >
> > Can you share the QEMU command line you use to run desk,nossh.scm?
> >
>
> qemu-system-x86_64 -m 2048 -smp 2 -enable-kvm \
> -net nic,model=virtio \
> -net user,hostfwd=tcp::5561-:2222 \
> -drive file=guixsd.img
I built desk,nossh.scm like this:
$ guix --version
guix (GNU Guix) 63298f14c9679735c6c930e10b0e836666391f01
[...]
# No grafts to save disk space while debugging. Never do that in
# production!
$ guix system vm-image ~/tmp/desk-nossh.scm --no-grafts
[...]
/gnu/store/b3drd7s1mfsnmlc9j63dz5djni9k0y3v-qemu-image
I copied the image file out of the store, made it writeable, and then
ran it with your qemu invocation from above (QEMU 2.10.2 from Guix), and
the SSHD was running after boot.
Did you do anything differently?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-02-15 0:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-27 22:08 ssh-daemon service fails to auto start Martin Castillo
2018-01-29 17:00 ` Ludovic Courtès
2018-02-06 18:49 ` Martin Castillo
2018-02-11 9:31 ` Chris Marusich
2018-02-06 20:01 ` Leo Famulari
2018-02-12 20:02 ` Martin Castillo
2018-02-15 0:08 ` Leo Famulari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).