Plesk fails to restart services: control script doesn't exist or isn't executable

Follow

Comments

6 comments

  • Avatar
    Abraham Joseph

    Hi, 

    How to find the details of this bug - #PPPM-7414? I  mean, latest updates?

    Thanks!

  • Avatar
    Alexandr Tumanov

    @Abraham, bugfixes are listed in Plesk ChangeLog: https://docs.plesk.com/release-notes/onyx/change-log/ 

    This bug is not fixed yet.

  • Avatar
    Ansgar Smith

    @Alexandr,  Any updates on this issue? It's causing outages with new Plesk installations, though the temprorary fix works good for us. Would be good if it's fixed permanently

    Thank!

  • Avatar
    Anzhelika Khapaknysh (Edited )

    Hi @Ansgar Smith,

    In general, this bug is a systemd one - all OSes with systemd are affected.
    Links on the discussions are in the Cause section.

    The bug PPPM-7414 is created in order to track this issue in general.
    As the root cause is on the systemd side, Plesk cannot offer a permanent solution, but we created this workaround so our customers won't suffer from systemd bug.

    I recommend following this article, as we'll update it as soon as systemd bug is fixed.
    The Cause section has been modified in order not to confuse anymore.

  • Avatar
    Websavers Inc

    I like that the updated version of the cleanup_systemd_sessions script actually checks to ensure the session has not been active in the last 30 minutes, but shouldn't it be starting with a list of supposedly abandoned sessions like the previous version of it did? When I run that script, it kills my active SSHd session... clearly that was not abandoned and it also definitely was active in the last 30 minutes. Here's a modified version which merges the old and the new script by ensuring we're only terminating *abandoned* sessions which have not spawned processes in the past 30 minutes (rather than terminating all sessions which have not spawned processes in the past 30 minutes):

    #!/bin/sh
    # Removes leaked session scopes (PPPM-7414) # 

    # Close only sessions which did not spawn processes for 30 minutes
    LASTTASK=30

    systemctl list-units --state=abandoned --no-legend | tr -s ' ' | cut -d' ' -f 6,9 \
    | while read -r session username; do \
    user=$(id -u $username)
    tasklist="/sys/fs/cgroup/systemd/user.slice/user-${user}.slice/session-${session}.scope/tasks"
    if [ ! -s "$tasklist" ]; then
    if find "$tasklist" -type f -mmin +${LASTTASK} >/dev/null; then
    echo "Closing leaked session ${session} of user ${user}"
    loginctl terminate-session "$session" >&2
    fi
    fi
    done
  • Avatar
    Maxim Krasikov

    Hello @Websavers Inc !

    Thank you for paying our attention to it and providing the modified script.

    The article has been updated.

Please sign in to leave a comment.

Have more questions? Submit a request