motd-news.timer trigger motd-news.service even if disable

Bug #2022825 reported by Nadav Levi Yahel
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
base-files (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Hello, guys, how are you?
I notice motd-news.timer activate motd-news.service even when motd-new.service disable.

I follow this doc's from UBUNTU:
https://ubuntu.com/legal/motd

/etc/default/motd-news has an ENABLED=1 setting that to 0 for disable.

It's not working too…

When you reboot the server and put
sudo systemctl status motd-news.service

Service look dead. (disable)
but he got trigger by motd-news.timer after 10 - 20 minutes (screenshot):
https://ibb.co/yXTpzGq

if you look on the screenshot, you will see:
TriggeredBy: ● motd-news.timer

I can disable the motd-news.timer service, but i don't know if it will affect other services of UBUNTU.
Anyway It's still a bug, even if i disable the timer service, it's not should be this way.

Happened on 2 Different machines of UBUNTU 22.04 (Google Cloud Platform)

Be happy for your recommendation before i disable the motd-new.timer with systemctl.

Revision history for this message
Steve Langasek (vorlon) wrote :

The /etc/default/motd-news file is read by the /etc/update-motd.d/50-motd-news script which is launched by motd-news.service. It is normal that setting the option in this file will not stop motd-news.service from running - however, it makes the script a no-op that does not access the network.

Are you seeing the motd-news.service access the network and make changes to files when ENABLED=0 is set? This is what is guaranteed by https://ubuntu.com/legal/motd.

You are free to disable the timer service as well if that is your preference. The documentation tells users how to disable the service without having to know systemd service interfaces.

Changed in base-files (Ubuntu):
status: New → Incomplete
Revision history for this message
Nadav Levi Yahel (nadav123) wrote :

When you disable it like UBUNTU says:
https://ubuntu.com/legal/motd.

Its not working , and modt keep getting errors when i run commend "systemctl status"

But when i disable the timer, issue get solved, and systemctl not showing units faild.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for base-files (Ubuntu) because there has been no activity for 60 days.]

Changed in base-files (Ubuntu):
status: Incomplete → Expired
Steve Langasek (vorlon)
Changed in base-files (Ubuntu):
status: Expired → New
Revision history for this message
Steve Langasek (vorlon) wrote :

> Its not working , and modt keep getting errors when i run commend "systemctl status"

I cannot reproduce this. What was the exact error?

Every Ubuntu Desktop system by default has /etc/update-motd.d/50-motd-news and /lib/systemd/system/motd-news.timer installed, but does not have /etc/default/motd-news so it is disabled by default, and no one is reporting problems with units being in an error state.

I have tested in an Ubuntu 22.04 lxd container, which also has /etc/default/motd-news by default; changing it to ENABLED=0 and running 'systemctl start motd-news.timer' does not result in any error state. Nor does rebooting the system.

Changed in base-files (Ubuntu):
status: New → Incomplete
Revision history for this message
Nadav Levi Yahel (nadav123) wrote :

the unit fall down after 20 - 30 minutes.
it happend to me with 3 machines on google cloud (e2-machines)

i actully disable it with systemctl.

this topic before long time.

but i sure you can reproduce it.

Here in the screen shot you see the unit is faild:
https://ibb.co/yXTpzGq

Revision history for this message
Tong Sun (suntong001) wrote :

> The documentation tells users how to disable the service without having to know systemd service interfaces.

Which is:

> /etc/default/motd-news has an ENABLED=1 setting that if set to 0 will turn off this functionality.

And this is not working, as reported by Nadav.
My modt keep getting errors when i run commend "systemctl status" too. Mine is:

$ sudo systemctl status motd-news.service
à motd-news.service - Message of the Day
     Loaded: loaded (/lib/systemd/system/motd-news.service; static)
     Active: failed (Result: exit-code) since Sun 2023-09-24 12:40:01 EDT; 6h ago
TriggeredBy: â motd-news.timer
       Docs: man:update-motd(8)
    Process: 375394 ExecStart=/etc/update-motd.d/50-motd-news --force (code=exited, status=203/EXEC)
   Main PID: 375394 (code=exited, status=203/EXEC)
        CPU: 9ms

Sep 24 12:40:01 lplat systemd[1]: Starting Message of the Day...
Sep 24 12:40:01 lplat systemd[375394]: motd-news.service: Failed to locate executable /etc/update-motd.d/50-motd-news: Permission>
Sep 24 12:40:01 lplat systemd[375394]: motd-news.service: Failed at step EXEC spawning /etc/update-motd.d/50-motd-news: Permissio>
Sep 24 12:40:01 lplat systemd[1]: motd-news.service: Main process exited, code=exited, status=203/EXEC
Sep 24 12:40:01 lplat systemd[1]: motd-news.service: Failed with result 'exit-code'.
Sep 24 12:40:01 lplat systemd[1]: Failed to start Message of the Day.

$ sudo journalctl -u motd-news.service
Aug 17 16:57:01 . systemd[1]: Starting Message of the Day...
Aug 17 16:57:01 . systemd[1]: motd-news.service: Main process exited, code=exited, status=203/EXEC
Aug 17 16:57:01 . systemd[1]: motd-news.service: Failed with result 'exit-code'.
Aug 17 16:57:01 . systemd[1]: Failed to start Message of the Day.
Aug 18 01:35:30 . systemd[52283]: motd-news.service: Failed to locate executable /etc/update-motd.d/50-motd-news: Permission denied
Aug 18 01:35:30 . systemd[1]: Starting Message of the Day...
Aug 18 01:35:30 . systemd[52283]: motd-news.service: Failed at step EXEC spawning /etc/update-motd.d/50-motd-news: Permission denied
Aug 18 01:35:30 . systemd[1]: motd-news.service: Main process exited, code=exited, status=203/EXEC
Aug 18 01:35:30 . systemd[1]: motd-news.service: Failed with result 'exit-code'.
Aug 18 01:35:30 . systemd[1]: Failed to start Message of the Day.
. . .

$ ls -l /etc/update-motd.d/50-motd-news
-rw-r--r-- 1 root root 5023 2021-10-15 06:06 /etc/update-motd.d/50-motd-news

How did you disable the timer, Nadav?

Revision history for this message
Nadav Levi Yahel (nadav123) wrote : Re: [Bug 2022825] Re: motd-news.timer trigger motd-news.service even if disable
Download full text (4.9 KiB)

*I turn off the ¨timer¨ service and the ¨news¨ service.*
*i disable them with systemctl:*

*systemctl disable "the services"*

*then i stop to get the error.*

*the method you show me is not working, i try that as well.*

*It was a long time ago, I already solved this issue a couple of
months ago.*

*Regards,*
Nadav Levi Yahel
*Locksmith Unit®*
_________________________________________________

*CLICK ON A FLAG | REVIEW US ON GOOGLE MAPS*
<https://g.page/r/CaiAkZeJxAEkEBE/review>
<https://g.page/r/CcZesG1JrYJUEBM/review>
_________________________________________________
*SPAIN (EU):+34-676-384-043 | FLORIDA (US): +1-407-267-5817*

<https://locksmithunit.com/> <https://locksmithunit.cat/>
<https://locksmithunit.es/>
_________________________________________________
*FIND US ON SOCIAL MEDIA | LOCKSMITH UNIT®*

<https://www.instagram.com/locksmith_unit/>
<https://www.facebook.com/locksmithunit>
<https://www.youtube.com/locksmith-unit>

On Mon, Sep 25, 2023 at 1:40 AM Tong Sun <email address hidden> wrote:

> > The documentation tells users how to disable the service without
> having to know systemd service interfaces.
>
> Which is:
>
> > /etc/default/motd-news has an ENABLED=1 setting that if set to 0 will
> turn off this functionality.
>
> And this is not working, as reported by Nadav.
> My modt keep getting errors when i run commend "systemctl status" too.
> Mine is:
>
>
> $ sudo systemctl status motd-news.service
> Ã motd-news.service - Message of the Day
> Loaded: loaded (/lib/systemd/system/motd-news.service; static)
> Active: failed (Result: exit-code) since Sun 2023-09-24 12:40:01 EDT;
> 6h ago
> TriggeredBy: â motd-news.timer
> Docs: man:update-motd(8)
> Process: 375394 ExecStart=/etc/update-motd.d/50-motd-news --force
> (code=exited, status=203/EXEC)
> Main PID: 375394 (code=exited, status=203/EXEC)
> CPU: 9ms
>
> Sep 24 12:40:01 lplat systemd[1]: Starting Message of the Day...
> Sep 24 12:40:01 lplat systemd[375394]: motd-news.service: Failed to locate
> executable /etc/update-motd.d/50-motd-news: Permission>
> Sep 24 12:40:01 lplat systemd[375394]: motd-news.service: Failed at step
> EXEC spawning /etc/update-motd.d/50-motd-news: Permissio>
> Sep 24 12:40:01 lplat systemd[1]: motd-news.service: Main process exited,
> code=exited, status=203/EXEC
> Sep 24 12:40:01 lplat systemd[1]: motd-news.service: Failed with result
> 'exit-code'.
> Sep 24 12:40:01 lplat systemd[1]: Failed to start Message of the Day.
>
> $ sudo journalctl -u motd-news.service
> Aug 17 16:57:01 . systemd[1]: Starting Message of the Day...
> Aug 17 16:57:01 . systemd[1]: motd-news.service: Main process exited,
> code=exited, status=203/EXEC
> Aug 17 16:57:01 . systemd[1]: motd-news.service: Failed with result
> 'exit-code'.
> Aug 17 16:57:01 . systemd[1]: Failed to start Message of the Day.
> Aug 18 01:35:30 . systemd[52283]: motd-news.service: Failed to locate
> executable /etc/update-motd.d/50-motd-news: Permission denied
> Aug 18 01:35:30 . systemd[1]: Starting Message of the Day...
> Aug 18 01:35:30 . systemd[52283]: motd-news.service: Failed at step EXEC
> spawning /etc/update-motd.d/50-motd-news: Permission denied
> Aug ...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for base-files (Ubuntu) because there has been no activity for 60 days.]

Changed in base-files (Ubuntu):
status: Incomplete → Expired
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.