Skip to main content
Topic: SOLVED: atd not functioning (Read 842 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SOLVED: atd not functioning

This is what i have installed:
Code: [Select]
local/at 3.2.2-1.1
    AT and batch delayed command scheduling utility and daemon
local/at-s6 20210918-1 (s6-galaxy)
    s6-rc service scripts for at

And just for the hell of it:
Code: [Select]
craig@lemur4:~$ uname -a
Linux lemur4 5.15.5-artix1-1 #1 SMP PREEMPT Fri, 26 Nov 2021 10:52:14 +0000 x86_64 GNU/Linux

The state of things:

Code: [Select]
craig@lemur4:~$ sudo s6-svstat /run/service/atd-srv
down (exitcode 0) 154585 seconds, ready 154585 seconds

Code: [Select]
craig@lemur4:~$ ps -ef |grep atd
root     21725     1  0 Dec15 ?        00:00:00 s6-supervise atd-log
root     21726     1  0 Dec15 ?        00:00:00 s6-supervise atd-srv
root     21749     1  0 Dec15 ?        00:00:00 s6-supervise statd-log
root     21750     1  0 Dec15 ?        00:00:00 s6-supervise statd-srv
craig    25587 12743  0 09:49 pts/2    00:00:00 grep -s atd

Code: [Select]
craig@lemur4:~$ sudo s6-svstat /run/service/atd-srv
down (exitcode 0) 149044 seconds, ready 149044 seconds
craig@lemur4:~$ sudo s6-svc -r /run/service/atd-srv
craig@lemur4:~$ sudo s6-svstat /run/service/atd-srv
down (exitcode 0) 149049 seconds, ready 149049 seconds

I was doing a 'tail -f /var/log/everything.log' as i ran the immediately above commands and no output was produced.
There is also no '/var/log/atd' file, which is mentioned in '/etc/s6/sv/atd-log/run'.

I am able to queue jobs (e.g. echo 'touch it-worked'|at NOW + 1 minute).  I can list the job, remove the job...
but the job never runs and never goes away (after it should have run).

Re: atd not functioning

Reply #1
This sounds silly but did you ever start atd? It works normally here.
Code: [Select]
$ sudo s6-rc -u change atd
$ sudo s6-svstat /run/service/atd-srv
up (pid 21425) 18 seconds

Re: atd not functioning

Reply #2
Hold on this.  I just noticed that the postgresql server, which had been running, no longer was.  Checking stat, running and checking stat again, gives exact same output (except different service) as i copied above, for atd-srv.  I tried to reboot, but it hung without rebooting.  Hitting ctrl-alt-del was giving some message on the console, but i can't remember what it was.  I held the power button, and when it came back up i got:

   [Service] crashed too many times.
   It's autorestart has been disabled until next login.

For: Panel/PolicyKit Handler/Desktop/Global Keyboard Shortcuts/Notification Daemon/Power Management

I was able to get to the console after this and did a 'shutdown -r'.  This time, the desktop came up, but the atd & postgresql services are not running.  I'm sure (?) they're supposed to start automatically, right?

So i don't know what's going on.  I'm investigating the log files now.

Re: atd not functioning

Reply #3
Replying to Dudemanguy:

Code: [Select]
craig@lemur4:~$ sudo s6-rc -u change /run/service/postgresql-srv/
s6-rc: fatal: /run/service/postgresql-srv/ is not a recognized identifier in /run/s6-rc/state/resolve.cdb
craig@lemur4:~$ sudo s6-rc -u change /run/service/atd-srv/
s6-rc: fatal: /run/service/atd-srv/ is not a recognized identifier in /run/s6-rc/state/resolve.cdb


Re: atd not functioning

Reply #5
The only thing i see in /var/log/everything.log, on the 2nd reboot (that at least got me to a desktop) that looks (to my relatively ignorant eye) problematic is:

Quote
Dec 17 12:20:55 lemur4 rpc.statd[5611]: Failed to register (statd, 1, udp): svc_reg() err: RPC: Remote system error - Connection refused
Dec 17 12:20:55 lemur4 rpc.statd[5611]: Failed to register (statd, 1, tcp): svc_reg() err: RPC: Remote system error - Connection refused
Dec 17 12:20:55 lemur4 rpc.statd[5611]: Failed to register (statd, 1, udp6): svc_reg() err: RPC: Remote system error - Connection refused
Dec 17 12:20:55 lemur4 rpc.statd[5611]: Failed to register (statd, 1, tcp6): svc_reg() err: RPC: Remote system error - Connection refused
Dec 17 12:20:55 lemur4 rpc.statd[5611]: failed to create RPC listeners, exiting

I will add one piece of possibly important information.  I noticed on the first (all services failing to start) reboot, when i got to the console, an error emanating from my '.bash_mpv' file, which '.bash_aliases' sources -- which gets sourced from .profile or .bashrc or somewhere (trust me).  The offending lines were:

Code: [Select]
MPV_TMP_DIR=/tmp/mpv-rand
alias rmplaying="rm $(cat ${MPV_TMP_DIR}/track-lastPlayed)"

This alias definition fails because, on reboot, /tmp/mpv-rand has been wiped out.  I didn't realize the 'cat' in this alias was evaluated during the evaluation of the alias command itself.  Not what i wanted.  Maybe single instead of double quotes would work.  Anyway, before rebooting the 2nd time, i fixed this by just checking whether the directory existed and if not created it, before the above lines.  The only relevance of this is if this error is what caused all the services to fail on the first reboot.
It sounds far-fetched to me, but... since the next reboot started those (above) services ok... at least there were no error dialogs popping up one after the other...  Although other services (my problem) are not running (failing as indicated in previous post).

Re: atd not functioning

Reply #6
strajder's suggestion... works.  My bad.  I was moving between one screen and another and didn't notice that i was copying the wrong thing.  This starts both services... and they work.

I don't know what happened that suddenly the postgresql server was no longer running, when it had been.  I never did manually start 'atd', so that could explain that.  Then the initial reboot failed horribly (possible reason suggested).

Everything seems ok now but... aren't these services supposed to start by themselves?


Re: atd not functioning

Reply #8
Everything seems ok now but... aren't these services supposed to start by themselves?

Definitely no. If you want services to automatically start, you should add them to the default bundle. Check the Artix wiki if you do not know how to do that.

Re: atd not functioning

Reply #9
No.

Todo: this should probably be put in some Q&A or a wiki page.

Wow!  I find this surprising.  s6 has a database where these services are registered.  And yet it doesn't automatically start them?   I can hardly believe it.  (No, of course i believe you, but...)

Back in the day of sysv init, everything that was in /etc/init/<runlevel>  [iirc] was started automatically.  All the files in this directory are essentially equivalent to all the services in the s6 database, it seems to me.  And yet there is nothing that starts them automatically?  (No, i believe you, but...)

I've been looking at the entries in the "Session Settings" menu/app, "Autostart" tab.  These all seem to be hooked into .desktop files.  The first two items here ("Conman UI Setup" and "ConnMan GTK") have .desktop files that reference non-existent (on my system) executables, as does another entry, "vncsession" (why are these entries even here?)  So, to add something here, i need to create a ".desktop" file and then add that?  (Just as a note,  the postgresql packages, for example, do not provide any ".desktop" file.)  I've never run a system that didn't automatically start services for apps that i've installed, as part of the setup of the app.
So i'm looking for guidance as to how this is supposed to be handled.  Another question: is this non-starting of services equally true for runit, dinit, openrc, etc...?  I'm still not decided if i want to go with s6 when i install Artix on my main laptop.

Also, there's a "User folders update" item in the "Autostart" tab which i turned off very early on.  I didn't know what it did, but i dislike these background processes that are constantly "indexing" my filesystem... and this is what i imagined it might be doing.  Now i'm wondering whether turning this off can screw up the maintenance of menu items, or something, when installing new apps?

Also, looking at the "Basic Settings" tab in this same ("LXQt Session Settings") menu dialog, i see that the last LXQt Module listed is "Runner".  Looking this up ( https://github.com/lxqt/lxqt-runner ) i see what it's supposed to do.  Starting and stopping this, i see the "lxqt-runner" process appear and disappear.  But right-clicking on the Desktop, this app seems to do nothing.  ???

More questions to follow... in a new posting. 8)

Re: atd not functioning

Reply #10
Just saw Dudemanguy's response, so i was on the wrong track looking at "Session Settings"/"Autostart".
Thanks... that's *much* better than what i was thinking.

Re: atd not functioning

Reply #11
wrt  lxqt-runner... somehow i misinferred how it was activated.
But now i see:

"... brings up the GUI when a configured keyboard shortcut is hit."

Which leads directly to my next posting.

Re: atd not functioning

Reply #12
Which was going to be, how to configure "Shortcut Keys" since every time i went into the "Global Actions Manager" (which was completely empty of keybindings) i could do *nothing*.   But going there just now (after a reboot) it is fully populated.  Great!
But my system has been acting quite flaky for reasons i have no clue about.