timekpr-next cannot be installed anymore on Ubuntu 20.04

Bug #1963762 reported by Alexander
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Timekpr-nExT
Invalid
Undecided
Eduards Bezverhijs

Bug Description

Until recently, the installation of timekpr-next has worked fine but now it fails.

To reproduce the error, run in a terminal

sudo apt-get install timkpr-next

the result is

Preparing to unpack .../timekpr-next_0.5.3-1ubuntu1~ppa1~ubuntu20.04.1_amd64.deb ...
Unpacking timekpr-next (0.5.3-1ubuntu1~ppa1~ubuntu20.04.1) ...
Setting up timekpr-next (0.5.3-1ubuntu1~ppa1~ubuntu20.04.1) ...
Checking and/or adding timekpr group to access functionality without superuser privileges
Cleaning up Timekpr-nExT compiled units
Enabling Timekpr-nExT systemd unit
Created symlink /etc/systemd/system/multi-user.target.wants/timekpr.service → /lib/systemd/system/timekpr.service.
Reloading dbus daemon to refresh access policies for Timekpr-nExT daemon
Reloading systemd to refresh unit for Timekpr-nExT
Starting Timekpr-nExT

where the installation stucks.

I tried to run timkpra manually. The result is

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, 5 attempts left, will retry in 3 seconds

uname -a gives

Linux server 5.4.0-54-lowlatency #60-Ubuntu SMP PREEMPT Fri Nov 6 11:28:21 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

There seems to be a bug

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

That's strange, can you upload /var/log/timekpr.log ?
Have you tried to reboot and then reinstall?

Changed in timekpr-next:
assignee: nobody → Eduards Bezverhijs (mjasnik)
Revision history for this message
Alexander (ak71vie) wrote :

the file /var/log/timekpr.log does not exist.

yes, I did reboot and then reinstall the app.

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote (last edit ):

Two minutes ago I was able to install timekpr-next in Ubuntu 20.04.4 VM without any problems at all.

I don't know what to suggest...
Can you try to uninstall existing version and download the package and install it manually using dpkg?

Some long time ago another user had this "installation stuck" problem too:
https://bugs.launchpad.net/timekpr-next/+bug/1893280

Althogh it was nothing related to timekpr, the solution surprised me, but it worked for him...

Revision history for this message
Alexander (ak71vie) wrote (last edit ):

I did that, and the result is the same. However, I noticed something. My ubuntu-box upgraded policykit to policykit-1:amd64(0.105-26ubuntu1.1, 0.105-26ubuntu1.2) recently.

Is there maybe any unresolved dependency?

Yes, I saw that bug: https://bugs.launchpad.net/timekpr-next/+bug/1893280. Unfortuntely, it does not work for me, as I don't have a Nvidia card.

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote (last edit ):

If there is an unresolved dependency, it should spit out some errors about that, but apparently, it does not.
And I think launchpad (package build services for Ubuntu) should not allow to build such a package too.

From what I can see, it actually hangs on the command:
systemctl start timekpr

When you try to install timekpr-next, can you open parallel terminal and check whether timekpr startup hangs on just the systemctl hangs.

Just: ps -ef | grep timek

If there is just systemctl command, try running timekpr server manually (just to verify it can start and there is no problem with DBUS):
sudo timekprd

After running it manually try to open admin application with (SU) at the front of application to verify that timekpr server is running.

Let's try to pinpoint what happens.

Revision history for this message
Alexander (ak71vie) wrote :

you are right, it hangs at "systemctl start timekpr".

systemctl status timekpr

timekpr.service - Timekpr-nExT daemon service
     Loaded: loaded (/lib/systemd/system/timekpr.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: file:/etc/timekpr/timekpr.conf

mar 06 15:30:01 server systemd[1]: Failed to start timekpr.service.
lines 1-6/6 (END)

ps -ef | grep timek

alex 88879 55454 0 17:39 pts/1 00:00:00 systemctl start timekpr
alex 88913 88906 0 17:40 pts/0 00:00:00 grep --color=auto timek

I opened as new window and typed sudo timekprd. It is working.

Now, I can open timekpra with superuser rights. Yes, it does work in manual mode.

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote (last edit ):

Ok, now we have to deal with systemctl command.
I do not have a "medicine" for this strange / unexpected hang, so we are experimenting here :)

When you install timekpr-next it will hang on starting during installation, just reboot at that point.

After reboot, check if timekpr has started, try checking processes: ps -ef | grep timek

Either way, next time you'll run update it will (most likely) complain that installation was not finished previously or smth like that, then, I think, it will offer to run "sudo dpkg --configure -a" or "sudo apt-get -f install" or smth like that... (I do not use ubuntu anymore and have forgotten about what it complains in that case exactly...)

Try running that, let's see whether it finishes then.

Revision history for this message
Alexander (ak71vie) wrote :

It works, great.

I rebooted the ubuntu box, and timekpr is working out of the box, this time.

Apparently, the solution to the problem is to manually start timekprd FIRST, and THEN to reboot. Otherwise, timekpra hangs again. Weird, but it works.

thank you very much

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

TBH, I'm not sure that is the solution, in fact I don't think timekpr has anything to do with this...

For some strange reason start of timekpr service hangs when installing it. If there is no logfile, timekpr was not started at all and your first "ps -ef ..." results shows that python service for timekpr has not even being started, which leads me to think that the systemctl command itself hangs somehow...

Your particular case is solved as that other case in bug 1893280, but it does not help nor explain why this happens or is it even possible to workaround that.

If could reproduce it somehow, it would be helpful, though :)

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

Can you share exact steps you took to solve this?
Did you had to do anything after you rebooted?
Did it complain about unfinished installation, if not, is it complaining about smth now if you run sudo apt-get update?

This may help someone in the future with similar strange situation.
Thanks.

Revision history for this message
Alexander (ak71vie) wrote :

I did as I said: I rebooted the ubuntu machine, opened sudo timekpra, and it works for strange reasons.

systemctl status timekpr

timekpr.service - Timekpr-nExT daemon service
     Loaded: loaded (/lib/systemd/system/timekpr.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-03-07 18:33:34 CET; 2h 9min ago
       Docs: file:/etc/timekpr/timekpr.conf
   Main PID: 1995 (timekprd)
      Tasks: 3 (limit: 18946)
     Memory: 19.3M
     CGroup: /system.slice/timekpr.service
             └─1995 /usr/bin/python3 /usr/lib/python3/dist-packages/timekpr/server/timekprd.py /usr/bin/timekprd

mar 07 18:33:34 server systemd[1]: Started Timekpr-nExT daemon service.

ps -ef | grep time*

root 1995 1 0 18:33 ? 00:00:15 /usr/bin/python3 /usr/lib/python3/dist-packages/timekpr/server/timekprd.py /usr/bin/timekprd
alex 3138 2741 0 18:34 ? 00:00:00 /usr/libexec/gsd-datetime
alex 3180 2993 0 18:34 ? 00:00:05 /usr/bin/python3 /usr/lib/python3/dist-packages/timekpr/client/timekprc.py /usr/bin/timekprc
alex 36390 3923 0 20:44 pts/0 00:00:00 grep --color=auto time*

no, I did not do sudo apt-get update after timekpr has hung up. Anyhow, thank you again.

Changed in timekpr-next:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.