[SOLVED] systemd and ntpd.service

I've just converted to pure systemd according to the wiki. Everything went remarkably well, with just a little blemish. While I'm not notified of any error at startup, when I check systemctl I find that ntpd.service's LOAD/ACTIVE/SUB is loaded/failed/failed.
systemctl status ntpd.service gives me this:
ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
Active: failed (Result: exit-code) since Thu, 18 Oct 2012 04:16:56 +0200; 6s ago
Process: 1397 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
Main PID: 1398 (code=exited, status=255)
CGroup: name=systemd:/system/ntpd.service
Oct 18 04:16:56 mike ntpd[1398]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Oct 18 04:16:56 mike ntpd[1398]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Oct 18 04:16:56 mike ntpd[1398]: Listen and drop on 1 v6wildcard :: UDP 123
Oct 18 04:16:56 mike ntpd[1398]: Listen normally on 2 lo 127.0.0.1 UDP 123
Oct 18 04:16:56 mike ntpd[1398]: Listen normally on 3 eth0 192.168.0.2 UDP 123
Oct 18 04:16:56 mike ntpd[1398]: Listen normally on 4 lo ::1 UDP 123
Oct 18 04:16:56 mike ntpd[1398]: Listen normally on 5 eth0 fe80::224:1dff:fec4:aebe UDP 123
Oct 18 04:16:56 mike ntpd[1398]: peers refreshed
Oct 18 04:16:56 mike ntpd[1398]: Listening on routing socket on fd #22 for interface updates
Oct 18 04:16:56 mike systemd[1]: Started Network Time Service.
and journalctl pretty much more of the same:
Oct 18 04:16:56 mike ntpd[1397]: ntpd [email protected] Tue Aug 21 15:06:24 UTC 2012 (1)
Oct 18 04:16:56 mike ntpd[1398]: proto: precision = 0.106 usec
Oct 18 04:16:56 mike ntpd[1398]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Oct 18 04:16:56 mike ntpd[1398]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Oct 18 04:16:56 mike sudo[1394]: pam_unix(sudo:session): session closed for user root
Oct 18 04:16:56 mike ntpd[1398]: Listen and drop on 1 v6wildcard :: UDP 123
Oct 18 04:16:56 mike ntpd[1398]: Listen normally on 2 lo 127.0.0.1 UDP 123
Oct 18 04:16:56 mike ntpd[1398]: Listen normally on 3 eth0 192.168.0.2 UDP 123
Oct 18 04:16:56 mike ntpd[1398]: Listen normally on 4 lo ::1 UDP 123
Oct 18 04:16:56 mike ntpd[1398]: Listen normally on 5 eth0 fe80::224:1dff:fec4:aebe UDP 123
Oct 18 04:16:56 mike ntpd[1398]: peers refreshed
Oct 18 04:16:56 mike ntpd[1398]: Listening on routing socket on fd #22 for interface updates
Oct 18 04:16:56 mike systemd[1]: Started Network Time Service.
Oct 18 04:16:56 mike systemd[1]: ntpd.service: main process exited, code=exited, status=255
Oct 18 04:16:56 mike systemd[1]: Unit ntpd.service entered failed state.
Trying to use it manually (eg. ntpd -qg) works, so I'm not sure what's wrong with it exactly. Where else should I look?
Last edited by Mr_Mario (2012-12-06 11:29:57)

slickvguy wrote:I've just started converting to systemd and ran into the same issue. I believe the problem is that you are missing the ntp group from your group file. If you updated your system and merely renamed your group.pacnew to group, it no longer contains the ntp group that was previously added. I just added the ntp group again ( ntp:x:87: ), and ntp started properly and the status is correct. Hope this helps.
That was it. Thank you!

Similar Messages

  • [SOLVED]Systemd and Crashplan service failed.

    Hello,
    Crashplan service won't start.
    systemctl status crashplan.service
    crashplan.service - CrashPlan Backup Engine
    Loaded: loaded (/usr/lib/systemd/system/crashplan.service; enabled)
    Active: failed (Result: exit-code) since Wed, 17 Oct 2012 11:21:39 -0600; 1h 11min ago
    Process: 922 ExecStop=/opt/crashplan/bin/CrashPlanEngine stop (code=exited, status=0/SUCCESS)
    Process: 527 ExecStart=/opt/crashplan/bin/CrashPlanEngine start (code=exited, status=0/SUCCESS)
    Main PID: 920 (code=exited, status=127)
    CGroup: name=systemd:/system/crashplan.service
    Oct 17 11:21:29 arch CrashPlanEngine[527]: Starting CrashPlan Engine ... Using standard startup
    Oct 17 11:21:29 arch CrashPlanEngine[527]: OK
    Oct 17 11:21:29 arch systemd[1]: Started CrashPlan Backup Engine.
    Oct 17 11:21:29 arch CrashPlanEngine[922]: Stopping CrashPlan Engine ... /opt/crashplan/bin/CrashPlanEngine: line 144: kill: (920) - No such process
    Oct 17 11:21:39 arch CrashPlanEngine[922]: OK
    Please let me know what information can I provide to sort out this issue.
    Thanks.
    Last edited by donniezazen (2012-10-18 07:04:11)

    /usr/lib/systemd/system/crashplan.service
    [Unit]
    Description=CrashPlan Backup Engine
    After=network.target
    [Service]
    Type=forking
    PIDFile=/opt/crashplan/CrashPlanEngine.pid
    EnvironmentFile=/opt/crashplan/bin/run.conf
    WorkingDirectory=/opt/crashplan
    ExecStart=/opt/crashplan/bin/CrashPlanEngine start
    ExecStop=/opt/crashplan/bin/CrashPlanEngine stop
    [Install]
    WantedBy=multi-user.target

  • Systemd and various services [SOLVED]

    Is there a place here is the forums or somewhere else that I can find information about starting services with systemd?
    So far Google is as empty handed as I am
    I have systemd running just fine, but aside from some of the directions to start apache and a few other services I see
    no instructions on how to create/run other "custom" services.
    The explanation in the wiki on this topic are rather succinct and I find myself having to start services like iptables with (systemctl start iptables)
    that is OK but I should be able to use: systemctl enable iptables.service.
    I have copied the httpd.service file and modified it to run iptables but so far it's a no go.
    So if there are other instructions available somewhere else I'll be glad to hear from it.
    Thanks.
    R,.
    Last edited by ralvez (2012-09-06 23:39:49)

    You have to issue "systemctl daemon-reload" before you can enable a service, IIRC.
    Out of curiosity: Why do you use the rc.d scripts in the service file? That seems like a bit of a roundabout way to me. In case you've missed it (I know I've missed these things often enough), the iptables packages ships its own service file in /usr/lib/systemd/system/iptables.service:
    [Unit]
    Description=Packet Filtering Framework
    [Service]
    Type=oneshot
    ExecStart=/usr/sbin/iptables-restore /etc/iptables/iptables.rules
    ExecStop=/usr/lib/systemd/scripts/iptables-flush
    RemainAfterExit=yes
    [Install]
    WantedBy=multi-user.target
    I'm just mentioning it because I remember that Type=forking should be the last ExecType to try. Systemd works best if the programs started by services are just simple processes that don't involve any forking at all.
    Edit: I should probably mentioned where I read that. Systemd actually has its own entry on the freedesktop.org wiki—with links to some impressive amounts of documentation. I find it hard to believe you haven't stumpled upon it in your search for documentation.
    Edit2: Crond (which, if you use the one from the repos, is actually cronie) has its own service file too—/usr/lib/systemd/system/crond.service (or, more directly, cronie.service).
    Last edited by Runiq (2012-09-01 17:39:27)

  • [SOLVED]systemd and make a camera visible GUI-wise in your filemanager

    After reading a lot about systemd in the wiki and in this forum I understand there are different opionons about systemd. Anyway, I have a adapted all the changes to rc.conf leaving out only a few daemons to start there. So why not give systemd a try? If you dont want to read the full posting I finally got it to work, basically by reading carefully and checking the suggested tests in the systemd wiki. (loginctl)
    As suggested by the wiki, I tried the systemd yesterday. Enabled via systemctl some services to "replace" my rc.conf daemons. I got what I thought everything to work, including autologin directly to my Xfce4 desktop. Everything except the digital camera.
    When starting Arch traditionally via initscripts I immediately can see the camera in the filemanager (Nautilus) when the camera is attached via USB.
    Some minutes later, after adding "init=/usr/lib/systemd/systemd" to the APPEND line in Syslinux and rebooting, my machine reboots
    fine.But when connecting the camera again it is not visible graphically.
    The camera is there because when using gphoto2 (the commandline) as root I can transfer pictures etc.
    Even if I am no happy CLI user I can handle it when necessary. Handling pictures a graphical view of them is much easier...
    As the wiki about systemd says one can try it out. I have not removed anything from the system and when starting Arch again, the initscript way, I can see the camera again in my filemanager, gthumb works again and pictures can be transferred to my machine.
    In the wiki again, this time about digital cameras
    Permission issues
    Camera devices should be granted permission using ACLs. For this to work, users need to have consolekit or systemd running and the user session must be registered with them accordingly.
    Check this using /usr/bin/ck-list-sessions to verify a value of "TRUE" should be returned for both the "active" and "is-local" fields:
    $ ck-list-sessions | grep TRUE
    active = TRUE
    is-local = TRUE
    ACL=Atlantic Container Line is what first comes into my mind. I have had some connections to transport business...I admit I had to google it to find the correct interpretation of this mumbo-jumbo.
    The wiki also gives a "hint", if this is not working try to use the obsolete camera group and edit some udev rules.
    Should not be necessary when it has worked before systemd and earlier experiences
    But what is this about "Permission issues"?  Here is my listings relative the wiki hints. All seems OK.. or why the heck are there two sessions??
    [leif@krasaki ~]$ ck-list-sessions | grep TRUE
    is-local = TRUE
    active = TRUE
    is-local = TRUE
    [leif@krasaki ~]$ ck-list-sessions
    Session1:
    unix-user = '1000'
    realname = '(null)'
    seat = 'Seat1'
    session-type = ''
    active = FALSE
    x11-display = ''
    x11-display-device = ''
    display-device = '/dev/tty1'
    remote-host-name = ''
    is-local = TRUE
    on-since = '2012-10-24T07:12:56.499847Z'
    login-session-id = '1'
    idle-since-hint = '2012-10-24T07:13:26.994037Z'
    Session2:
    unix-user = '1000'
    realname = '(null)'
    seat = 'Seat1'
    session-type = ''
    active = TRUE
    x11-display = ':0'
    x11-display-device = '/dev/tty7'
    display-device = '/dev/tty1'
    remote-host-name = ''
    is-local = TRUE
    on-since = '2012-10-24T07:13:02.361157Z'
    login-session-id = '1'
    [leif@krasaki ~]$
    As one can see, the ACTIVE values are here as the wiki says. But no camera. Those values are the same, wheter which way the machine is started. But 2 sessions??
    Further reading in the systemd wiki article and consolekit vs systemd.logind gives a clue.
    From the wiki:
    In order to check the status of your user session, you can use loginctl. To see if your user session is properly set up, check if the following command contains Active=yes. All polkit actions like suspending the system or mounting external drives with Udisks should then work automatically.
    So when started via systemd and running logintctl, it gives this surprising result. Does not matter wheter as normal user, nor as root....
    [leif@krasaki ~]$ loginctl
    SESSION UID USER SEAT
    1 1000 leif seat0
    1 sessions listed.
    [leif@krasaki ~]$ loginctl show-session 1
    Id=1
    Timestamp=Wed, 24 Oct 2012 10:57:03 +0200
    TimestampMonotonic=20040019
    DefaultControlGroup=name=systemd:/user/leif/1
    VTNr=1
    TTY=tty1
    Remote=no
    Service=login
    Leader=315
    Audit=1
    Type=tty
    Class=user
    Active=no
    State=online
    KillProcesses=no
    IdleHint=yes
    IdleSinceHint=1351069009642296
    IdleSinceHintMonotonic=6664433
    Name=leif
    [leif@krasaki ~]$
    Surprising? Should it not have been Active=Yes? So something is wrong in my settings although it had worked "before" starting using systemd..
    OK, so far. Lost? Not yet. Double check again everything and I found the culprit, my  ~/.bash_profile which had worked before seemed a bit different to what is suggested in the wiki. The old one, actually started 2 sessions, as also could be seen here above checking ck-list-sessions. That was the problem
    Using a fresh edited ~/.bash_profile as suggested here, the camera is visible graphically
    Finally, just for fun, start again the old initscipt way. Enabling daemon and so on. Still 2 sessions going on....Here it was the "/.xinitrc, which also had some old fashions and I removed the ck-launch-session from the exec line. So even here, now only 1 session..
    Anyway, now the camera is visible, both starting with initscripts, naturally also some daemons active in rc.conf and by starting with systemd.
    I rest my case and it seems systemd works with everything on my machine which is just a normal desktop used by an old man.
    Thanks for reading...

    Solved now! Boot times are as fast as posssible on my HDD I think. Only thing after uninstalling initscripst and initscripts-systemd was that locale was not set inspite of a correct /etc/locale.conf. I had to make /etc/profile.d/locale.sh with this content;
    if [ -s /etc/locale.conf ]; then
    . /etc/locale.conf
    fi
    export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE
    export LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS
    export LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION

  • [SOLVED]systemd-tmpfiles-setup.service failure

    Hi guys,
    I just reinstalled arch with the following partitions:
    [root@arch_vinnom vinnom]# gdisk -l /dev/sda
    GPT fdisk (gdisk) version 1.0.0
    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 625142448 sectors, 298.1 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): BD3CA679-FA08-4F60-9BAD-B845DE9FF7EB
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 625142414
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 2014 sectors (1007.0 KiB)
    Number Start (sector) End (sector) Size Code Name
    1 2048 4095 1024.0 KiB EF02 BIOS
    2 4096 52432895 25.0 GiB 8300 ROOT
    3 52432896 53481471 512.0 MiB 8300 BOOT
    4 53481472 74452991 10.0 GiB 8300 TMP
    5 74452992 95424511 10.0 GiB 8300 VAR
    6 95424512 602935295 242.0 GiB 8300 HOME
    7 602935296 625142414 10.6 GiB 8200 SWAP
    The problem is that tmpfs is mounted at '/tmp' through '/usr/lib/systemd/system/tmp.mount'
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    [Unit]
    Description=Temporary Directory
    Documentation=man:hier(7)
    Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
    ConditionPathIsSymbolicLink=!/tmp
    DefaultDependencies=no
    Conflicts=umount.target
    Before=local-fs.target umount.target
    [Mount]
    What=tmpfs
    Where=/tmp
    Type=tmpfs
    Options=mode=1777,strictatime
    Because of this, I'm always getting:
    ● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
    Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
    Active: failed (Result: exit-code) since Dom 2015-05-03 03:29:58 BRT; 27min ago
    Docs: man:tmpfiles.d(5)
    man:systemd-tmpfiles(8)
    Process: 278 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=1/FAILURE)
    Main PID: 278 (code=exited, status=1/FAILURE)
    Then I tried to change '/tmp' to '/run/tmpfs', folder that I created for this, using tmpfs wiki as reference.
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    [Unit]
    Description=Temporary Directory
    Documentation=man:hier(7)
    Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
    ConditionPathIsSymbolicLink=!/run/tmpfs
    DefaultDependencies=no
    Conflicts=umount.target
    Before=local-fs.target umount.target
    [Mount]
    What=tmpfs
    Where=/run/tmpfs
    Type=tmpfs
    Options=mode=1777,strictatime,nodev,nosuid,size=1536M
    But the error persists. What I'm missing?
    Last edited by vinnom (2015-05-03 16:51:38)

    ooo wrote:Couldn't you just mask the tmp.mount service? (as mentioned in the wiki page you linked)
    Then your /tmp partition would be mounted according to your fstab
    Raynman wrote:
    The tmp.mount generated from your fstab should override the tmp.mount in /usr/lib/systemd/system. You say
    The problem is that tmpfs is mounted at '/tmp' through '/usr/lib/systemd/system/tmp.mount'
    If that is true (could you show output of mount and your fstab?) that is worth investigating.
    However, your original problem seems to be that systemd-tmpfiles-setup.service fails. If something is wrong with your mounts, that could be related, but it might very well be something else. Is there any more information in the journal to indicate why the service fails (maybe even mentioning a tmpfiles.d config file that is responsible)? Did you create any config files for tmpfiles.d yourself?
    Sorry guys, I tried to be concise, but ended up that I didn't make myself clear.
    My '/tmp' is mounting fine as it takes priority over systemd. In fact, what I wanted to say is that '/tmp' mounts fine, systemd tried to mount tmpfs at '/tmp' and fails and I want to point tmpfs to mount at '/run/tmpfs' which I created for this, but just editing '/usr/lib/systemd/system/tmp.mount' didn't solve.
    As for journalctl, it repeats several times this message:
    Mai 02 22:43:32 arch_vinnom systemd[1]: systemd-tmpfiles-setup.service: main process exited, code=exited, status=1/FAILURE
    Mai 02 22:43:32 arch_vinnom systemd[1]: Failed to start Create Volatile Files and Directories.
    Mai 02 22:43:32 arch_vinnom systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.
    Mai 02 22:43:32 arch_vinnom systemd[1]: systemd-tmpfiles-setup.service failed.
    foutrelis wrote:
    Depending on how your '/var' file system is created/mounted, you might need to enable ACL on it:
    https://wiki.archlinux.org/index.php/Sy … rt_at_boot
    hmm
    I created my /var during arch installation, with mkfs.reiserfs.
    Using
    tune2fs -l /dev/sdXY | grep "Default mount options:"
    To check if acl was already enabled, I got:
    [root@arch_vinnom vinnom]# tune2fs -l /dev/sda5 | grep "Default mount options:"
    tune2fs: Bad magic number in super-block while trying to open /dev/sda5
    Couldn't find valid filesystem superblock.
    Then I searched a bit and noted that reiserfs isn't compatible with acl =/
    Last edited by vinnom (2015-05-03 15:12:18)

  • [SOLVED] systemd uses cronie.service in /usr/lib instead of /etc

    I've been having a little problem getting systemd to use my custom service file for cronie. I've tried doing the same thing with ntpd and a few other services, and they all work fine.
    [root@garrett garrett]# cp /{usr/lib,etc}/systemd/system/cronie.service
    [root@garrett garrett]# systemctl reenable cronie.service
    rm '/etc/systemd/system/multi-user.target.wants/cronie.service'
    ln -s '/etc/systemd/system/cronie.service' '/etc/systemd/system/multi-user.target.wants/cronie.service'
    [root@garrett garrett]# systemctl status cronie.service
    cronie.service - Periodic Command Scheduler
    Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled)
    Active: inactive (dead)
    CGroup: name=systemd:/system/cronie.service
    Sep 13 21:32:52 garrett /usr/sbin/crond[622]: (CRON) INFO (running with inotify support)
    It appears to have something to do with the crond.service symlink to cronie.service, since when I remove it, systemd will use the service file in /etc.
    [root@garrett garrett]# rm /usr/lib/systemd/system/crond.service
    [root@garrett garrett]# cp /{usr/lib,etc}/systemd/system/cronie.service
    [root@garrett garrett]# systemctl reenable cronie.service
    rm '/etc/systemd/system/multi-user.target.wants/cronie.service'
    ln -s '/etc/systemd/system/cronie.service' '/etc/systemd/system/multi-user.target.wants/cronie.service'
    [root@garrett garrett]# systemctl status cronie.service
    cronie.service - Periodic Command Scheduler
    Loaded: loaded (/etc/systemd/system/cronie.service; enabled)
    Active: inactive (dead)
    CGroup: name=systemd:/system/cronie.service
    Sep 13 21:32:52 garrett /usr/sbin/crond[622]: (CRON) INFO (running with inotify support)
    However, these symlinks don't cause problems in other packages such as with cups.service, which has a symlink cupsd.service. I also tried the same commands above on another arch computer I have that is running systemd and encountered the same results. This just seems really strange, and I'm not exactly sure where to go from here. Any help would be greatly appreciated.
    Last edited by Floft (2012-09-14 06:40:23)

    I can not replicate on my system.
    # find {/usr/lib,/etc}/systemd/system/ -name "*cron*" -ls
    803795 4 -rw-r--r-- 1 root root 174 Aug 8 22:24 /usr/lib/systemd/system/cronie.service
    803798 0 lrwxrwxrwx 1 root root 14 Aug 8 22:24 /usr/lib/systemd/system/crond.service -> cronie.service
    793796 4 -rw-r--r-- 1 root root 174 Sep 14 03:01 /etc/systemd/system/cronie.service
    932745 0 lrwxrwxrwx 1 root root 34 Sep 14 03:01 /etc/systemd/system/multi-user.target.wants/cronie.service -> /etc/systemd/system/cronie.service
    # systemctl status cronie
    cronie.service - Periodic Command Scheduler
    Loaded: loaded (/etc/systemd/system/cronie.service; enabled)
    Active: active (running) since Fri, 14 Sep 2012 03:06:05 -0300; 1s ago
    Main PID: 13956 (crond)
    CGroup: name=systemd:/system/cronie.service
    └ 13956 /usr/sbin/crond -n

  • [SOLVED] systemd and blacklisting modules

    Hi,
    I recently found out about the 'systemctl status foo.service'-cmd and I was finally able to see why the systemd-modules-load-service was failing on my laptop.
    It complains it cannot find service-files for 'blacklist nouveau' and other modules I have blacklisted. The wiki mentions blacklisting is done the same for systemd as for sysV-init, i.e. through a simple 'blacklist <modulename>' inside a .conf-file residing in either:
    /etc/modprobe.d/ or
    /etc/modules-load.d/
    What am I doing wrong?
    Last edited by zenlord (2012-08-24 19:38:38)

    tomegun wrote:The .conf file must be in /etc/modprobe.d and not in /etc/modules-load.d.
    OK, that's the one. I was mistaken to think that both directories had the same functionality.
    THX!
    Marking as solved.
    Last edited by zenlord (2012-08-24 19:38:11)

  • [solved] systemd and tftpd

    [edited for additional question clarity]
    [edited again showing result of running in.tftpd manually]
    I have a recently installed systemd based machine with 2 NICs. One faces the LAN and runs dhcpcd, the other faces a local isolated subnet and runs dhcpd and tftpd.
    Everything was working until an update early this week (including the new 3.6.9 kernel) caused the eth0 and eth1 to swap places.
    I tried a udev rule to assign the eth0 and eth1, but it didn't seem to work.
    Subsequently, I just renemaed the eth0 and eth1 in the dhcpd.service file and the /etc/conf.d/network file referenced by the network.service file.
    Now dhcpd4 seems to be working, but tftpd is continuing to fail to start with the error:
    Dec 12 09:36:57 beezey in.tftpd[1386]: cannot bind to local IPv4 socket: Address already in use
    Dec 12 09:36:57 beezey systemd[1]: tftpd.service: main process exited, code=exited, status=71/n/a
    Dec 12 09:36:57 beezey systemd[1]: Unit tftpd.service entered failed state
    The tftpd.service file:
    [root@beezey johnea]# cat /etc/systemd/system/tftpd.service
    [Unit]
    Description=hpa's original TFTP daemon
    [Service]
    ExecStart=/usr/sbin/in.tftpd -l -4 -s /srv/tftp/
    StandardInput=socket
    StandardOutput=inherit
    StandardError=journal
    [Install]
    WantedBy=multi-user.target
    I've used the network.service file indicated here:
    https://wiki.archlinux.org/index.php/Co … IP_address
    Including this file to configure the static eth0:
    [root@beezey johnea]# cat /etc/conf.d/network
    interface=eth0
    address=10.20.30.1
    netmask=24
    broadcast=10.20.30.255
    And started and stopped tftpd.socket prior to .service as instructed here:
    https://wiki.archlinux.org/index.php/Tf … er#Systemd
    Netstat show the IPv6 port 69 for tftpd, but there is no port 69 listening on IPv4:
    [root@beezey johnea]# netstat --udp --tcp -l -n
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:6011 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:6012 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:6013 0.0.0.0:* LISTEN
    tcp6 0 0 :::22 :::* LISTEN
    tcp6 0 0 ::1:6010 :::* LISTEN
    tcp6 0 0 ::1:6011 :::* LISTEN
    tcp6 0 0 ::1:6012 :::* LISTEN
    tcp6 0 0 ::1:6013 :::* LISTEN
    udp 0 0 0.0.0.0:58493 0.0.0.0:*
    udp 0 0 0.0.0.0:67 0.0.0.0:*
    udp 0 0 10.20.30.1:123 0.0.0.0:*
    udp 0 0 192.168.13.73:123 0.0.0.0:*
    udp 0 0 127.0.0.1:123 0.0.0.0:*
    udp 0 0 0.0.0.0:123 0.0.0.0:*
    udp6 0 0 :::32138 :::*
    udp6 0 0 :::69 :::*
    udp6 0 0 fe80::21b:21ff:fe6b:123 :::*
    udp6 0 0 fe80::1a03:73ff:fe3:123 :::*
    udp6 0 0 ::1:123 :::*
    udp6 0 0 :::123 :::*
    I'm able to start in.tftpd manually via:
    [root@beezey johnea]# in.tftpd -l -s /srv/tftp/
    After this command line netstat shows the active socket 69 on IPv4 and IPv6:
    [root@beezey johnea]# netstat --udp -l -n
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    udp 0 0 0.0.0.0:44194 0.0.0.0:*
    udp 0 0 0.0.0.0:67 0.0.0.0:*
    udp 0 0 0.0.0.0:69 0.0.0.0:*
    udp 0 0 192.168.13.73:123 0.0.0.0:*
    udp 0 0 10.20.30.1:123 0.0.0.0:*
    udp 0 0 127.0.0.1:123 0.0.0.0:*
    udp 0 0 0.0.0.0:123 0.0.0.0:*
    udp6 0 0 :::41398 :::*
    udp6 0 0 :::69 :::*
    udp6 0 0 fe80::21b:21ff:fe6b:123 :::*
    udp6 0 0 fe80::1a03:73ff:fe3:123 :::*
    udp6 0 0 ::1:123 :::*
    udp6 0 0 :::123 :::*
    I'm unclear on:
    1) why tftpd thinks IPv4 0.0.0.0:69 is already in use
    2) how to best configure persistent interface names under sytemd and udev
    Any guidance is greatly appreciated...
    johnea
    Last edited by android (2012-12-14 00:20:19)

    OK, I have it working. There were several things wrong:
    1) The modified tftpd.service file was incorrect. The introduction of the '-l' flag, to run tftpd as a standalone service, not inetd driven, was preventing the socket based unit from working. The tftpd.service file below is working correctly with the stock tftpd.socket file provided with the tftp-hpa package. This file has modifications to make tftpd run only on the statically configured interface.
    [Unit]
    Description=hpa's original TFTP daemon on subnet interface sub0
    Requires=network.target
    After=network.target
    [Service]
    ExecStart=/usr/sbin/in.tftpd -a 10.20.30.1 -s /srv/tftp/
    StandardInput=socket
    StandardOutput=inherit
    StandardError=journal
    [Install]
    WantedBy=multi-user.target
    The "Requires=network.target" and "After=network.target" were necessary additions for restricting tftpd to one interface by it's IP address.
    The "-a 10.20.30.1" argument specifies the interface to monitor.
    2) The /etc/conf.d/network file had typos.
    The statically configured interface uses the network.service file specified here:
    https://wiki.archlinux.org/index.php/Tf … er#Systemd
    However my /etc/conf.d/network file somehow managed to pick up spaces at the beginning of the lines after the first line. This prevented the network.service file from extracting the parameters.
    I additionally modified the network.service file by commenting out the wpa_supplicant line, and the "ip route add" line, because this is a wired interface and it is a local subnet with no outbound gateway.
    The netstat output was misleading me. Since the tftpd unit is socket driven, it does not show up as a listening socket on port 69 (this also kept it out of ps listings). I believe systemd had started tftpd.socket and was monitoring UDP port 69. This is why I was experiencing the "Address already in use" error on the tftpd.service file that specified the '-l' option.
    The persistent interface names where established via a Udev rule, as specified here:
    https://wiki.archlinux.org/index.php/Ud … ork_device
    This led to custom interface names, which required the /etc/conf.d/network file, and other network config files be updated.
    These steps led to a working tftpd service on one statically configured interface only.
    The only remaining systemd issue to be resolved on this host is to restrict the dhcpcd client to the other interface only, but that's another post.
    johnea

  • [SOLVED] Systemd and tmpfiles? Conflicting /tmp?

    I've got this error in journal;
    systemd-tmpfile[247]: Two or more conflicting lines for /tmp configured, ignoring.
    This is from a leftover from arch initscripts, /usr/lib/tmpfiles.d/arch.conf shich is doubled by systemd's, /usr/lib/tmpfiles.d/x11.conf (almost).
    arch.conf;
    D /tmp 1777 root root 10d
    d /run/daemons 0755 root root -
    d /tmp/.X11-unix 1777 root root 10d
    d /tmp/.ICE-unix 1777 root root 10d
    d /tmp/.XIM-unix 1777 root root 10d
    d /tmp/.font-unix 1777 root root 10d
    d /tmp/.Test-unix 1777 root root 10d
    F /run/utmp 0664 root utmp -
    r /tmp/.X[0-9]-lock
    r /etc/nologin
    r /etc/shutdownpid
    r /forcefsck
    r /fastboot
    x11.conf;
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU General Public License as published by
    # the Free Software Foundation; either version 2 of the License, or
    # (at your option) any later version.
    # See tmpfiles.d(5) for details
    # Make sure these are created by default so that nobody else can
    d /tmp/.X11-unix 1777 root root 10d
    d /tmp/.ICE-unix 1777 root root 10d
    d /tmp/.XIM-unix 1777 root root 10d
    d /tmp/.font-unix 1777 root root 10d
    d /tmp/.Test-unix 1777 root root 10d
    # Unlink the X11 lock files
    r /tmp/.X[0-9]*-lock
    Can I delete the arch one - where is it started from at boot? I'm running only systemd and got rid of all arch units. Or can I merge them? I really can't tell which tmpfiles are needed.
    Last edited by swanson (2012-05-31 19:11:46)

    Solved now! Boot times are as fast as posssible on my HDD I think. Only thing after uninstalling initscripst and initscripts-systemd was that locale was not set inspite of a correct /etc/locale.conf. I had to make /etc/profile.d/locale.sh with this content;
    if [ -s /etc/locale.conf ]; then
    . /etc/locale.conf
    fi
    export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE
    export LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS
    export LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION

  • [SOLVED]systemd-tmpfiles-setup.service fails

    Hi,
    I have installed arch on an old laptop (dell inspiron 6000). I haven't used arch linux for last 2 years. It seems system management style has changed drastically.
    Anyways, systemctl status systemd-tmpfiles-setup.service returns this;
    ● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
    Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
    Active: failed (Result: exit-code) since Sal 2015-06-09 11:00:18 EEST; 38min ago
    Docs: man:tmpfiles.d(5)
    man:systemd-tmpfiles(8)
    Process: 228 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=1/FAILURE)
    Main PID: 228 (code=exited, status=1/FAILURE)
    Haz 09 11:00:18 yasar-laptop systemd[1]: Starting Create Volatile Files and Directories...
    Haz 09 11:00:18 yasar-laptop systemd[1]: systemd-tmpfiles-setup.service: main process exited, code=exited, status=1/FAILURE
    Haz 09 11:00:18 yasar-laptop systemd[1]: Failed to start Create Volatile Files and Directories.
    Haz 09 11:00:18 yasar-laptop systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.
    Haz 09 11:00:18 yasar-laptop systemd[1]: systemd-tmpfiles-setup.service failed.
    Is this something that I should be concerned? I don't really know what this service supposed to do?
    If I should be concerned, how to troubleshoot it? Keep in mind that this is a fresh arch install.
    Last edited by yasar11732 (2015-06-09 16:31:04)

    Thanks,
    I have add acl option to fstab file, it works now. If anyone else has this problem, here is how my fstab file looks now;
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    UUID=936297ec-2bc3-45ef-bdb0-0a4ce7239204 / ext4 rw,relatime,data=ordered 0 1
    UUID=d1fd9d31-99b5-45ba-97f4-a4c20b96e48b /var reiserfs rw,relatime,acl 0 2
    UUID=6a9b3e39-8ea2-446f-9a71-79faab7cdafe /home xfs rw,relatime,attr2,inode64,noquota 0 2
    # UUID=eb0b40d3-43ac-4f1f-8b29-97cd16a534d4
    UUID=eb0b40d3-43ac-4f1f-8b29-97cd16a534d4 none swap defaults 0 0

  • [SOLVED]Systemd Tmpfile Setup Service Fails

    I'm not sure what version this began but I'm using systemd 185-1 and systemd-arch-units 20120606-4. Service just fails to start. Is this fixable?
    └╼ $ systemctl status systemd-tmpfiles-setup.service
    systemd-tmpfiles-setup.service - Recreate Volatile Files and Directories
    Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-setup.service; static)
    Active: failed (Result: exit-code) since Fri, 22 Jun 2012 04:22:15 -0400; 36s ago
    Docs: man:tmpfiles.d(5)
    Process: 931 ExecStart=/usr/bin/systemd-tmpfiles --create --remove (code=exited, status=1/FAILURE)
    CGroup: name=systemd:/system/systemd-tmpfiles-setup.service
    Last edited by Hspasta (2012-06-23 04:31:05)

    swanson wrote:Check fstab and comment out the tmp there.
    Did and didn't help.
    WorMzy wrote:
    Do you have any aur/custom-made packages that put *.conf files in /usr/lib/tmpfiles.d or /usr/local/lib/tmpfiles.d?
    Does the system journal have any more information about the failure?
    Hm...I have a lot of stuff in /usr/lib/tmpfiles.d/
    └╼ $ ls /usr/lib/tmpfiles.d/
    total 44K
    -rw-r--r-- 1 root root 30 Jun 4 16:12 console.conf
    -rw-r--r-- 1 root root 29 May 27 00:29 consolekit.conf
    -rw-r--r-- 1 root root 74 Jun 6 19:02 initscripts.conf
    -rw-r--r-- 1 root root 719 Jun 4 16:12 legacy.conf
    -rw-r--r-- 1 root root 61 Jun 16 01:28 lvm2.conf
    -rw-r--r-- 1 root root 24 Jun 1 00:04 mpd.conf
    -rw-r--r-- 1 root root 27 Jun 9 03:29 nscd.conf
    -rw-r--r-- 1 root root 30 Jun 9 01:41 openssh.conf
    -rw-r--r-- 1 root root 729 Jun 4 16:12 systemd.conf
    -rw-r--r-- 1 root root 449 Jun 4 16:12 tmp.conf
    -rw-r--r-- 1 root root 622 Jun 4 16:12 x11.conf
    I feel like something in my system is broken...

  • [solved]systemd and console font

    Hi guys. I've just switched my laptop over to systemd and so far I'm finding it great! I am, however, having a slight issue with getting it to set a console font, err, properly.
    KEYMAP=uk
    FONT=Lat2-Terminus16
    Before switching to systemd, this worked fine. However now when I boot up, the font is set early (I have the hook in mkinitcpio.conf) but once I get to the login screen, the screen flickers and I end up back on the default font. I've tried this with several of the available fonts and it happens with all of them. I don't have it set anywhere else, so I'm not sure why the font is being reset. Has anyone else come across this issue yet?
    Cheers.
    Last edited by JHeaton (2012-08-25 20:20:34)

    bohoomil wrote:Did you really rebuild the initramfs? Once it becomes a part of your boot image, it shouldn't be reset (which happens when the video driver like nouveau gets loaded: if this is the case, add your video driver to the MODULES array in /etc/mkinitcpio,conf and rebuild the image again). I have been doing the very same thing every time I prepare a new setup and it always works as expected.
    Yes, I did rebuild it. I didn't have the video driver in MODULES though; adding it has now solved the issue. Don't know why I hadn't added i915 to that array though.
    Thanks very much for your help.

  • [SOLVED] systemd and pm-utils quirks (gma500_gfx)

    Hi,
    I have a netbook with the infamous poulsbo/gma500 chipset. To suspend it on the console (I am not yet at X ;-) ) I need to add the --quirk-vbemode-restore option to pm-suspend as described in the wiki [1]. How can I get the same effect when migrating to systemd (and therefore switching to systemctl and dropping pm-utils)?
    Thanks
    [1] https://wiki.archlinux.org/index.php/Poulsbo
    Last edited by olaf.the.lost.viking (2012-08-22 23:13:22)

    The code is in /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler and /usr/lib/pm-utils/sleep.d/99video. The substantial part is
    # save/restore the vbe mode
    vbe_savemode() { vbe vbemode get |savestate vbemode; }
    vbe_restoremode()
    # this is a little mode complicated to handle special-casing mode 3.
    local vbemode=$(restorestate vbemode)
    if [ "$vbemode" = "3" ]; then
    vbe vgamode set $vbemode
    else
    vbe vbemode set $vbemode
    fi
    Note that vbe function only forwards its arguments to vbetool. You could place something like this into /usr/lib/systemd/system-sleep/99video
    #!/bin/sh
    TMPFILE=/tmp/gma500-state
    vbe_savemode() {
    vbetool vbemode get > $TMPFILE
    vbe_restoremode() {
    # this is a little mode complicated to handle special-casing mode 3.
    local vbemode=$(cat $TMPFILE)
    if [ "$vbemode" = "3" ]; then
    vbetool vgamode set $vbemode
    else
    vbetool vbemode set $vbemode
    fi
    if [[ $1 == "pre" ]]; then
    vbe_savemode
    elif [[ $1 == "post" ]]; then
    [ -O /tmp/gma500-state ] && vbe_restoremode
    fi

  • [SOLVED] systemd and rc-local.service

    So, today i decided to try a pure systemd system by migrating my old installation.
    The first problem i faced comes from rc-local.service.
    I followed this:
    https://wiki.archlinux.org/index.php/Sy … s#rc.local
    and created an identical rc-local.service:
    /etc/systemd/system/rc-local.service
    [Unit]
    Description=/etc/rc.local Compatibility
    [Service]
    Type=oneshot
    ExecStart=/etc/rc.local
    TimeoutSec=0
    StandardInput=tty
    RemainAfterExit=yes
    [Install]
    WantedBy=multi-user.target
    ...made it executable and enabled the service via
    systemctl enable rc-local.service
    The problem comes when i issue:
    systemctl --system daemon-reload
    systemctl start rc-local.service
    Here the prompt hangs forever.
    ..so i reeboted and automagically "Something" of my rc.local has been executed.
    What has been left out was a subscript launched in background from my rc.local.
    While in the past my working rc.local executed a script:
    checkmounts.sh & #<-this loops forever
    ...and in ps -ef|grep checkmounts i got it listed, now with systemd i haven't it anymore.
    ...note that to debug issues i echoed several "marks" into a text file, and i'm sure that
    rc.local has been executed till the end and systemctl status reports no errors at all.
    So the question are:
    1) why can't i start rc-local from terminal via sysctl and it works (sort of) if i reboot?
    2) why a script executed from rc.local in background doesn't work?
    Last edited by kokoko3k (2012-08-27 15:43:35)

    I already tried that with the same results.
    Now i found that removing StandardInput=tty works and solved both of the issues (at least issuing manual startups).
    So this:
    [Unit]
    Description=/etc/rc.local Compatibility
    [Service]
    Type=oneshot # is forking instead of oneshot needed here?
    ExecStart=/etc/rc.local
    TimeoutSec=0
    #StandardInput=tty
    RemainAfterExit=yes
    [Install]
    WantedBy=multi-user.target
    Works really well for me, exactly like in the past.
    Plus, i can see all running child processess via systemctl status rc-local.service
    If someone thinks this is wrong for seome reason i'll NOT update the wiki page.
    --EDIT
    Works well after a reboot too, and changing Type= to fork make just fork, parallelizing the boot (kdm+kde for me)
    Last edited by kokoko3k (2012-09-13 13:43:38)

  • [Solved] systemd and fstab with /var bind

    I'm having some troubles migrating to systemd. I have the following in my fstab:
    # /etc/fstab: static file system information
    # <file system> <dir>   <type>  <options>       <dump>  <pass>
    tmpfs           /tmp    tmpfs   nodev,nosuid,size=8G    0       0
    UUID=2bedbb1a-015f-4c46-ab48-f3ffc55b154b /boot ext2 defaults 0 1
    #UUID=2c5f02a3-c8a1-45ed-92f4-dc09e56c09d7 /var ext4 discard,noatime 0 1
    UUID=2c5f02a3-c8a1-45ed-92f4-dc09e56c09d7 /mnt/mythtv ext4 discard,noatime 0 1
    UUID=910898cb-2d67-4689-ba51-358d94b2531d swap swap defaults 0 0
    UUID=cac6ccea-456a-4c09-a1db-57cec02b238d / ext4 discard,noatime 0 1
    /dev/mapper/VolGroupArray-lvmedia /mnt/media ext4 auto 0 0
    mnt/media/var /var bind defaults,bind 0 0
    (/dev/sda is an ssd disk so I decided to move /var to my software raid and lvm disks)
    However this doesn't seem to work anymore with systemd as it doesn't get mounted automatically anymore. I've setup a debug console, there I can mount it by simply typing mount /var and then I can manually start the services that failed.
    didn't actually solve the bind stuff, but decided to make a new partition on the lvm disk and mount /var there.
    Last edited by blahbla77 (2012-11-18 13:58:13)

    Are you really missing a leading / from the last line?

Maybe you are looking for