[SOLVED]Hibernation fails with "systemd hibernate"
Hibernation does not work on my laptop. After issuing the "systemd hibernate" laptop goes black, but after 10 seconds it wakes up again, with my lid light still blinking.
I'm receiving "cannot find swap device" and "cannot get swap writer" message
# systemctl hibernate
A dependency job for hibernate.target failed. See 'journalctl -xn' for details.
Last edited by letian_north (2012-12-02 16:35:04)
Ok, I set that thing up.
First try running
#swapon -s
Filename Type Size Used Priority
/dev/sda4 partition 2091004 103532 -1
If you don't see any output, then you need to make/activate your swap partition. For that purpose use any partition tool like fdisk/cfdisk. Read more here
Then you need to check if your mkinitcpio.conf, grub, fstab have the necessary lines for your swap image file to be read at boot.
Add this line to /etc/fstab file, so that swap is mounted by the system:
# /dev/sda4
UUID=YOUR_DISK_UUID_NUMBER none swap defaults 0 0
to find the uuid of your swap partition do blkid /dev/sdaX, X -- is the number of your swap partition.
Go to /etc/mkinitcpio.conf and add "resume" to HOOKS array like this:
HOOKS="base udev autodetect pata scsi sata filesystems usbinput fsck resume"
Go to /etc/default/grub and add this line "resume=/dev/sdaX" like this:
GRUB_CMDLINE_LINUX="resume=/dev/sda4"
After that run the following commands to update your grub setup and rebuild the ramdisk image.
# grub-mkconfig -o /boot/grub/grub.cfg
# mkinitcpio -p linux
Go and try "systemctl hibernate", all should work now.
Last edited by letian_north (2012-12-02 16:33:20)
Similar Messages
-
[Solved] Suspend to Disk: systemd-hibernate.service Fails
Howdy-ha, folks. I know this looks pretty mundane, but for the life of me I can't get hibernation to work. Each time I run systemctl hibernate the screen will go blank as though preparing to suspend, then come back on; journalctl shows the same error messages:
PM: Cannot find swap device, try swapon -a.
PM: Cannot get swap writer
Failed to start Hibernate.
Dependency failed for Hibernate.
Service sleep.target is not needed anymore. Stopping.
Unit systemd-hibernate.service entered failed state.
This happens when swap is mounted, and "swapon" says as much. I've been working on this for about four hours now, and none of what I've found seems to pertain to my situation (most of the "solutions" were "Increase partition size').
What I've tried:
- Three different kernels---linux-ck custom build and linux-ck-sandybridge from graysky's repo (both with BFQ and CFQ: see below), as well as the stock Arch kernel
- A 2 Gb swap file at /swapfile on my SSD;
- A 4 Gb swap partition on /dev/mmcblk0 (an SD card, and my preferred method/location, if possible);
- An 8 Gb swap partition on HDD /dev/sdb2
Reasons for wanting hibernate rather than suspend-to-RAM:
- Maximize battery life.
- There's some kind of issue with Linux-ck and suspending to RAM; it'll work once, then freeze in a kernel panic the second time, forcing a hard reset. The stock kernel suspends to RAM, but still won't hibernate
- I put a lot of time into building a custom Linux-ck kernel, and would rather not have to start the configuration over with the stock kernel if possible.
I'm working with limited space on my boot drive and, as mentioned, increasing the amount of swap has no bearing on this. The resulting phenomenon and error messages are the same, regardless of size and medium. I've exhausted my ideas on where to look, and what to even look for. Thanks a lot to everyone in advance (especially you,karol; don't think I don't see you lurking back there )
Last edited by ANOKNUSA (2013-11-17 05:32:14)I rebooted, so trying to recreate the same situation:
$ free -h
total used free shared buffers cached
Mem: 7.7G 7.2G 525M 0B 32M 2.3G
-/+ buffers/cache: 4.8G 2.9G
Swap: 3.7G 0B 3.7G
top reports nearly the same thing:
top - 20:00:13 up 22 min, 1 user, load average: 0.12, 0.22, 0.14
Tasks: 155 total, 1 running, 154 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.1 us, 0.3 sy, 0.1 ni, 99.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 8061380 total, 7500096 used, 561284 free, 34432 buffers
KiB Swap: 3872236 total, 0 used, 3872236 free, 2417172 cached
htop, however, reports about 1.5 Gb more free RAM. After reboot, swappiness is still set to 100 with the same results.
EDIT:
ANOKNUSA wrote: I'll test it again with the other locations mentioned in the OP, and get back to you.
Even though I rebooted, I haven't done this yet, so ignore it for the moment.
Last edited by ANOKNUSA (2013-08-28 01:06:10) -
[SOLVED] Hibernation fails
Hello
I have a laptop with Arch (Kernel 3.12.9-2) and KDE, and some problems with hibernation. After installation was working, using a swapfile, but i noticed it was too small, so I made a bigger one, and then it stopped working.
fstab entry seems ok, I have resume hook in mkinitcpio.conf and resume options in GRUB.
System log shows that PM can't find a swap area, both if I hibernate from KDE and terminal
feb 04 16:45:00 giulio kernel: PM: Cannot find swap device, try swapon -a.
feb 04 16:45:00 giulio kernel: PM: Cannot get swap writer
swapon -a gives no output, while swapon -s gives
/home/swapfile file 5242876 38324 0
Someone has any idea?
Last edited by giuliof (2014-02-08 12:00:46)frank604 wrote:Can you post the journalctl associated to the hibernate attempt?
Yes, was the log I posted in the first post:
feb 05 20:19:49 giulio kernel: PM: thaw of devices complete after 345.225 msecs
feb 05 20:19:49 giulio kernel: PM: writing image.
feb 05 20:19:49 giulio kernel: PM: Cannot find swap device, try swapon -a.
feb 05 20:19:49 giulio kernel: PM: Cannot get swap writer
feb 05 20:19:49 giulio kernel: PM: Basic memory bitmaps freed
feb 05 20:19:49 giulio kernel: Restarting tasks ... done. -
[solved] Plymouth fails with GDM
I am using plymouth-legacy from the AUR.
When I boot, the plymouth password prompt for my encrypted root partition comes up and I can enter the password. The next screen is the boot splash screen with the "spinfinity" spinning wheel. The screen flickers a few times but never goes away. Pressing escape shows the console that states the plymouth-quit-wait service failed. I can get to tty2 by pressing [Alt][F2] and login there. I think the plymouth-quit-wait service is actually working fine, but the problem is either gdm is failing or plymouth-quit is not running and plymouth-quit-wait times out waiting for something to happen. I am not really sure what the problem could be because it looks like (from the log below) that gdm has a problem with my graphics card, but it has no problem if plymouth isn't running.
Log snippet for plymouth-quit-wait service. (Full log pastebin below).
Sep 07 13:34:48 chrutabaga systemd[1]: plymouth-quit-wait.service start operation timed out. Terminating.
Sep 07 13:34:48 chrutabaga systemd[1]: Failed to start Wait for Plymouth Boot Screen to Quit.
-- Subject: Unit plymouth-quit-wait.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Unit plymouth-quit-wait.service has failed.
-- The result is failed.
Sep 07 13:34:48 chrutabaga systemd[1]: Unit plymouth-quit-wait.service entered failed state.
Log snippet for gdm failing. (Full log pastebin below).
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) intel(0): [drm] failed to set drm interface version: Permission denied [13].
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) intel(0): Failed to claim DRM device.
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE)
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) Backtrace:
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) 0: /usr/bin/Xorg.bin (xorg_backtrace+0x56) [0x593966]
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) 1: /usr/bin/Xorg.bin (0x400000+0x197b69) [0x597b69]
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) 2: /usr/lib/libc.so.6 (0x7faf3b2d8000+0x33df0) [0x7faf3b30bdf0]
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) 3: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7faf36524000+0x6f320) [0x7faf36593320]
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) 4: /usr/bin/Xorg.bin (xf86DeleteScreen+0x5a) [0x480c3a]
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) 5: /usr/bin/Xorg.bin (InitOutput+0xaf7) [0x47a2b7]
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) 6: /usr/bin/Xorg.bin (0x400000+0x3b67a) [0x43b67a]
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) 7: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7faf3b2f8000]
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) 8: /usr/bin/Xorg.bin (0x400000+0x25d0e) [0x425d0e]
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE)
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) Segmentation fault at address 0x7faf366fa7a6
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE)
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: Fatal server error:
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) Caught signal 11 (Segmentation fault). Server aborting
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE)
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE)
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: Please consult the The X.Org Foundation support
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: at http://wiki.x.org
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: for help.
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) Please also check the log file at "/dev/null" for additional information.
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE)
Sep 07 13:34:30 chrutabaga gdm-Xorg-:0[529]: (EE) Server terminated with error (1). Closing log file.
mkinitcpio.conf
MODULES="i915"
BINARIES=""
FILES=""
HOOKS="base udev plymouth autodetect mdadm_udev lvm2 plymouth-encrypt modconf block filesystems keyboard"
Full log pastebin.
Things I have tried:
Switch to tty2, log in and restart services as below in that order. This brings up gdm, and I can log in without any issue.
sudo systemctl start plymouth-quit
sudo systemctl restart plymouth-quit-wait
sudo systemctl restart gdm-plymouth
Use SLIM as a display manager. This works for some reason, but I don't want to use slim. (Off topic, but I use more than one desktop manager and slim doesn't do a great job with remembering my last session.)
Don't use a display manager. Plymouth boots fine to a console. There are no errors. I can then start gdm with no problem.
sudo systemctl start gdm
Using lightdm has the same result as gdm.
Using the gdm.service instead of gdm-plymouth.service has the same result.
I tried this thread. I don't have an nvidia card and the modified gdm-plymouth service didn't change anything.
I also followed this thread on the fedora forums, which advised moving /var/journal to /var/journal.org. That seems pretty bizarre but I tried it anyways. No effect for me.
Last edited by jkav77 (2014-09-08 23:30:00)markzz wrote:
flamusdiu wrote:I am the maintainer for the plymouth-legacy. I'll look into figuring out something. I don't use GDM though.
Doesn't matter if you don't use it, the package includes parts for GDM. Some testing for KDM or other login managers would be a good thing to do too.
I am aware of that. I don't have other login mangers installed but something changed between the two updates. As I said, I'll look into it. I know SLiM and LightDM work with this build. Let you know something soon. -
[SOLVED] Boot fails with "ata4: SRST failed (errno = -16)"
I have desktop that has four disks. They have similar three partitions sitting on RAID.
/boot and swap are on RAID1
/ is on RAID5.
This worked well until a couple of weeks ago I noticed I couldn't connect to it via SSH. I went onsite and the desktop was humming but I couldn't get picture on the screen and alt + sysrq + REISUB did nothing. I shut it down by pressing power button and started it again. It gave me following errors:
ata4: SRST failed (errno = -16)
After a while there was
reset failed, give up
I restarted the machine and went to BIOS. There was only two of four disks visible. I shut the computer down, removed the power cord and then plugged it back in. This time BIOS showed all the disks there. I tried to boot up Arch and got the following.
Booting the kernel.
running early hook [udev]
running hook [udev]
Triggering uevents
mounting '/dev/md3' on real root # md3 is the RAID 5 device containing root
mount: you must specify the filesystem type
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
After that I tried to chroot from USB installation disk. First I check the RAID devices and see that in md1 (/boot) all seems to be ok. In md2 (swap) half of the partitions are missing. I'm not sure how to interpret the last one.
cat /proc/mdstat
Personalities : [raid1]
md1: active raid1 sdd1[3] sdb1[1] sda1[0] sdc1[2]
1048564 block super 1.0 [4/4] [UUUU]
md2: active raid1 sdb2[1] sda2[0]
2096116 block super 1.2 [4/2] [UU__]
md3: inactive sdb3[1](S) sda3[0](S) sdd3[4](S) sdc3[2](S)
608169984 block super 1.2
unused devices: <none>
I remove those devices and try to recreate them. md1 says it starts with four drives. md2 starts with 2 driver out of 4. And then the last one.
mdadm --assemble /dev/md3 /dev/sd[a-d]3
mdadm: /dev/md3 assembled from 2 drives - not enough to start the array.
Has anyone any idea where did the two partitions go? I ran SMART-tests to all four drives in long mode and all of them passed the tests.
I use GPT partitioning table, UEFI and Syslinux if it matters.
Last edited by Tha-Fox (2013-02-23 01:35:05)I just booted to chroot environment and checked that all the partitions show up all right. Below is output of one disk and all the four disks give similar info.
gdisk -l /dev/sdd
GPT fdisk (gdisk) version 0.8.6
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdd: 312581808 sectors, 149.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 8B9EBB89-366E-4C81-8916-F61CB08273DB
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 312581774
Partitions wil be aligned on 2-sector boundaries
Total free space is 2203245 sectors (1.1 GiB)
Number Start (sector) End (sector) Size Code Name
1 34 2097185 1024.0 MiB FD00 Linux RAID
2 2097186 6291489 2.0 GiB FD00 Linux RAID
3 6291490 310378529 145.0 GiB FD00 Linux RAID -
Since some weeks back I cant seem to mount my eCryptfs stuff.
Usually I just mounted my lvmdrive and did a:
sudo mount /dev/sda1 /media/Olddrive;sudo ecryptfs-recover-private /media/Olddrive/home/.ecryptfs/user/.Private;sudo ecryptfs-recover-private /run/media/user/lvmdriveid/.ecryptfs/user/.Private
Hit y,y [password] repeat and there it was, truly bob was my uncle.
However, These days I get a:
Inserted auth tok with sig [key] into the user session keyring
mount: mount(2) failed: No such file or directory
What have changed?
*disclaimer: I might not be supersure about the exact " /media/Olddrive/home/.ecryptfs/user/.Private " as I fiddled a bit with it before I rebooted earlier today after a -Suy.
Last edited by danielpublic (2014-11-01 10:23:35)Forgot to update, in any case I managed to access my data through the old manual way.
cd /run/media/user/harddrive/.ecryptfs/user/.encryptfs
sudo ecryptfs-unwrap-passphrase ./wrapped-passphrase
sudo ecryptfs-add-passphrase --fnek
Inserted auth tok with sig [aaaaaaaaaaaaaaaa] into the user session keyring
Inserted auth tok with sig [bbbbbbbbbbbbbbbb] into the user session keyring
sudo mount -t ecryptfs /run/media/user/harddrive/home/.ecryptfs/user/.Private /media/mountdir
Used default settings execpt for:
Enable filename encryption (y/n) [n]: y
and of course inserted [bbbbbbbbbbbbbbbb] when asked:
Filename Encryption Key (FNEK) Signature [aaaaaaaaaaaaaaaa]: bbbbbbbbbbbbbbbb -
[solved] netcfg fails with no apparent reason
So, I'm trying to set up a very simple profile with netcfg:
CONNECTION='ethernet'
DESCRIPTION='ok'
INTERFACE='eth0'
IP='dhcp'
Here's what happens when I try to bring it up:
DEBUG: Loading profile eth0-dhcp
DEBUG: Configuring interface eth0
:: eth0-dhcp up
DEBUG: status reported to profile_up as:
DEBUG: Loading profile eth0-dhcp
DEBUG: Configuring interface eth0
DEBUG: ethernet_iproute_up ifup
> No connection
DEBUG: profile_up connect failed
[FAIL]
If I just do
sudo ifconfig eth0 up
sudo dhcpcd eth0
, the network works fine.
So, what might be the root of my problems with netcfg?
Last edited by popoffka (2012-04-03 11:46:12)How long does it take for the interface to come up when you do it manually?
Looking at what looks like the relevant lines of code (30-40) it could be a timeout issue, though not necessarily. You could manually try the commands issued in the scripts at that time.
Just thinking aloud as, if it is a bug, then any info will be useful and netcfg is/has just getting a new maintainer, I think. -
Hello, i recently started using systemd and followed the instructions given in the wiki. The problem is that systemd drops me on a terminal instead of starting kde. I was wondering if anyone knew how to fix this problem?
Right now I have to stop the systemd service from running ad start kdm as root to get into kde.
I have of course used the command
systemctl enable kdm.service
journalctl shows me this error
kdm[297]: X server died during startup
kdm[297]: X server for display :0 cannot be started, session disabled
Any help on this problem would be greatly appreciated. Thank you.Thank you for your reply. I found nothing interesting in xsession-errors, except for errors about inotify. I however found this in my Xorg.0.log
64.835] (**) NVIDIA(0): EDID frequencies has been enabled on all display
[ 64.835] (**) NVIDIA(0): devices.)
[ 137.664] [mi] EQ overflowing. Additional events will be discarded until existing events are processed.
[ 137.664]
[ 137.664] Backtrace:
[ 137.664] 0: /usr/bin/X (xorg_backtrace+0x36) [0x560366]
[ 137.664] 1: /usr/bin/X (mieqEnqueue+0x26b) [0x54161b]
[ 137.664] 2: /usr/bin/X (0x400000+0x47f92) [0x447f92]
[ 137.665] 3: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f8b1e831000+0x5f74) [0x7f8b1e836f74]
[ 137.665] 4: /usr/bin/X (0x400000+0x6efd7) [0x46efd7]
[ 137.665] 5: /usr/bin/X (0x400000+0x93370) [0x493370]
[ 137.665] 6: /usr/lib/libpthread.so.0 (0x7f8b257da000+0xf170) [0x7f8b257e9170]
[ 137.665] 7: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f8b1f37a000+0x8f22f) [0x7f8b1f40922f]
[ 137.665] 8: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f8b1f37a000+0x90126) [0x7f8b1f40a126]
[ 137.665] 9: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f8b1f37a000+0x117011) [0x7f8b1f491011]
[ 137.665] 10: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f8b1f37a000+0xb17b0) [0x7f8b1f42b7b0]
[ 137.665] 11: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f8b1f37a000+0x52ea90) [0x7f8b1f8a8a90]
[ 137.665] 12: /usr/bin/X (0x400000+0xf2119) [0x4f2119]
[ 137.665] 13: /usr/bin/X (0x400000+0xbb005) [0x4bb005]
[ 137.665] 14: /usr/bin/X (0x400000+0xbc35f) [0x4bc35f]
[ 137.665] 15: /usr/bin/X (0x400000+0xb94cc) [0x4b94cc]
[ 137.665] 16: /usr/bin/X (ConfigureWindow+0x378) [0x45d578]
[ 137.665] 17: /usr/bin/X (0x400000+0x2efd4) [0x42efd4]
[ 137.665] 18: /usr/bin/X (0x400000+0x34531) [0x434531]
[ 137.665] 19: /usr/bin/X (0x400000+0x23615) [0x423615]
[ 137.665] 20: /usr/lib/libc.so.6 (__libc_start_main+0xf5) [0x7f8b24686725]
[ 137.665] 21: /usr/bin/X (0x400000+0x238ed) [0x4238ed]
[ 137.665]
[ 137.665] [mi] These backtraces from mieqEnqueue may point to a culprit higher up the stack.
[ 137.665] [mi] mieq is *NOT* the cause. It is a victim.
[ 137.737] [mi] Increasing EQ size to 512 to prevent dropped events.
[ 137.737] [mi] EQ processing has resumed after 15 dropped events.
[ 137.737] [mi] This may be caused my a misbehaving driver monopolizing the server's resources.
I have no idea what is happening here. I have the latest nvidia driver from core. -
[Solved] Running mpd as user mpd with systemd without using mpd.conf
Maybe this is tivial, but I searched about an hour without any results. I want to run mpd as user mpd. I cant use the mpd config file since mpd set the UID and GID explicitely resulting in mpd not having the necessary supplementary groups to access the locally shared music on my pc. Well I tried to run mpd with systemd by
# systemctl start mpd
and the systemd contains the user mpd
$ cat /etc/systemd/system/default.target.wants/mpd.service
[Unit]
Description=Music Player Daemon
After=network.target sound.target
[Service]
User=mpd
ExecStart=/usr/bin/mpd --no-daemon
# allow MPD to use real-time priority 50
LimitRTPRIO=50
LimitRTTIME=-1
# move MPD to a top-level cgroup, as real-time budget assignment fails
# in cgroup /system/mpd.service, because /system has a zero real-time
# budget; see
# http://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/
ControlGroup=cpu:/mpd
# assign a real-time budget
ControlGroupAttribute=cpu.rt_runtime_us 500000
[Install]
WantedBy=default.target
but it did not run as mpd.
Well how can I run mpd as mpd? Is there a way to do it like with dropbox: dropbox@<user>.service
Last edited by manuelschneid3r (2015-03-25 12:52:52)Glad you solved it. Was just typing a response and I'll still add two remarks:
The ps|grep output showed that you run grep as root, not mpd itself (which won't have a space in the command -- the second time it only worked because the mpd group is preceded by a space).
It sounds like it took you a while to find the drop-in configuration snippet in the mpd.service.d directory. These drop-in are shown in `systemctl status`, which is something you'd normally check in situations like these, and that might help to discover them more quickly.
Last edited by Raynman (2015-03-25 12:58:36) -
[SOLVED] Test conversion to systemd - Help with iptables status
With all the discussion around systemd and with a move for systemd to [core] soon, I thought I would convert an arch laptop from initscripts to systemd and see how it worked.
I followed the advice on the arch wiki for systemd, having already moved the systemd compatible parameters out of rc.conf a while ago. After installing systemd and systemd-arch-units, and adding init=/bin/systemd to the boot kernel line the system booted up nicely with systemd - graphical login failed as the relevant unit is not enabled at that stage - so hitting return to get a login prompt and logging as root it was quick to enable graphical.target and kdm.service, and rebooting then gave me a normal kdm login screen and then a normal login to kde.
All fine at this point. (By the way total login time was just over 30 seconds for both initscripts and systemd) - then it was necessary to check which services were running - most were running by default under systemd including postfix, dovecot, and sound worked fine with a quick check on a browser for a video feed. Networking was working fine too.
However iptables which was previously working fine under initscripts was not running - I checked that the firewall rules file was intact which is was. Executing systemctl enable iptables.service appeared to be accepted but after executing systemctl start iptables.service and checking status again it was "exited" - the commands listed under the "start" command seemed normal and no error message appeared in the /var/log/messages file about iptables.
Can anyone suggest what is needed to get iptables working under systemd (yes I have read the wiki entries but nothing seemed to be relevant to fixing that particular issue).
Thanks in advance.
Last edited by mcloaked (2012-08-30 09:01:25)cfr wrote:
I think what you're seeing is normal. Does it give a 0 exit status?
The service is of type "oneshot". I *think* that means that it is expected to exit.
As I understand it, iptables is a bit like ipfw. It's in the kernel and the userspace tools just provide an interface to that. So there's no daemon to run.
You can tell if it has worked correctly by
iptables --list
to check that your rules have been loaded correctly.
Note: I hope somebody will quickly correct me if I'm wrong about this because I've been assuming this is the expected behaviour on my own machine!
Perfectly correct - I didn't think to check iptables --list but yes all the rules are there as they should be.
It would be nice to have this documented in the wiki under systemd to help anyone else coming across the same issue.
I will mark this as solved in the topic title - thank you for replying - it was very helpful (and stopped me continuing the search for a solution by googling!) -
[Solved] postgresql with systemd
Hello Guys,
I'm having problems starting the postgres with systemd.
Following errors:
Running systemctl start postgresql
k@archK ~ % sudo systemctl start postgresql
Job for postgresql.service failed. See 'systemctl status postgresql.service' and 'journalctl -xn' for details.
1 k@archK ~ %
Running systemctl status postgresql.service got the message below:
k@archK ~ % systemctl status postgresql.service
postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled)
Active: failed (Result: exit-code) since Sáb, 2012-12-29 19:09:19 BRT; 1min 19s ago
Process: 1746 ExecStart=/usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120 (code=exited, status=1/FAILURE)
Process: 1741 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/postgresql.service
3 k@archK ~ %
and journalctl -xn this:
k@archK ~ % sudo journalctl -xn
[sudo] password for k:
-- Logs begin at Sáb, 2012-12-29 03:47:42 BRT, end at Sáb, 2012-12-29 19:11:49 BRT. --
Dez 29 19:09:19 archK systemd[1]: postgresql.service: control process exited, code=exited status=1
Dez 29 19:09:19 archK systemd[1]: Failed to start PostgreSQL database server.
-- Subject: Unit postgresql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
-- Unit postgresql.service has failed.
-- The result is failed.
Dez 29 19:09:19 archK systemd[1]: Unit postgresql.service entered failed state
Dez 29 19:09:19 archK sudo[1738]: pam_unix(sudo:session): session closed for user root
Dez 29 19:11:27 archK udisks-daemon[430]: **** Refreshing ATA SMART data for /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
Dez 29 19:11:27 archK udisks-daemon[430]: helper(pid 1781): launched job udisks-helper-ata-smart-collect on /dev/sda
Dez 29 19:11:28 archK udisks-daemon[430]: helper(pid 1781): completed with exit code 0
Dez 29 19:11:28 archK udisks-daemon[430]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
Dez 29 19:11:49 archK sudo[1786]: k : TTY=pts/0 ; PWD=/home/k ; USER=root ; COMMAND=/usr/bin/journalctl -xn
Dez 29 19:11:49 archK sudo[1786]: pam_unix(sudo:session): session opened for user root by k(uid=0)
Here is the postgresql.service
[Unit]
Description=PostgreSQL database server
After=network.target
[Service]
Type=forking
TimeoutSec=120
User=postgres
Group=postgres
Environment=PGROOT=/var/lib/postgres
SyslogIdentifier=postgres
PIDFile=/var/lib/postgres/data/postmaster.pid
ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
# killing Postgres, so adjust it downward
OOMScoreAdjust=-200
[Install]
WantedBy=multi-user.target
and /etc/conf.d/postgresql
## Parameters to be passed to postgresql
## Default data directory location
PGROOT="/var/lib/postgres"
## Passed to initdb if necessary
INITOPTS="--locale en_US.UTF-8"
## Default log file location
#PGLOG="/var/log/postgresql.log"
## Additional options to pass via pg_ctl's '-o' option
#PGOPTS=""
Does anyone have any idea how to fix this?
Thanks.
Last edited by kleitonkk (2013-01-03 23:51:41)Sorry for the delay, was traveling and just returned yesterday.
lothar_m was followed as described in the post, since removed the packages twice and did the install again but the same error.
[root@archK conf.d]# systemctl start postgresql
Job for postgresql.service failed. See 'systemctl status postgresql.service' and 'journalctl -xn' for details.
[root@archK conf.d]#
systemctl status postgresql.service
➜ ~ systemctl status postgresql.service
postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled)
Active: failed (Result: exit-code) since Thu, 2013-01-03 18:14:43 BRT; 9min ago
Process: 10897 ExecStart=/usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120 (code=exited, status=1/FAILURE)
Process: 10892 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/postgresql.service
➜ ~
[root@archK conf.d]# journalctl -xn
-- Logs begin at Wed, 2013-01-02 16:50:57 BRT, end at Thu, 2013-01-03 18:34:41 BRT. --
Jan 03 18:25:28 archK su[11082]: pam_unix(su:session): session opened for user root by k(uid=1000)
Jan 03 18:34:36 archK systemd[1]: Starting PostgreSQL database server...
-- Subject: Unit postgresql.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/7d4958e842da4a758f6c1cdc7b36dcc5
-- Unit postgresql.service has begun starting up.
Jan 03 18:34:36 archK postgres[11127]: LOG: could not translate host name "localhost", service "5432" to address: Name or service not known
Jan 03 18:34:36 archK postgres[11127]: WARNING: could not create listen socket for "localhost"
Jan 03 18:34:36 archK postgres[11127]: FATAL: could not create any TCP/IP sockets
Jan 03 18:34:41 archK postgres[11127]: pg_ctl: could not start server
Jan 03 18:34:41 archK postgres[11127]: Examine the log output.
Jan 03 18:34:41 archK systemd[1]: postgresql.service: control process exited, code=exited status=1
Jan 03 18:34:41 archK systemd[1]: Failed to start PostgreSQL database server.
-- Subject: Unit postgresql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
-- Unit postgresql.service has failed.
-- The result is failed.
Jan 03 18:34:41 archK systemd[1]: Unit postgresql.service entered failed state
/usr/lib/systemd/system/postgresql.service
[Unit]
Description=PostgreSQL database server
After=network.target
[Service]
Type=forking
TimeoutSec=120
User=postgres
Group=postgres
Environment=PGROOT=/var/lib/postgres
SyslogIdentifier=postgres
PIDFile=/var/lib/postgres/data/postmaster.pid
ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
# killing Postgres, so adjust it downward
OOMScoreAdjust=-200
[Install]
WantedBy=multi-user.target
➜ ~ pacman -Q |grep postgres
postgresql 9.2.2-2
postgresql-libs 9.2.2-2
➜ ~
/etc/conf.d
## Parameters to be passed to postgresql
## Default data directory location
PGROOT="/var/lib/postgres"
## Passed to initdb if necessary
INITOPTS="--locale en_US.UTF-8"
## Default log file location
#PGLOG="/var/log/postgresql.log"
## Additional options to pass via pg_ctl's '-o' option
#PGOPTS=""
/usr/lib/systemd/system/postgresql.service
[Unit]
Description=PostgreSQL database server
After=network.target
[Service]
Type=forking
TimeoutSec=120
User=postgres
Group=postgres
Environment=PGROOT=/var/lib/postgres
SyslogIdentifier=postgres
PIDFile=/var/lib/postgres/data/postmaster.pid
ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
# killing Postgres, so adjust it downward
OOMScoreAdjust=-200
[Install]
WantedBy=multi-user.target
I'm still looking for how to solve.
Thank you. -
[SOLVED] samba does not start properly again -this time with systemd
Definitely no luck with this one...
So, today I've switched to a pure systemd init system, and noticed that I have this old issue again.
(Link to my old thread: https://bbs.archlinux.org/viewtopic.php?id=142704)
Samba doesn't start properly again, more precisely smbd is launched but not nmbd, so samba is not working as it should (for example smbtreee lists nothing).
Last time I've solved it by putting samba long before networkmanager in the daemons array, but with systemd I'm a bit confused...
Anyone has this issue?
Last edited by scar (2012-11-03 07:05:42)I think that nmbd isn't waiting for networkmanager to start on my system, because I'm getting journal entries like
Oct 31 00:47:21 spacebar winbindd[431]: [2012/10/31 00:47:21.556005, 0] param/loadparm.c:7969(lp_do_parameter)
Oct 31 00:47:21 spacebar systemd[1]: nmbd.service: main process exited, code=exited, status=1
Oct 31 00:47:21 spacebar systemd[1]: Unit nmbd.service entered failed state.
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> (eth0): carrier now ON (device state 20)
Oct 31 00:47:22 spacebar kernel: r8169 0000:03:00.0: eth0: link up
Oct 31 00:47:22 spacebar kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> (eth0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Auto-activating connection 'Static'.
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) starting connection 'Static'
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started...
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting...
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> (eth0): device state change: prepare -> config (reason 'none') [40 50 0]
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful.
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete.
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> (eth0): device state change: config -> ip-config (reason 'none') [50 70 0]
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Oct 31 00:47:22 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Commit) started...
Oct 31 00:47:22 spacebar rpc.mountd[462]: Version 1.2.6 starting
Oct 31 00:47:22 spacebar systemd[1]: Startup finished in 3s 850ms 155us (kernel) + 21s 279ms 972us (userspace) = 25s 130ms 127us.
Oct 31 00:47:23 spacebar NetworkManager[391]: <info> (eth0): device state change: ip-config -> activated (reason 'none') [70 100 0]
Oct 31 00:47:23 spacebar ntpd_intres[441]: DNS 0.au.pool.ntp.org -> 116.66.160.39
Oct 31 00:47:23 spacebar NetworkManager[391]: <info> Policy set 'Static' (eth0) as default for IPv4 routing and DNS.
Oct 31 00:47:23 spacebar NetworkManager[391]: <info> Activation (eth0) successful, device activated.
Oct 31 00:47:23 spacebar NetworkManager[391]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Commit) complete.
Oct 31 00:47:23 spacebar dbus[401]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Oct 31 00:47:20 spacebar smbd[428]: [2012/10/31 00:47:20.771872, 0] param/loadparm.c:7969(lp_do_parameter)
Oct 31 00:47:20 spacebar smbd[428]: Ignoring unknown parameter "user client driver"
Oct 31 00:47:20 spacebar smbd[428]: [2012/10/31 00:47:20.794252, 0] lib/interface.c:543(load_interfaces)
Oct 31 00:47:20 spacebar smbd[428]: WARNING: no network interfaces found
Oct 31 00:47:20 spacebar smbd[428]: [2012/10/31 00:47:20.805126, 0] smbd/server.c:1109(main)
Oct 31 00:47:20 spacebar smbd[428]: standard input is not a socket, assuming -D option
Oh, this started happening after putting a MUCH faster cpu and motherboard in the system, so maybe there's a race-condition there?
Last edited by MisterAnderson (2012-10-30 04:59:46) -
Howto suspend with systemd [SOLVED]
Hi All,
I have converted my machines to full systemd including some laptops. ... and am on the whole, very happy with systemd ..
I notice my daughter's laptop (a Samsung N70) sleeps and resumes just fine without any extra work from me ..
However, my Sony vaio laptop just reboots when I use the Gnome3 suspend menu item. Is there something else I can try to get it to suspend?
I presume the Gnome3 suspend is suspend and not hibernate to disk ..
NB: The samsung was installed from a fresh installation, where the Sony has been recently upgraded and converted to systemd.
Thanks,
B
Last edited by bmentink (2012-09-17 04:18:14)First of all, don't presume things - establish the facts. I have no experience with Gnome, so my advice would be to see if 'systemctl suspend' works in a terminal. If it does, then you need to make sure that's what Gnome uses. If it doesn't you have a more fundamental issue, and the information provided by the systemd journal will help you solve it.
-
I Have reinstalled itunes to solve a problem with Apple mobile support, but during install i get this message. Service 'Apple Mobile, ( Apple Mobile Device ) failed to start. Verify that you have sufficent privileges to start system services. I'd appreciate any help on this.
Thanks bluebanana 66Hi bluebanana 66,
Thanks for visiting Apple Support Communities.
There are a few reasons why you might receive this message after installing iTunes. You may need to verify that iTunes has been completely removed before trying to install again. See this article for the steps to completely remove and reinstall iTunes:
Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
http://support.apple.com/kb/ht1923
If the error message persists, see the "Additional troubleshooting" section of this article for some steps that can help solve it:
Trouble installing iTunes or QuickTime for Windows
http://support.apple.com/kb/ht1926
Best,
Jeremy -
Getting sasc-ng to work properly with systemd service files [SOLVED]
This thread is intended for getting the following AUR packages to work with each other with systemd service scripts:
https://aur.archlinux.org/packages/open-sasc-ng-dkms/
https://aur.archlinux.org/packages/open-sasc-ng/
https://aur.archlinux.org/packages/oscam-svn/ (this is a related package as it must properly execute prior to sasc-ng)
So my server is now on a fresh Arch install with systemd. All is well (& very fast) except I cannot get sasc-ng to function with systemd service init files. Prior to systemd the system worked fine with the rc initscripts & was very stable with the following setup:
rc.local
/etc/rc.d/oscam start
sleep 15
/etc/rc.d/sasc-ng start
sleep 4
/etc/rc.d/mythbackend start
/etc/conf.d/sasc-ng.conf
SASCNG_ARGS="-j 0:3 -j 1:4 -j 2:5" -b 16M --sid-allpid --sid-nocache --cam-budget"
DVBLOOPBACK_ARGS="num_adapters=3"
LOGDIR="/home/mythtv/logs/"
CAMDIR="/etc/camdir"
/etc/camdir/cardclient.conf
camd35:localhost:15050:1/0000/0000:mythtv:mythtv
I'll leave out the oscam stuff as that loads fine and doesn't appear to be a part of the problem
I've tried this with the systemd service file that comes with the open-sasc-ng-dkms package and when it was not sucessful I tried a bunch of variants including using "Type=simple" ect. "Type=Forked" seems to be only option that actually tries to start the processes. I also "hardcoded" the service files for the 2 sasc-ng components to find a few issues with the EnvironmentFile variables. The log variable has been removed for now as this seems to cause a fatal error but the rest of the variables load fine now. I also tested spliting up the DVB loopback module from the sasc-ng binary but this also gives similar results as the following script stands now. Running them manually with systemctl start commands doesn't make a difference but that is not surprising. The service file I'm fiddling with now which I feel has the best potential become working is:
sasc-ng.service
[Unit]
Description=Sasc-ng
After=oscam.service
[Service]
Type=forking
EnvironmentFile=/etc/conf.d/sasc-ng
ExecStartPre=/sbin/modprobe dvbloopback $DVBLOOPBACK_ARGS
TimeoutSec=2
ExecStart=/usr/sbin/sasc-ng -D $SASCNG_ARGS --cam-dir=$CAMDIR
TimeoutSec=4
[Install]
WantedBy=multi-user.target
Mythbackend always runs fine (even without DTV via sasc-ng) with the following mythbackend.service:
[Unit]
Description=MythTV_backend
After=sasc-ng.service
[Service]
Type=simple
Environment=MYTHCONFDIR=/etc/conf.d/mythbackend
Environment=HOME=/usr/share/mythtv
User=mythtv
ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv
[Install]
WantedBy=multi-user.target
oscam.service taken mostly from AUR package also seems fine. I added the TimeoutSec=15 to give time for oscam to load the SC and client protocol before moving on or else sasc-ng fails
Unit]
Description=An Open Source Conditional Access Module software
After=network.target
[Service]
Type=forking
EnvironmentFile=/etc/conf.d/oscam
ExecStart=/usr/bin/oscam $OSCAM_ARGS
TimeoutSec=15
[Install]
WantedBy=multi-user.target
Below is the output of the systemctl status commands. Despite the noise in the sasc-ng binary status, it is the loopback module that is " inactive (dead)" and there are no virtual DVB devices being created:
[mythtv@server ~]$ sudo systemctl status oscam.service
oscam.service - An Open Source Conditional Access Module software
Loaded: loaded (/usr/lib/systemd/system/oscam.service; enabled)
Active: active (running) since Tue, 2012-11-27 21:10:17 CET; 1min 7s ago
Process: 338 ExecStart=/usr/bin/oscam $OSCAM_ARGS (code=exited, status=0/SUCCESS)
Main PID: 377 (oscam)
CGroup: name=systemd:/system/oscam.service
├ 377 /usr/bin/oscam -b -c /etc/oscam
└ 378 /usr/bin/oscam -b -c /etc/oscam
Nov 27 21:10:17 server systemd[1]: Started An Open Source Conditional Acces...e.
[mythtv@server ~]$ sudo systemctl status loopback.service
loopback.service - Sasc-ng DVB Loopback Module
Loaded: loaded (/etc/systemd/system/loopback.service; enabled)
Active: inactive (dead) since Tue, 2012-11-27 21:10:28 CET; 1min 27s ago
Process: 907 ExecStart=/sbin/modprobe dvbloopback num_adapters=3 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/loopback.service
Nov 27 21:10:28 server systemd[1]: Started Sasc-ng DVB Loopback Module.
[mythtv@server ~]$ sudo systemctl status sasc-ng.service
sasc-ng.service - Sasc-ng
Loaded: loaded (/etc/systemd/system/sasc-ng.service; enabled)
Active: failed (Result: exit-code) since Tue, 2012-11-27 21:10:47 CET; 1min 45s ago
Process: 913 ExecStart=/usr/sbin/sasc-ng -D -j 0:3 -j 1:4 -j 2:5" -b 16M --sid-allpid --sid-nocache --cam-budget --cam-dir=/etc/camdir -l /home/mythtv/logs/sasc-ng.log (code=exited, status=0/SUCCESS)
Main PID: 921 (code=exited, status=255)
CGroup: name=systemd:/system/sasc-ng.service
Nov 27 21:10:39 server sasc-ng[921]: [921] [general.error] failed open /etc...ry
Nov 27 21:10:40 server sasc-ng[921]: [921] [general.error] failed open /etc...ry
Nov 27 21:10:40 server sasc-ng[921]: [921] [general.error] failed open /etc...ry
Nov 27 21:10:40 server sasc-ng[921]: [921] [general.info] loading cardclien...nf
Nov 27 21:10:42 server sasc-ng[921]: [1062] Netwatcher thread started (pid=...6)
Nov 27 21:10:42 server sasc-ng[921]: [921] [general.error] no keys loaded f...m!
Nov 27 21:10:46 server sasc-ng[921]: [1098] SC housekeeper thread started (...2)
Nov 27 21:10:47 server sasc-ng[921]: [1062] Netwatcher thread ended (pid=92...6)
Nov 27 21:10:47 server systemd[1]: sasc-ng.service: main process exited, co.../a
Nov 27 21:10:47 server systemd[1]: Unit sasc-ng.service entered failed state
[mythtv@server ~]$ sudo systemctl status sasc-ng.service
sasc-ng.service - Sasc-ng
Loaded: loaded (/etc/systemd/system/sasc-ng.service; enabled)
Active: failed (Result: exit-code) since Tue, 2012-11-27 21:10:47 CET; 2min 9s ago
Process: 913 ExecStart=/usr/sbin/sasc-ng -D -j 0:3 -j 1:4 -j 2:5" -b 16M --sid-allpid --sid-nocache --cam-budget --cam-dir=/etc/camdir -l /home/mythtv/logs/sasc-ng.log (code=exited, status=0/SUCCESS)
Main PID: 921 (code=exited, status=255)
CGroup: name=systemd:/system/sasc-ng.service
Nov 27 21:10:39 server sasc-ng[921]: [921] [general.error] failed open /etc/camdir/smartcard.conf: No such file or directory
Nov 27 21:10:40 server sasc-ng[921]: [921] [general.error] failed open /etc/camdir/cardslot.conf: No such file or directory
Nov 27 21:10:40 server sasc-ng[921]: [921] [general.error] failed open /etc/camdir/SoftCam.Key: No such file or directory
Nov 27 21:10:40 server sasc-ng[921]: [921] [general.info] loading cardclient config from /etc/camdir/cardclient.conf
Nov 27 21:10:42 server sasc-ng[921]: [1062] Netwatcher thread started (pid=921, tid=140074379712256)
Nov 27 21:10:42 server sasc-ng[921]: [921] [general.error] no keys loaded for softcam!
Nov 27 21:10:46 server sasc-ng[921]: [1098] SC housekeeper thread started (pid=921, tid=140074371319552)
Nov 27 21:10:47 server sasc-ng[921]: [1062] Netwatcher thread ended (pid=921, tid=140074379712256)
Nov 27 21:10:47 server systemd[1]: sasc-ng.service: main process exited, code=exited, status=255/n/a
Nov 27 21:10:47 server systemd[1]: Unit sasc-ng.service entered failed state
[mythtv@server ~]$
Any ideas?
Last edited by wdirksen (2012-12-10 19:54:43)After some head scratching it seems to be all good now. Considering there have been no replies to this I've come to wonder if I might be the only one with this issue. I could get it working somewhat using service files but never ideal, ex. sasc-ng only using a few of the entitlements from oscam because it started too quick etc. Anyway this might help a few and I'm hoping the linux savvy who find what I'm writing here painfully newbie like or flawed will reply and educate me a bit if what's provided here needs some sharpening up:
1) Systemd was confusing the sasc-ng binary shorthand arguments with Linux init arguments and a few were misinterpreted if they were not nested into the environment specifiers. So the -l (log) was causing problems and -b (buffer) wasn't loading. To be safe I'm using only the sasc-ng longhand specifiers from now on (two "--" and more verbose) so that they can never be confused even if safely nested in an environment parameter. That means that /etc/conf.d/sasc-ng will also need to be changed to reflect this. I also decided to simplify the LOGFILE parameter to include the whole argument syntax.
2) Oscam.service needs to be initiated with oneshot and RemainAfterExit=yes to make sure the delay (15 seconds in my config) gets counted out before sasc-ng initiates.
[EDIT 12/12/2012: Initially I had a second TimeoutSec=2 after ExecStart in sasc-ng.service but this had no function. Turns out that it almost always does work without this delay but not always with my setup. Adding TimeoutSec=2 to mythbackend.service prior to ExecStart command does function and makes things init more consistant]
sasc-ng.service
[Unit]
Description=Sasc-ng
After=oscam.service
[Service]
Type=simple
EnvironmentFile=/etc/conf.d/sasc-ng
ExecStartPre=/sbin/modprobe dvbloopback $DVBLOOPBACK_ARGS
TimeoutSec=2
ExecStart=/usr/sbin/sasc-ng $SASCNG_ARGS --cam-dir $CAMDIR --log $LOGFILE
[Install]
WantedBy=multi-user.target
/etc/conf.d/sasc-ng
SASCNG_ARGS="--join 0:3 --join 1:4 --join 2:5 --buffer 16M --sid-allpid --sid-nocache --cam-budget"
DVBLOOPBACK_ARGS="num_adapters=3"
LOGFILE="/home/mythtv/logs/sasc-ng.log"
CAMDIR="/etc/camdir"
oscam.service
[Unit]
Description=An Open Source Conditional Access Module software
After=network.target
[Service]
Type=oneshot
EnvironmentFile=/etc/conf.d/oscam
ExecStart=/usr/bin/oscam $OSCAM_ARGS
TimeoutSec=15
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
mythbackend.service
[Unit]
Description=MythTV_backend
After=sasc-ng.service
[Service]
Type=simple
TimeoutSec=2
Environment=MYTHCONFDIR=/etc/conf.d/mythbackend
Environment=HOME=/usr/share/mythtv
User=mythtv
ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv
[Install]
WantedBy=multi-user.target
I will make the related changes to the open-sasc-ng AUR package which I currently maintain
Last edited by wdirksen (2012-12-23 14:40:43)
Maybe you are looking for
-
No Lightroom Templates in Print Module Template Browser
I recently installed Lightroom 1.1 on a Windows XP Prof PC. Print/Template Browser/Lightroom Templates is empty, although other templates (e.g. Web) do appear when the appropriate module is selected. I looked for these templates on the Lighroom CD, b
-
Hello! Can i run the host command by WEBUTIL_HOST without promt window opening? And can i pass parameters to my java code that i run form WEBUTIL_HOST? Thanks!
-
ITunes 9.0 with Vista...where's the MS love Apple?!?
How could you release a brand new Super iTunes without even testing if it would install on Vista/XP? Surely the vast majority of iTunes users are on PCs. I've tried installing on two different Windows PCs in my home and it's a no-go. We can't spend m
-
Question about bootcamping windows 7
Hello everyone, i just received my macbook pro 13 inch (specs aren't important for my question) I am getting ready to do the whole boot-camp thing (please forgive any ignorance on my part, this is my first mac) i want Windows 7- home and student edit
-
I am trying to make space on my phone and itunes says i have 10gb of "documents and data". i dont know what this is and i want to get it off my phone