[SOLVED] Openssh and /lib/systemd/system/sshd.socket

I'm a bit worried about a remote computer because of an incident relating to media server at home. I've looked for similar posts and among bugs without any hits. I always set the port to a none standard one.
I made this update:
upgraded openssh (6.1p1-3 -> 6.1p1-4)
According to file list the in subject mentioned sshd.socket is included. What happened after update: sshd.socket went back to original 22 port, even though I cannot find any evidence of it being replaced.
Hence I ask how openssh is upgraded. Does it overwrite sshd.socket?
Next thing that puzzles me is how systemd works in this case. When I set sshd.socket to none standard port I forgot to change settings in /etc/ssh/sshd_config. Connection was refused on anything else than the port given in sshd.socket, but if using the right port in sshd.socket it did connect even though /etc/ssh/sshd_config still was default e g 22. Does systemd redirect ports and hence make any changes beside sshd.socket unnecessary?
Two questions in one.
Last edited by KimTjik (2012-12-02 13:11:53)

No replies so I continued to test once again to see what's going on.
sshd.socket = port X --> sshd_config = port Y
I does redirect or whatever it does making corresponding settings in sshd_config unnecessary. Is this the way systemd should work?
It works the other way around as well. Even if sshd_config is set to a none standard port and sshd.socket to standard connections works without issues according to sshd.socket settings. Port settings in sshd_config are useless.
does updating openssh replace sshd.socket with default settings?
Yes it does. In my novice eyes this is bad. Since sshd.socket redirects to whatever port sshd.service should listen to according to settings in sshd_config it doesn't screw up the ability to connect; you only need to remember to use default 22 port.
I don't know where to start: is this a bug? is the Wiki outdated? will some new config files override other settings for ssh?

Similar Messages

  • [solved] my script in /usr/lib/systemd/system-sleep/ was erroneous

    Maybe I just didn't see something I need to do...
    I have this script:
    -rwxr-xr-x 1 root root 322 13. Nov 10:13 /usr/lib/systemd/system-sleep/resume.sh*
    And whether I suspend with the kde suspend thingy or with systemctl suspend, this script does not run on resume from suspend.
    The script looks like this:
    #!/bin/bash
    case $1/$2 in
    pre/*)
    exit 0
    # some lines to put graphics card back to sleep with vgaswitcheroo
    esac
    Did i do something wrong or do I need to do something else?
    Last edited by Cdh (2012-11-19 00:58:54)

    I did some further testing with my system, it appears that using the '*)' specifically causes a "Job for suspend.target canceled" on resume, which could be the problem you are facing. It could also be that the syntax for the pre and post are explicitly given, otherwise I don't see a reason why would it print that message.
    Given the code:
    #!/bin/sh
    #can also be /bin/bash
    case $1/$2 in
    echo "a $1 with $2"
    esac
    Works and does not produce the above (red) message.
    However combining "pre/*)" and "*)" generates the message, regardless of the shell.
    I was doing all the suspends with systemctl suspend
    So I'd suggest putting a lot of echo statements in your script and then observe the output of journalctl -b -u systemd-suspend (this is where the echo statements get logged) and check for any errors it might throw. And try to use the pre/*) post/*) if you didn't try that yet.
    EDIT:
    Forgot to mention I was doing all this as root
    Last edited by ytech (2012-11-18 20:46:34)

  • [Solved] Installting A Pure systemd System From Scratch

    Hello all,
    A few months back I gave Arch a spin and it was great, but decided to wait for Windows 8 RTM to come out to check it out as well.
    Windows 8 being the horrible thing it is, Arch is the way to go, and I would like to do a test installation alongside Windows 7, in order to make sure I can make the switch permanently.
    Having followed the forums pretty consistently, it seems that systemd is the future.
    Instead of waiting for it to be integrated (which is supposed to happen at some point), I was wondering if I can somehow install a pure systemd system as part of the basic installation and not installing initscripts at all.
    Thanks, Adam.
    Last edited by adam777 (2012-08-28 12:55:27)

    mhertz wrote:
    luvfree wrote:[...].
    I'm going to reinstall anyway so why not wait until the iso doesn't pacstrap the old initscripts and sysvinit?
    Just makes for a cleaner install all around.
    I'm certainly not going to leave this install on with 4 installed desktop environments.[...]
    I myself was also reinstalling alot and imaging and whatnot when I first began with linux(arch), but after some time I realised that it was pointless and linux dosen't need those reinstalls for optimization like windows did, and pacman has nifty switches to get you sorted on what you've explicitly installed and hence, can go delete the cruft not used anymore, or to list files not owned by any installed packages, to clean up in etc...
    Nowadays, I newer reinstall unless something would go _really_ wrong, and only backup config-files and home-files, and keep a livecd around for rescue-operations, and an automated personal install script for if I ever do need to reinstall...
    Anyway, of course it's your own choise
    I understand and the arch way is awesome.
    but it is still on the new side to me.
    I've bloated this install with 4 desktop environments so a reinstall is inevitable. lol
    once I settle on which one to keep I'll do just that.
    it will be some time though I'm sure.
    I'm just keeping my eye out for an iso without the old initscripts pacstapped to begin with.
    it just HAS to be a cleaner install.
    Thanks for your input though.
    CHEERS.
    Oh yeah and by the way I've used nothing but linux for over 10 years now.
    No windoze here.
    Last edited by luvfree (2012-09-05 03:40:22)

  • [SOLVED] defect dbus service, systemd is unable to create socket

    Hi,
    I am experiencing serious problems with systemd & dbus.
    I want to setup a gateway in a KVM VM, all was working fine till i applied my shorewall config & set to autostart (systemctl enable shorewall).
    If I reboot the machine after this step one or two times, then I get a broken dbus service.
    What I did than: reinstalled archlinux again (x86_x64) and setup same -> got issue again.
    installed arch linux as x86 and setup same -> issue again
    installed arch as x86 and configured nothing else shorewall and got this issue again after maximum of two reboots.
    i found in log:
    Feb 13 15:45:56 pactor systemd[1]: Failed to open private bus connection: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    I've checked this directory by hand and found that only /var/run is existing. /var/run/dbus is already not existing.
    logs:
    journalctl -b: http://nopaste.info/685f4c6192.html
    -be aware of systemd-logind, this needs dbus and i experience same problem with other services which require dbus as dnsmasq
    root@pactor ~]# systemctl status dbus
    dbus.service - D-Bus System Message Bus
    Loaded: loaded (/usr/lib/systemd/system/dbus.service; static)
    Active: active (running) since Mi 2013-02-13 15:45:56 CET; 9min ago
    Main PID: 169 (dbus-daemon)
    CGroup: name=systemd:/system/dbus.service
    └─169 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
    [root@pactor ~]# systemctl status dbus.socket
    dbus.socket - D-Bus System Message Bus Socket
    Loaded: loaded (/usr/lib/systemd/system/dbus.socket; static)
    Active: active (running) since Mi 2013-02-13 15:45:56 CET; 9min ago
    Feb 13 15:45:56 pactor systemd[1]: Listening on D-Bus System Message Bus Socket.
    systemd-logind.service - Login Service
    Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static)
    Active: activating (start) since Mi 2013-02-13 16:00:56 CET; 48s ago
    Docs: man:systemd-logind.service(8)
    man:logind.conf(5)
    http://www.freedesktop.org/wiki/Software/systemd/multiseat
    Main PID: 338 (systemd-logind)
    CGroup: name=systemd:/system/systemd-logind.service
    └─338 /usr/lib/systemd/systemd-logind
    Feb 13 16:00:56 pactor systemd[1]: Failed to start Login Service.
    Feb 13 16:00:56 pactor systemd[1]: Unit systemd-logind.service entered failed state
    Feb 13 16:00:56 pactor systemd[1]: systemd-logind.service holdoff time over, scheduling restart.
    Feb 13 16:00:56 pactor systemd[1]: Stopping Login Service...
    Feb 13 16:00:56 pactor systemd[1]: Starting Login Service...
    installed packages: http://nopaste.info/1d1be9adad.html
    shorewall config: shorewall_conf.tar
    Last edited by debijan (2013-02-20 20:13:47)

    oh man... found the reason due to help of some guys on systemd irc... big thx to falconindy and alxchk.
    shorewall's SUBSYSLOCK option in shorewall.conf is by default set to /var/lock/shorewall.
    but the arch wiki point that it should be set to /var/run: https://wiki.archlinux.org/index.php/Router
    definitely wrong! that deletes the /var/run symlink and created a directory intstead.
    to set the SUBSYSLOCK on default is working like a charm.
    look also for this: https://bbs.archlinux.org/viewtopic.php?id=151285
    could somebody modify the wiki in the meantime, i will hold this thread on -not-solved in the meantime
    edit:/ oh man this wrong info in wiki did cost me a lot of time :-/
    Last edited by debijan (2013-02-13 22:09:35)

  • [SOLVED] config in /etc/systemd (ssh, getty) resets after system upgr.

    I've made changes in /etc/systemd/system/getty.target.wants/[email protected] (don't clear console at boot as per https://wiki.archlinux.org/index.php/Sy … r_boot.3F) and /etc/systemd/system/sockets.target.wants/sshd.socket (changed ssh port) but they keep getting reset after a system upgrade (not sure by what package, pacman -Qo file says that no package owns them)
    I'm starting to wonder if above places are the correct place and even way to do mentioned changes.
    What I want to achieve;
    1) simple way to not clear console after boot
    2) change what port ssh (systemd ssh socket) listens at
    3) make them changes permanent and durable even after a system upgrade
    My setup is pure systemd.
    Last edited by ImbaLocus (2012-10-30 23:41:08)

    Thank you, this works.
    Have yet to do an upgrade but I'm sure configuring according to your solution will This works perfectly.
    Last edited by ImbaLocus (2012-11-01 12:48:33)

  • [SOLVED] Postgresql and systemd - Unable to start or enable service

    I'm trying to run postgresql in a pure systemd machine.
    i've done a fresh install of postgresql using pacman as instructed in the wiki. However when i try to start the service i get the following:
    user@frodo:~$ sudo systemctl start postgresql.service
    Failed to issue method call: Unit postgresql.service failed to load: No such file or directory. See system logs and 'systemctl status postgresql.service' for details.
    user@frodo:~$ sudo systemctl status postgresql.service
    postgresql.service
    Loaded: error (Reason: No such file or directory)
    Active: inactive (dead)
    So it seems the package has no systemd service files included. Did anyone got around to make one of these?
    Last edited by lothar_m (2012-09-26 22:01:21)

    well, i've managed to fix the problem.
    it seems that the wiki is missing a couple of steps. so i manually done the following:
    i) create the data directory (acordingly  with the PGROOT variable set before in the config file)
    user@frodo:~$ sudo mkdir /var/lib/postgres/data
    ii) set /var/lib/postgres/data ownership to user 'postgres'
    iii) As user 'postgres' start the database.
    user@frodo:~$ sudo -i -u postgres
    [postgres@frodo ~]$ initdb -D '/var/lib/postgres/data'
    iv) start the service as root
    user@frodo:~$ sudo systemctl start postgresql.service
    that should be it.
    Issuing a systemctl status should return
    user@frodo:~$ sudo sudo systemctl status postgresql.service
    postgresql.service - PostgreSQL database server
    Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled)
    Active: active (running) since Wed, 26 Sep 2012 22:50:09 +0100; 6s ago
    Process: 11187 ExecStart=/usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120 (code=exited, status=0/SUCCESS)
    Process: 11183 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=0/SUCCESS)
    Main PID: 11193 (postgres)
    CGroup: name=systemd:/system/postgresql.service
    ├ 11193 /usr/bin/postgres -D /var/lib/postgres/data
    ├ 11198 postgres: checkpointer process
    ├ 11199 postgres: writer process
    ├ 11200 postgres: wal writer process
    ├ 11201 postgres: autovacuum launcher process
    └ 11202 postgres: stats collector process
    Sep 26 22:50:08 frodo postgres[11187]: LOG: database system was shut down at 2012-09-26 22:49:13 WEST
    Sep 26 22:50:08 frodo postgres[11187]: LOG: database system is ready to accept connections
    Sep 26 22:50:08 frodo postgres[11187]: LOG: autovacuum launcher starte
    Last edited by lothar_m (2012-12-30 09:52:52)

  • [SOLVED] Run script on systemd shutdown and reboot

    Hello!
    I am trying to log uptime on shutdown and reboot with no success.
    I create the file /usr/lib/systemd/system/uptime.service:
    [Unit]
    Description=/etc/rc.local.shutdown Compatibility
    ConditionFileIsExecutable=/etc/rc.local.shutdown
    DefaultDependencies=no
    After=rc-local.service basic.target
    Before=shutdown.target
    [Service]
    Type=oneshot
    ExecStart=/etc/rc.local.shutdown
    StandardInput=tty
    RemainAfterExit=yes
    [Install]
    WantedBy=shutdown.target
    /etc/rc.local.shutdown:
    [jribeiro@arkosta ~]$ ls -l /etc/rc.local.shutdown
    -rwxr-xr-x 1 root root 107 Out 24 12:42 /etc/rc.local.shutdown
    [jribeiro@arkosta ~]$ cat /etc/rc.local.shutdown
    echo "$(date) - $(/usr/bin/uptime | sed 's/.*up \([^,]*\), .*/\1/')" >> /home/jribeiro/registo_de_uptime
    Any ideas?
    Last edited by joseribeiro (2014-10-25 19:57:59)

    I altered the uptime unit file:
    [jribeiro@arkosta ~]$ cat /usr/lib/systemd/system/uptime.service
    [Unit]
    Description=/etc/rc.local.shutdown Compatibility
    Before=shutdown.target
    [Service]
    ExecStart=/bin/true
    ExecStop=/etc/rc.local.shutdown
    RemainAfterExit=yes
    [Install]
    WantedBy=shutdown.target
    Then I started the uptime service manually:
    [jribeiro@arkosta ~]$ sudo systemctl start uptime
    I checked the 'registo_de_uptime' file:
    [jribeiro@arkosta ~]$ cat /home/jribeiro/registo_de_uptime
    Sáb Out 25 19:43:31 WEST 2014 - 2 min
    After that I rebooted my system.
    I checked the 'registo_de_uptime' file, again:
    [jribeiro@arkosta ~]$ cat /home/jribeiro/registo_de_uptime
    Sáb Out 25 19:43:31 WEST 2014 - 2 min
    Sáb Out 25 19:44:27 WEST 2014 - 3 min
    Everything seems to be alright. I wanted to make the ultimate test.
    With that in mind I rebooted the system.
    I checked the 'registo_de_uptime' file, once more:
    [jribeiro@arkosta ~]$ cat /home/jribeiro/registo_de_uptime
    Sáb Out 25 19:43:31 WEST 2014 - 2 min
    Sáb Out 25 19:44:27 WEST 2014 - 3 min
    No success...
    It works when I start the service manually and in the right next reboot, after that it won't work.
    Here is the journal's ouput:
    [jribeiro@arkosta ~]$ sudo journalctl -b -0 -u uptime
    -- Logs begin at Sex 2014-10-24 22:02:03 WEST, end at Sáb 2014-10-25 20:05:29 WEST. --
    By the way:
    [jribeiro@arkosta ~]$ sudo systemctl status uptime
    ● uptime.service - /etc/rc.local.shutdown Compatibility
    Loaded: loaded (/usr/lib/systemd/system/uptime.service; enabled)
    Active: inactive (dead)
    Last edited by joseribeiro (2014-10-25 19:07:32)

  • [Solved]can't get systemd to work, syslog.service not loaded

    So, i've been trying to use systemd today, after "Create systemd configuration files." step and reboot, i always got this:
    Any Help would be appreciated..
    Last edited by veroke12 (2012-08-25 07:31:06)

    eldragon wrote:remove quiet from your kernel boot parameters. post some more useful stuff like the dmesg (obtained from the recovery console)
    that did the trick, but can't login (i use startx)..
    and get an error mounting:
    mnt-windows.mount - /mnt/windows
    Loaded: loaded (/etc/fstab)
    Active: failed (Result: exit-code) since Sat, 25 Aug 2012 13:03:57 +0700; 3min 26s ago
    Where: /mnt/windows
    What: /dev/sdb
    Process: 367 ExecMount=/bin/mount /dev/sdb /mnt/windows -t ntfs-3g -o gid=users,fmask=113,dmask=002 (code=exited, status=12)
    CGroup: name=systemd:/system/mnt-windows.mount
    Aug 25 13:03:57 myhost mount[367]: NTFS signature is missing.
    Aug 25 13:03:57 myhost mount[367]: Failed to mount '/dev/sdb': Invalid argument
    Aug 25 13:03:57 myhost mount[367]: The device '/dev/sdb' doesn't seem to ha...S.
    Aug 25 13:03:57 myhost mount[367]: Maybe the wrong device is used? Or the w... a
    Aug 25 13:03:57 myhost mount[367]: partition (e.g. /dev/sda, not /dev/sda1)...d?
    dmesg:
    [ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=e1d5602b-de83-46e0-8ed8-4366a319b49b ro init=/bin/systemd
    [ 0.709226] systemd-udevd[41]: starting version 188
    [ 2.936891] systemd[1]: systemd 188 running in system mode. (+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP; arch)
    [ 3.170230] systemd[1]: Inserted module 'autofs4'
    [ 3.199718] systemd[1]: Set hostname to <myhost>.
    [ 4.267502] systemd[1]: [/usr/lib/systemd/system/rc-local.service:3] Unknown lvalue 'ConditionPathIsExecutable' in section 'Unit'. Ignoring.
    [ 4.445331] systemd[1]: [/usr/lib/systemd/system/rc-local-shutdown.service:3] Unknown lvalue 'ConditionPathIsExecutable' in section 'Unit'. Ignoring.
    [ 4.503987] systemd[1]: Cannot add dependency job for unit dkms.service, ignoring: Unit dkms.service failed to load: No such file or directory. See system logs and 'systemctl status dkms.service' for details.
    [ 4.504023] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory. See system logs and 'systemctl status display-manager.service' for details.
    [ 4.504291] systemd[1]: Socket service syslog.service not loaded, refusing.
    [ 5.060568] systemd-udevd[125]: starting version 188
    [ 5.760783] systemd-journald[132]: Fixed max_use=145.0M max_size=18.1M min_size=64.0K keep_free=72.5M
    [ 5.760833] systemd-journald[132]: Reserving 33009 entries in hash table.
    [ 5.761588] systemd-journald[132]: Vacuuming...
    [ 61.730597] systemd[1]: Job systemd-tmpfiles-clean.timer/start failed with result 'dependency'.
    [ 61.730612] systemd[1]: Job dbus.socket/start failed with result 'dependency'.
    [ 61.730719] systemd[1]: Unit mnt-windows.mount entered failed state.
    [ 61.734921] systemd-journald[132]: Received SIGTERM
    [ 61.810451] systemd[1]: Startup finished in 3s 223ms 841us (kernel) + 58s 586ms 503us (userspace) = 1min 1s 810ms 344us.
    [ 61.839330] systemd-journald[379]: Fixed max_use=145.0M max_size=18.1M min_size=64.0K keep_free=72.5M
    [ 61.839678] systemd-journald[379]: Vacuuming...
    [ 61.893807] systemd-journald[379]: Received SIGUSR1
    Last edited by veroke12 (2012-08-25 06:31:18)

  • [Solved] wlan0 and openntpd

    Hi,
    i recently switched to systemd as initprocess and have a little problem with my timezone, because openntpd is started before a wlan-connection is established.
    Is there a workaround for this?
    Before using systemd i had an entry in rc.local who started openntpd with a delay of 4 minutes and i know i can use rc.local with systemd, but i think it must be possible to have the established internetconnection as an dependency of openntpd.
    Any help is appreciated
    Last edited by D4ve (2012-08-27 21:10:57)

    Well, i use openntpd, not ntpd.
    Heres the .service from openntpd:
    [Unit]
    Description=OpenNTP Daemon
    After=network.target
    [Service]
    Type=forking
    ExecStart=/usr/sbin/ntpd -s
    [Install]
    WantedBy=multi-user.target
    I think i see the error
    EDIT: I've added nss-lookup.target to "After=network.target " and it didn't change anything (Of course i rebooted).
    What systemctl says:
    # systemctl status openntpd
    openntpd.service - OpenNTP Daemon
    Loaded: loaded (/usr/lib/systemd/system/openntpd.service; enabled)
    Active: active (running) since Mon, 27 Aug 2012 20:56:08 +0200; 7min ago
    CGroup: name=systemd:/system/openntpd.service
    ├ 441 /usr/sbin/ntpd -s
    └ 625 /usr/sbin/ntpd -s
    Hm, is it loaded twice?!
    Last edited by D4ve (2012-08-27 17:05:26)

  • Need help with Unrealircd and Anope(SystemD error

    So i installed both UnrealIRCD and Anope, have everything almost set up accept for starting Anope.
    Both are going to be stored on my computer
    EDIT: I finally found my error, when i run "sudo systemctl start anope" it goes through fine, but when i check "status" It gives this:
    anope.service - Anope IRC Services
    Loaded: loaded (/usr/lib/systemd/system/anope.service; enabled)
    Active: failed (Result: exit-code) since Sun 2014-01-05 05:42:36 CST; 6min ago
    Process: 1370 ExecStart=/usr/bin/services --confdir=/etc/anope --dbdir=/var/lib/anope --localedir=/usr/lib/anope/locales --logdir=/var/log/anope --modulesdir=/usr/lib/anope --nofork (code=exited, status=255)
    Main PID: 1370 (code=exited, status=255)
    CGroup: /system.slice/anope.service
    Jan 05 05:42:36 SeeThroughZone systemd[1]: Started Anope IRC Services.
    Jan 05 05:42:36 SeeThroughZone services[1370]: [Jan 05 05:42:36 2014] Anope 2.0.0-rc1, build #2, compiled 05:10:26 Jan 5 2014
    Jan 05 05:42:36 SeeThroughZone services[1370]: [Jan 05 05:42:36 2014] Using configuration file /etc/anope/services.conf
    Jan 05 05:42:36 SeeThroughZone systemd[1]: anope.service: main process exited, code=exited, status=255/n/a
    Jan 05 05:42:36 SeeThroughZone systemd[1]: Unit anope.service entered failed state.
    nano /etc/unrealircd/unrealircd.conf:
    link /etc/anope/services.conf
    username services;
    hostname 127.0.0.1;
    bind-ip *;
    port 6697;
    hub *;
    password-connect "password";
    password-receive "password";
    class servers;
    options {
    /* Note: You should not use autoconnect when linking services */
    autoconnect;
    ssl;
    zip;
    nano /etc/anope/services.conf
    uplink
    * The IP or hostname of the IRC server you wish to connect Services to.
    * Usually, you will want to connect Services over 127.0.0.1 (aka localhost).
    * NOTE: On some shell providers, this will not be an option.
    host = "127.0.0.1";
    username = "services";
    password-connect "password";
    password-recieve "password";
    * Enable if Services should connect using IPv6.
    ipv6 = no
    * Enable if Services should connect using SSL.
    * You must have m_ssl loaded for this to work.
    ssl = yes
    * The port to connect to.
    * The IRCd *MUST* be configured to listen on this port, and to accept
    * server connections.
    * Refer to your IRCd documentation for how this is to be done.
    port = 6697
    Is there anything wrong with this config?
      ~The Dyzaster
    Last edited by Dyzaster (2014-01-05 11:53:50)

    Also, sudo systemctl status anope shows:
    anope.service - Anope IRC Services
    Loaded: loaded (/usr/lib/systemd/system/anope.service; enabled)
    Active: failed (Result: exit-code) since Thu 2014-01-02 02:05:25 CST; 2h 10min ago
    Process: 1150 ExecStart=/usr/bin/services --confdir=/etc/anope --dbdir=/var/lib/anope --localedir=/usr/lib/anope/locales --logdir=/var/log/anope --modulesdir=/usr/lib/anope --nofork (code=exited, status=255)
    Main PID: 1150 (code=exited, status=255)
    CGroup: /system.slice/anope.service
    Jan 02 02:05:25 NoOne systemd[1]: Started Anope IRC Services.
    Jan 02 02:05:25 NoOne services[1150]: [Jan 02 02:05:25 2014] Anope 2.0.0-rc1, build #2, compiled 01:20:55 Jan 2 2014
    Jan 02 02:05:25 NoOne systemd[1]: anope.service: main process exited, code=exited, status=255/n/a
    Jan 02 02:05:25 NoOne systemd[1]: Unit anope.service entered failed state.
    Where exactly is the error?

  • [SOLVED] Can't get systemd to mount nfs on boot

    I have "/usr/lib/systemd/system/mnt-shared.mount" with
    [Unit]
    Description=/mnt/shared
    Wants=rpc-statd.service
    After=network.target rpc-statd.service
    [Mount]
    What=10.0.0.3:/home/shared
    Where=/mnt/shared
    Type=nfs
    but when I reboot the mount never occurs. I have to manually do "systemctl start mnt-shared.mount" every time.
    Is there something special I have to do for systemd to use .mount files automatically?
    Last edited by boast (2012-07-13 20:43:21)

    In the beginning with systemd I had nfs mounting problems too. But after some extensive testing I found that the fstab mounting was the  best with some systemd adjustments.
    192.168.1.250:/ /mnt/SERVER_NYTT nfs4 noauto,rw,hard,async,intr,rsize=81920,wsize=81920,_netdev,clientaddr=192.168.1.251,x-systemd.automount 0 0
    All these options might not suit you but noauto and  x-systemd.automount are the important ones. You can test it by doing  systemd-analyze blame. With this setup systemd takes care of all the before, after, requires stuff pretty well by itself.
    Last edited by swanson (2012-07-13 08:35:50)

  • [Solved] Starting systemd --user as a systemd --system process?

    Hey guys,
    I would like to run systemd --user as a system service using this .service file I wrote:
    $ cat [email protected]
    [Unit]
    Description=Systemd --user instance for %I
    Documentation=man:systemd
    [Service]
    User=%I
    ExecStart=/usr/lib/systemd/systemd --user --log-level=debug
    [Install]
    WantedBy=multi-user.target
    I enabled it for my user using `systemctl enable systemd-user@evan`, however, when starting it it fails with the following errors:
    Jul 21 21:14:42 desktop systemd[12920]: systemd 204 running in user mode. (+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)
    Jul 21 21:14:42 desktop systemd[12920]: Using cgroup controller name=systemd. File system hierarchy is at /sys/fs/cgroup/systemd/system/[email protected]/[email protected]/systemd-12920.
    Jul 21 21:14:42 desktop systemd[12920]: Failed to create root cgroup hierarchy: Permission denied
    Jul 21 21:14:42 desktop systemd[12920]: Failed to allocate manager object: Permission denied
    Is it possible to run systemd --user like this? Do I need to add something to my [email protected]?
    Last edited by EvanPurkhiser (2013-07-22 02:10:10)

    EDIT: I just realized that the systemd-user-session-units package will only include specific units at build-time weather I have have the programs or not. You're right, I should just use this package!
    Well, to be honest, maybe I'm trying to hack around a problem that doesn't even really exist, but I don't think the systemd-user-sessions-units package meets my needs.
    The way I would like to have my user sessions setup is something like this:
    I would like to have an instance of systemd --user always running under my user so I can keep things like transmission-daemon always running, even when I don't have a user session open. When I do start my user session (via logging into getty) I want to bring my systemd instance up to a certain target. For example, logging in via tty1 should bring up graphical.target, which will start X11 and all that, while logging into any other tty will start console.target (for stuff like ssh-agent etc).
    Thinking more about this I suppose there's really no reason I couldn't use the [email protected] from systemd-user-session-units, but since I won't use most of the other user units included, I would rather just not use it.
    Here's what my .profile looks like:
    if systemctl -q is-active systemd-user@evan
    then
    # Default systemd to the console target
    target="console"
    # If we're logging in from VT1 start the graphical target
    if [[ $XDG_VTNR == 1 ]] && ! systemctl --user -q is-active graphical.target &> /dev/null
    then
    export DISPLAY=:0
    target="graphical"
    fi
    # Set all environment variables in the systemd --user instance (still working on this)
    env | systemctl --user set-environment -
    # Bring up systemd --user to the specified target
    systemctl --user start ${target}.target
    fi
    source "$HOME/.bashrc"
    Last edited by EvanPurkhiser (2013-07-22 03:56:13)

  • [SOLVED]dbus and systemd: "systemctl --user" gets "Connection refused"

    Hi,
    I want to enable some systemd user service. Here is what I get
    $ LANG=C systemctl --user
    Failed to get D-Bus connection: Connection refused
    $ echo $DBUS_SESSION_BUS_ADDRESS
    unix:abstract=/tmp/dbus-RboLZS2wF3,guid=feb8bd85248906d12a826acd54e3c4ad
    I don't believe I've ever touched dbus, so I'm a bit lost. There's the following line in my ~/.xinitrc:
    exec dbus-launch xmonad
    Seems like I'm not the only one with trouble on that topic, but I could not solve my problem.
    Additional resources:
    1. relevant pstree information
    systemd-+-acpid
    |-at-spi-bus-laun-+-dbus-daemon
    | |-{dconf worker}
    | |-{gdbus}
    | `-{gmain}
    |-3*[dbus-daemon]
    |-dbus-launch
    |-login---startx---xinit-+-Xorg
    | `-xmonad-x86_64-l-+-tons
    | |-of
    | |-stuff
    |-polkitd-+-{JS GC Helper}
    | |-{JS Sour~ Thread}
    | |-{gdbus}
    | |-{gmain}
    | `-{runaway-killer-}
    |-systemd---(sd-pam)
    |-systemd-journal
    |-systemd-logind
    |-systemd-udevd
    2.
    $ pgrep -af systemd
    1 /usr/lib/systemd/systemd --system --deserialize 16
    149 /usr/lib/systemd/systemd-journald
    171 /usr/lib/systemd/systemd-udevd
    257 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
    263 /usr/lib/systemd/systemd-logind
    316 /usr/lib/systemd/systemd --user
    3.
    $ pgrep -af dbus
    257 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
    385 dbus-launch --sh-syntax --exit-with-session
    386 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    459 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    470 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
    4. Playing with processus #1
    - Killing it doesn't change anything
    $ /usr/lib/systemd/systemd --user
    Failed to create root cgroup hierarchy: Permission denied
    Failed to allocate manager object: Permission denied
    $ sudo /usr/lib/systemd/systemd --user
    Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.
    $ echo $XDG_RUNTIME_DIR
    /run/user/1000
    $ sudo -i
    # XDG_RUNTIME_DIR=/run/user/1000 /usr/lib/systemd/systemd
    Startup finished in 41ms. // keeps running
    But I still cannot do "systemctl --user"....
    Last edited by Laugarhraun (2015-02-18 17:03:57)

    Heyyy I'm dumb!
    $ alias systemctl
    alias systemctl='sudo systemctl'
    $ LANG=C /usr/bin/systemctl --user
    Failed to list units: Process org.freedesktop.systemd1 exited with status 1
    New error = progress! yay!

  • Not yet solved, /usr/lib/systemd/systemd does not exit

    Hi,
    I was on 3.8.2 kernel, and did a full system backup with rsync to later upgrade, but after upgrading and rebooting, it just shows me
    Error: Root device mounted successfully, but /bin/systemd does not exist.
    Bailing out, you are on your own. Good Luck
    tty's could not initialize [*or something similar, I'm not sure]
    [root /]#
    Then I just replaced my system with the backup I did earlier. But it shows the same
    I did search for info but no clue.
    Currently trying with an older backup.
    Thanks in advance
    Last edited by arcaid (2013-05-14 23:58:26)

    progandy wrote:
    Error: Root device mounted successfully, but /usr/lib/systemd/systemd does not exist.
    The initscript tests if init is executable, so "does not exist" could also mean "is not executable"
    Somehow your root has a problem with its execute permissions. Did you somehow remove them, /usr/lib/systemd/systemd should be 755 or "-rwxr-xr-x"?
    While I'm not sure why is this modified, maybe the backups I did doesn't hold the attributes, I'm storing them in an NTFS partition but it can store the attributes doesn't it?
    Well I changed the attributes as you mentioned, but then it makes me wonder if then pretty much the other root files are too with other attributes..which is really bad.
    Nevertheless I changed it and now it shows permission denied and a kernel panic, sigh.
    Here is an image of it: http://imageshack.us/photo/my-images/689/dsc06698b.jpg
    Thanks in advance
    @Pantera
    The problem here is kinda different, while at the beggining it was the problem you mention and solution, now the thing is that it says that "/usr/lib/systemd/systemd does not exit" and not /bin/systemd which it was in the beggining. thanks though.

  • [Solved] Make systemctl find .service file in /usr/lib/systemd/user?

    I thought this had always worked, but it seems that systemctl cannot see `.service` files that are in my `/usr/lib/systemd/user` folder and I can't figure out why:
    $ locate redshift-gtk.service
    /usr/lib/systemd/user/redshift-gtk.service
    $ systemctl status redshift-gtk
    ● redshift-gtk.service
    Loaded: not-found (Reason: No such file or directory)
    Active: inactive (dead)
    I have already looked at https://wiki.archlinux.org/index.php/Systemd/User which seems to tell me to check sytemctl --user status but that appears to be loaded and working fine, I have a feeling I'm missing something obvious but can't figure out what it is. How do I make systemctl include this directory?
    $ systemctl --user status
    ● michael-work
    State: running
    Jobs: 0 queued
    Failed: 0 units
    Since: Tue 2014-08-05 11:24:32 BST; 11min ago
    CGroup: /user.slice/user-1000.slice/[email protected]
    ├─730 /usr/lib/systemd/systemd --user
    └─731 (sd-pam)
    Any ideas?
    Last edited by crashandburn4 (2014-08-05 11:09:45)

    systemctl --user status redshift-gtk.service

Maybe you are looking for