MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.51k stars 1.27k forks source link

Having problems enabling MycroftAI on boot in Ubuntu 21.04 #2993

Closed Alias001 closed 3 years ago

Alias001 commented 3 years ago

I followed these directions

Start Mycroft on boot You could create a mycroft service to get Mycroft automatic started on boot. For this create a file named /etc/systemd/system/mycroft.service with the following content: [Unit] Description=Mycroft AI After=pulseaudio.service

[Service] User=pi WorkingDirectory=/home/pi/ ExecStart=/home/pi/mycroft-core/bin/mycroft-start all ExecStop=/home/pi/mycroft-core/bin/mycroft-stop Type=forking Restart=no

[Install] WantedBy=multi-user.target Please modify WorkingDirectory and User to your needs. Reload the unit files with sudo systemctl daemon-reloadand then, enable the new created service with sudo systemctl enable mycroft.service . You could start Mycroft by running sudo systemctl start mycroft.service stop it by sudo systemctl stop mycroft.service and get the status by typing sudo systemctl status mycroft.service.

With updating the Working Directory and User to my system it looks like this.

[Unit] Description=Mycroft AI After=pulseaudio.service

[Service] User=alias001 WorkingDirectory=/home/alias001/ ExecStart=/home/alias001/mycroft-core/bin/mycroft-start all ExecStop=/home/alias001//mycroft-core/bin/mycroft-stop Type=forking Restart=no

[Install] WantedBy=multi-user.target

Then I try:

root@alias001-Nobilis:~# systemctl daemon-reload

root@alias001-Nobilis:~# systemctl start mycroft.service Job for mycroft.service failed because the control process exited with error code. See "systemctl status mycroft.service" and "journalctl -xe" for details.

root@alias001-Nobilis:~# systemctl status mycroft.service ● mycroft.service - Mycroft AI Loaded: loaded (/etc/systemd/system/mycroft.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2021-09-03 21:33:33 PDT; 14s ago Process: 53546 ExecStart=/home/alias001/mycroft-core/bin/mycroft-start all (code=exited, status=1/FAILURE)

Sep 03 21:33:32 alias001-Nobilis systemd[1]: Starting Mycroft AI... Sep 03 21:33:32 alias001-Nobilis mycroft-start[53561]: Already up to date. Sep 03 21:33:32 alias001-Nobilis mycroft-start[53546]: Starting all mycroft-core services Sep 03 21:33:32 alias001-Nobilis mycroft-start[53546]: Initializing... Sep 03 21:33:33 alias001-Nobilis systemd[1]: mycroft.service: Control process exited, code=exited, status=1/FAILURE Sep 03 21:33:33 alias001-Nobilis systemd[1]: mycroft.service: Failed with result 'exit-code'. Sep 03 21:33:33 alias001-Nobilis systemd[1]: Failed to start Mycroft AI.

root@alias001-Nobilis:~# journalctl -xe Sep 03 21:33:24 alias001-Nobilis systemd[1]: /lib/systemd/system/plymouth-start.service:17: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management fo> Sep 03 21:33:27 alias001-Nobilis NetworkManager[1796]: [1630730007.0488] manager: NetworkManager state is now CONNECTED_SITE Sep 03 21:33:27 alias001-Nobilis whoopsie[3056]: [21:33:27] Cannot reach: https://daisy.ubuntu.com Sep 03 21:33:27 alias001-Nobilis whoopsie[3056]: [21:33:27] offline Sep 03 21:33:32 alias001-Nobilis systemd[1]: Starting Mycroft AI... ░░ Subject: A start job for unit mycroft.service has begun execution ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit mycroft.service has begun execution. ░░ ░░ The job identifier is 16029. Sep 03 21:33:32 alias001-Nobilis mycroft-start[53561]: Already up to date. Sep 03 21:33:32 alias001-Nobilis mycroft-start[53546]: Starting all mycroft-core services Sep 03 21:33:32 alias001-Nobilis mycroft-start[53546]: Initializing... Sep 03 21:33:33 alias001-Nobilis systemd[1]: mycroft.service: Control process exited, code=exited, status=1/FAILURE ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ An ExecStart= process belonging to unit mycroft.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 1. Sep 03 21:33:33 alias001-Nobilis systemd[1]: mycroft.service: Failed with result 'exit-code'. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit mycroft.service has entered the 'failed' state with result 'exit-code'. Sep 03 21:33:33 alias001-Nobilis systemd[1]: Failed to start Mycroft AI. ░░ Subject: A start job for unit mycroft.service has failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit mycroft.service has finished with a failure. ░░ ░░ The job identifier is 16029 and the job result is failed. Sep 03 21:33:34 alias001-Nobilis NetworkManager[1796]: [1630730014.6401] manager: NetworkManager state is now CONNECTED_GLOBAL Sep 03 21:33:34 alias001-Nobilis whoopsie[3056]: [21:33:34] Cannot reach: https://daisy.ubuntu.com Sep 03 21:33:34 alias001-Nobilis whoopsie[3056]: [21:33:34] The default IPv4 route is: /org/freedesktop/NetworkManager/ActiveConnection/1 Sep 03 21:33:34 alias001-Nobilis whoopsie[3056]: [21:33:34] Not a paid data plan: /org/freedesktop/NetworkManager/ActiveConnection/1 Sep 03 21:33:34 alias001-Nobilis whoopsie[3056]: [21:33:34] Found usable connection: /org/freedesktop/NetworkManager/ActiveConnection/1 Sep 03 21:33:35 alias001-Nobilis gnome-shell[3605]: Can not connect to https://openweathermap.org/city/5793271?APPID=c93b4a667c8c9d1d1eb941621f899bb8 Host unreachable Sep 03 21:33:36 alias001-Nobilis whoopsie[3056]: [21:33:36] online Sep 03 21:33:41 alias001-Nobilis zmc_dvideo0[52742]: INF [zmc_dvideo0] [Logitech Carl Zeiss Tessar 2.0/3/7 MP Autofocus USB Webcam: 8600 - Capturing at 5.00 fps, capturing bandwidth 9600449bytes/sec] Sep 03 21:33:45 alias001-Nobilis systemd[1]: NetworkManager-dispatcher.service: Succeeded. ░░ Subject: Unit succeeded ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit NetworkManager-dispatcher.service has successfully entered the 'dead' state. Sep 03 21:34:01 alias001-Nobilis zmc_dvideo0[52742]: INF [zmc_dvideo0] [Logitech Carl Zeiss Tessar 2.0/3/7 MP Autofocus USB Webcam: 8700 - Capturing at 5.00 fps, capturing bandwidth 9596236bytes/sec] Sep 03 21:34:21 alias001-Nobilis zmc_dvideo0[52742]: INF [zmc_dvideo0] [Logitech Carl Zeiss Tessar 2.0/3/7 MP Autofocus USB Webcam: 8800 - Capturing at 5.00 fps, capturing bandwidth 9597506bytes/sec]

Any help would be greatly appreciated. From my guess it looks like the ExecStart is the problem but why?

krisgesling commented 3 years ago

Hi Alias,

Thanks for trying Mycroft out. As this isn't an issue with mycroft-core I'm going to close this ticket.

I'd suggest checking out our Community Forums to see if someone else has faced a similar problem and if not, opening a new topic there.