ssh slowness and commands timing out

Asked by Amos on 2020-06-24

Ubuntu 18.04, the problem started on June 19.

It all began when I tried to ssh login and it took awhile. I started reading about it and I read that I should changed UseDNS to 'no' and restart the service. I then noticed that every command related to service... fails with a timeout error similar to the following: Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)'. Eventually I restarted the server but at some point, the problem started again. Today I restarted again only to experience the same thing, in few hours.

I have a VPS with Virtualmin, every now and then I update the packages and because of that problem, I checked and realized that I have systemd 237-3ubuntu10.41 and dbus 1.12.2-1ubuntu1.2 which are pretty old. No updates are available while there are new versions for those packages.

Also, not sure if related, when I restart the server, I see 'Failed to create /user.slice/user-1000.slice/user@1000.service/init.scope control group: Permission denied' and 'Failed to allocate manager object: Permission denied'. 1000 is the user I use instead of root.

After a restart the problem disappear until it happens again. What else can I check?
Is it related to the fact these are old packages (systemd/dbus)?
Thanks

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2020-06-28
Last reply:
2020-07-14

Are you using SELinux at all?

Amos (amosss) said : #3

Hi and thanks for the answer but

1. I don't use SELinux
2. I didn't find any reference to the errors I saw (timeout, freedesktop)
in the link you posted and also, this is not a container.

I did notice something: I use another user instead of root and I log in to
ssh using that user.
As posted previously, when the server restarts, I see an error regarding
failure with setting up the slice/account manager for this user (1000)
because of "permission denied".
If for example I do "service tomcat status", I get the timeout error, if I
do "sudo service tomcat status", it works. As if something is broken with
the user's "manager"(?). In syslog, I see several timeout errors. All other
operations seem to work fine.
Needless to say that in the past there was no such problem (started June
19, maybe after some packages update) and when restarting the server, it
works with no problem (until the problem returns).

Please advise, I think the root cause is the error I got about the account
manager. It is recommended to use a different user than root so I wonder
what can cause the error I wrote.
Thanks

On Sun, Jun 28, 2020 at 10:50 AM actionparsnip <
<email address hidden>> wrote:

> Your question #691514 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/691514
>
> Status: Needs information => Answered
>
> actionparsnip proposed the following answer:
> https://github.com/containers/libpod/issues/1226
>
> I found this. Might be similar
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/691514/+confirm?answer_id=1
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/691514
>
> You received this question notification because you asked the question.
>

Amos (amosss) said : #4

I now saw this:
https://unix.stackexchange.com/questions/493187/systemd-under-ubuntu-18-04-1-fails-with-failed-to-create-user-slice-serv/504688
It looks like ubuntu18.04 has systemd version 237 (see my first post here)
though there is a much newer version but not available to ubuntu.
version 237 is OLD, how come Ubuntu doesn't have a newer version available
as well?
Thanks

On Sun, Jun 28, 2020 at 11:49 AM MyBasket <email address hidden> wrote:

> Hi and thanks for the answer but
>
> 1. I don't use SELinux
> 2. I didn't find any reference to the errors I saw (timeout, freedesktop)
> in the link you posted and also, this is not a container.
>
> I did notice something: I use another user instead of root and I log in to
> ssh using that user.
> As posted previously, when the server restarts, I see an error regarding
> failure with setting up the slice/account manager for this user (1000)
> because of "permission denied".
> If for example I do "service tomcat status", I get the timeout error, if I
> do "sudo service tomcat status", it works. As if something is broken with
> the user's "manager"(?). In syslog, I see several timeout errors. All other
> operations seem to work fine.
> Needless to say that in the past there was no such problem (started June
> 19, maybe after some packages update) and when restarting the server, it
> works with no problem (until the problem returns).
>
> Please advise, I think the root cause is the error I got about the account
> manager. It is recommended to use a different user than root so I wonder
> what can cause the error I wrote.
> Thanks
>
>
> On Sun, Jun 28, 2020 at 10:50 AM actionparsnip <
> <email address hidden>> wrote:
>
>> Your question #691514 on Ubuntu changed:
>> https://answers.launchpad.net/ubuntu/+question/691514
>>
>> Status: Needs information => Answered
>>
>> actionparsnip proposed the following answer:
>> https://github.com/containers/libpod/issues/1226
>>
>> I found this. Might be similar
>>
>> --
>> If this answers your question, please go to the following page to let us
>> know that it is solved:
>> https://answers.launchpad.net/ubuntu/+question/691514/+confirm?answer_id=1
>>
>> If you still need help, you can reply to this email or go to the
>> following page to enter your feedback:
>> https://answers.launchpad.net/ubuntu/+question/691514
>>
>> You received this question notification because you asked the question.
>>
>

Because Ubuntu is not a rolling release distribution. If you report a bug and the bug and security fixes are significant then the package will be updated sooner rather than later. It is rare for Ubuntu to have the latest package versions in the repositories.

Amos (amosss) said : #6

OK, so assuming my last post, should I turn it into a bug to be fixed or am
I left on my own? :)
Thanks

On Sun, Jun 28, 2020 at 5:01 PM actionparsnip <
<email address hidden>> wrote:

> Your question #691514 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/691514
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> Because Ubuntu is not a rolling release distribution. If you report a
> bug and the bug and security fixes are significant then the package will
> be updated sooner rather than later. It is rare for Ubuntu to have the
> latest package versions in the repositories.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/691514/+confirm?answer_id=4
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/691514
>
> You received this question notification because you asked the question.
>

Manfred Hampl (m-hampl) said : #7

If you upgrade from Ubuntu 18.04 to Ubuntu 20.04, this will bring systemd version 245

Amos (amosss) said : #8

I'm bound to my VPS provider and the latest one is 18.04.
What are my options in this case? Trying (and hopefully won't fail) the
workaround or is there something that can be done from Ubuntu side?
Thanks

On Sun, Jun 28, 2020 at 5:35 PM Manfred Hampl <
<email address hidden>> wrote:

> Your question #691514 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/691514
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> If you upgrade from Ubuntu 18.04 to Ubuntu 20.04, this will bring
> systemd version 245
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/691514/+confirm?answer_id=6
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/691514
>
> You received this question notification because you asked the question.
>

Launchpad Janitor (janitor) said : #9

This question was expired because it remained in the 'Open' state without activity for the last 15 days.