timekpr-next fails to connect

Asked by reidun

Downloaded and installed timekpr-next and it starts but keeps saying failure to connect, whether or not I am running it as superuser (root)G.
Started it in the terminal as root and i got this output:

FAILED to obtain connection to timekpr.
Please check that timekpr daemon is working and You have sufficient permissions to access it (either superuser or timekpr group)
connection failed, 1 attempts left, will retry in 3 seconds

My system is:
Linux schoolcomputer 4.15.0-1-amd64 #1 SMP Debian 4.15.4-1~mx17+1 (2018-02-23) x86_64 GNU/Linux

I don't know how to check if the daemon is working.

Question information

Language:
English Edit question
Status:
Solved
For:
Timekpr-nExT Edit question
Assignee:
Eduards Bezverhijs Edit question
Solved by:
reidun
Solved:
Last query:
Last reply:
Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#1

Timekpr has 3 components: daemon, client and admin applications.
First of all check that daemon is working, that is: sudo systemctl status timekpr .
If not, please enable it and start it, that is sudo systemctl enable timepkr, sudo systemctl start timekpr .
If logs show that there is an error, please send me the /var/log/timekpr.log file.

I assume You downloaded and installed this manually as by default Debian does not have ppa's.
Did installer complained about issues/dependencies?

Revision history for this message
reidun (reidun76) said :
#2

You are correct, I downloaded this manually and installed with the GDebi package manager which did not complain at all about any dependencies. I have run the old original timekpr package for years on Debian and it has worked well, but this new one has features I'd love to access!

Followed your instructions above, and this is what I got:

root@applesauce:/home/applesauce# systemctl start timekpr
Failed to start timekpr.service: Unknown unit: timekpr.service
See system logs and 'systemctl status timekpr.service' for details.
root@applesauce:/home/applesauce# systemctl enable timekpr
Synchronizing state of timekpr.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable timekpr
root@applesauce:/home/applesauce# systemctl start timekpr
Failed to start timekpr.service: Unknown unit: timekpr.service
See system logs and 'systemctl status timekpr.service' for details.
root@applesauce:/home/applesauce# systemctl status timekpr.service
Failed to get properties: No such interface ''

/var/log/timekpr.log file is completely blank.

Thanks!

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#3

The new timekpr completely relies on systemd's login1 login manager.

From what I see, it might be that Your system does not use it and if it's so, new timekpr will not be usable on Your system.

But first we need to establish whether Your init is systemd, please check whether You have this directory, open terminal and run this: ls /run/systemd/system/

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#4

Have You checked whether You run systemd init or this is solved / non-issue anymore?

Revision history for this message
reidun (reidun76) said :
#5

Sorry it took me so long to get back to this. Here's the output I got from the above command.

$ ls /run/systemd/system/
ls: cannot access '/run/systemd/system/': No such file or directory

So, it looks like timekpr-next won't work with my system, correct?

Thanks for your help with this issue.

Revision history for this message
reidun (reidun76) said :
#6

I just checked and there is a systemd folder on my machine, but no system file in it.

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#7

Please run this, if it does not return anything, timekpr-next will not work on this particular installation.

dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep login1

Revision history for this message
reidun (reidun76) said :
#8

Thanks, here's the output:

$ dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep login1
      string "org.freedesktop.login1"

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#9

Hmm, that's interesting...

Can You please point me to installation image You used to install Your system?

It appears that systemd is not init for Your installation, but login1 is available... I need to check out what's the catch.

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#10

Btw, which version of timekpr-next are You using?

Revision history for this message
reidun (reidun76) said :
#11

Hi, The installation ISO would have been the last one in the list on this page:

https://sourceforge.net/projects/mx-linux/files/Old/MX-18.3/

It is over a year old now, and actually in researching this, I believe in the latest version they actually have timekpr-next in their repositories, so probably rather than you doing extra work for an old OS, what should actually happen is I should upgrade my system and all will be well.

But, for informational purposes, I found this in the user manual for the latest version of MX (found here: https://mxlinux.org/manuals/):

"1.7 Our positions
1.7.1 Systemd
Because the use of systemd as a system and service manager has been controversial, we want to
be clear about its function in MX Linux. Systemd is included by default but not enabled.
You can scan your MX system and discover files bearing systemd* names, but those simply
provide a compatibility hook/entrypoint when needed.
MX Linux uses systemd-shim, which emulates the systemd functions that are required to run the
helpers without actually using the init service. This means that SvsVinit remains the default init
yet MX Linux can use Debian packages that have systemd dependencies such as CUPS and
Network Manager. This approach also allows the user to retain the ability to choose his/her
preferred init at boot by clicking on "Advanced options" and selecting the systemd one. We can
not provide support for users who choose to run MX Linux using systemd. "

Also, the timekpr-next pkg I installed was this one:

timekpr-next-beta_0.2.5~ppa1~ubuntu1~ubuntu18.10.1_amd64.deb

Thanks for your help in this!

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#12

I tried installing timekpr-next (I used the latest beta: timekpr-next-beta_0.4.0~ppa1~ubuntu4~ubuntu18.04.1_amd64.deb) to MX Linux 18.3, it installs correctly as You already discovered.
And I can actually run timekpr daemon manually "sudo timekprd" and it works!

The issue seems to be that systemctl command does not do anything good, it spews out some errors about units / non existing interfaces / etc. as You discovered and that's it.
If You can get timekprd to run at system start, it will work fine, how to do that properly is a question to MX Linux community or MX Linux developers / members.

Revision history for this message
Thomas Friedrichsmeier (tfry) said :
#13

For what it's worth, I ran into apparently the same issue on a Ubuntu 22.04-based system.

$ systemctl start timekpr

failed silently: No error message, but no timekprd running, either. Starting timekprd, manually, worked. What fixed the issue for me was to mkdir the working directory mentioned in /etc/systemd/system/timekpr.service . I.e. for me that was

$ mkdir -p /usr/share/pyshared/timekpr

I suppose this may or may not be a distribution issue, but hope it helps.

Revision history for this message
Eduards Bezverhijs (mjasnik) said (last edit ):
#14

That seems to be a distribution issue, as original package contains completely different working directory.