Upgrade fails with polkitd error

  • Hi,


    today I upgraded my omv6 to omv7.


    It went the firt moment as expected but after a while I got


    Setting up polkitd (122-3) ...

    Failed to check if group polkitd already exists: Connection refused

    id: ‘polkitd’: no such user

    chown: invalid user: ‘polkitd:root’

    dpkg: error processing package polkitd (--configure):


    when you see this error: DON'T REBOOT


    I have no idea while installation of polkitd doesn't create the user (may be because the usual user-id was already used), before moving on you can simply create the user:


    addgroup --gid 901 polkitd

    adduser --uid 901 --ingroup polkitd polkitd --no-create-home --shell /sbin/nologin --home /nonexistent --disabled-password


    (of course take uid/gid not used on your system but should less than 1000)

    then run


    omv-upgrade

    omv-salt stage run deploy


    and everything should be fine and you can reboot safely ;) hope this helps somebody

  • chente

    Approved the thread.
    • Official Post

    The easier solution would be to uninstall polkitd. I'm not sure what you installed on your system to install it though.

    omv 7.7.9-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.6 | compose 7.6.6 | cterm 7.8.5 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.2


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I have no idea why the system tried to install/upgrade it. The problem here: when you once in such a situation you can't solve it without fixing the problem.


    I know its usually not part of omv install so just a hint. But uninstall it (and the dependencies) is a good idea in anyway.

  • hope this helps somebody

    Oh yes, it did! Thanks buddy, you saved my life.


    I really had the nerv to upgrade my main OMV NAS in location A, remotely from lcation B (in a different country), of course whiteout reading anything about this before doing it. Don't ask me why :D. Ok, Ok, both are running on a PI and I have cloned SD cards as backup, where someone could just replace it.


    Thanks!!!!

  • Thank you helped me too!

  • Hi,

    I did the upgrade from 6 to 7 too and I had the same issue with this polkitd error. I tried first the way from elektritter and create the missing group and user but after that I got the error "failed to start systemd-networkd-wait-online.service". I would like to uninstall polkitd now. What is the best way to do this especially to uninstall all dependencies too? I found this command but I'm careful with using commands which I don't understand:

    sudo apt-get -y autoremove --purge polkitd

    • Official Post

    There is no reason to "fix" polkitd. Just uninstall it. Never run that command though. It will automatically remove polkitd and all of its dependencies without prompting you. Just run sudo apt-get purge polkitd, don't answer yes, and post the output if you are worried about it.

    omv 7.7.9-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.6 | compose 7.6.6 | cterm 7.8.5 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.2


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I used your command "sudo apt-get purge polkitd" but I couldn't fix my issue "failed to start systemd-networkd-wait-online.service". Maybe polkitd is not the problem or should I answer yes after the command?


    Here is the output from the command above:

    Reading package lists... Done

    Building dependency tree... Done

    Reading state information... Done

    The following packages were automatically installed and are no longer required:

    libduktape207 libpolkit-agent-1-0 libpolkit-gobject-1-0 xml-core

    Use 'apt autoremove' to remove them.

    The following packages will be removed:

    pkexec* policykit-1* polkitd*

    0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.


    And this is the output from "systemctl status systemd-networkd-wait-online.service":

    systemd-networkd-wait-online.service -Wait for Network to be configured

    Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; enabled; present: disabled)

    Active: failed (Result: exit-code) since Sun 2024-07-21 21:25:21 CEST; 28s ago

    Docs: man:systemd-networkd-wait-online.service(8)

    Process: 255 ExecStart=/lib/systemd/systemd-networkd-wait-online.service (code=excited, status=1/FAILURE)

    Main PID: 255 (code=excited, status=1/FAILURE)

    CPU: 56ms


    After run "systemctl restart systemd-networkd-wait-online.service":

    polkit-agent-helper-1: pam_authenticate failed: Authentication failure


    This is the reason why I think that polkit is the problem

    • Official Post

    I used your command "sudo apt-get purge polkitd" but I couldn't fix my issue "failed to start systemd-networkd-wait-online.service". Maybe polkitd is not the problem or should I answer yes after the command?

    When you chop up the output trying to show me what you think is important, it is hard to tell what is going on. Yes, you can answer yes to the apt-get purge polkitd question.

    omv 7.7.9-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.6 | compose 7.6.6 | cterm 7.8.5 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.2


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I know that it is hard to help me with this few informations but I don't know what kind of output I should send you. Maybe I should step back to the beginning of the problem:

    I did the upgrade from omv6 to omv7 and used this guide RE: Is there a guide to in place upgrade?. After that I got the error polkitd error as it is mentioned above. After group and user creation like elektritter said I reboot the server. Now I couldn't find the server in my network (no ping answer). During boot I see now that there is the error "failed to start systemd-networkd-wait-online.service" and the hint to get more information with "systemctl status systemd-networkd-wait-online.service". The output of that is here:

    systemd-networkd-wait-online.service -Wait for Network to be configured

    Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; enabled; present: disabled)

    Active: failed (Result: exit-code) since Sun 2024-07-21 21:25:21 CEST; 28s ago

    Docs: man:systemd-networkd-wait-online.service(8)

    Process: 255 ExecStart=/lib/systemd/systemd-networkd-wait-online.service (code=excited, status=1/FAILURE)

    Main PID: 255 (code=excited, status=1/FAILURE)

    CPU: 56ms


    Now I removed polkitd by "sudo apt-get purge polkitd" but it doesnt't fix the problem. The output of "systemctl status systemd-networkd-wait-online.service" is very similar:

    systemd-networkd-wait-online.service -Wait for Network to be configured

    Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; enabled; preset: disabled)

    Active: failed (Result: exit-code) since Sun 2024-07-22 26:25:41 CEST; 15s ago

    Docs: man:systemd-networkd-wait-online.service(8)

    Process: 252 ExecStart=/lib/systemd/systemd-networkd-wait-online.service (code=excited, status=1/FAILURE)

    Main PID: 252 (code=excited, status=1/FAILURE)

    CPU: 55ms


    By the way, I use a raspberry pi 4.

    • Official Post

    I know that it is hard to help me with this few informations but I don't know what kind of output I should send you

    When I recommend a command, post all of the output including the command you typed. I need to see the output just like I was sitting there. It is hard to give too much info.

    Now I removed polkitd by "sudo apt-get purge polkitd" but it doesnt't fix the problem

    Did you remove anything else like the dependencies? sudo apt-get --purge autoremove

    omv 7.7.9-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.6 | compose 7.6.6 | cterm 7.8.5 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.2


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Now I removed the dependencies, too and I delete also user and group polkitd which I created before. The error is still the same. I attached two photos of my screen. I hope this helps a bit more.

    This is the status after boot:



    and after command "systemctl status systemd-networkd-wait-online.service":

  • Please, see this post (read the whole thread if you like, it's only 3 pages) on issues with the wait-network.service.


    Check how the NIC is named on omv-firstaid and on the OMV GUI.


    If you have it named different on both places, the trick is to delete it on the GUI but creating a new one with the same name that it's shown on omv-firstaid BEFORE applying the changes.


  • I could find a solution for my problem now. I used the omvfirstaid tool and configured the network interface again, After that the error was gone and I could connect to omv gui again. Thank you for your support and I hope that my way could help someone.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!