OpenVoiceOS / ovos-installer

Open Voice OS and/or HiveMind installer using Ansible with an intuitive and easy Text-based User Interface
https://www.openvoiceos.org
48 stars 12 forks source link

Failed to connect to bus: No such file or directory #56

Open mverrilli opened 4 months ago

mverrilli commented 4 months ago

Had this error while doing an initial install:

fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": "/usr/bin/systemctl --user", "msg": "Failed to connect to bus: No such file or directory", "rc": 1, "stderr": "Failed to connect to bus: No such file or directory\n", "stderr_lines": ["Failed to connect to bus: No such file or directory"], "stdout": "", "stdout_lines": []}

To address, I needed to execute the generated exports from: dbus-launch --sh-syntax

Some notes:

  1. I'm installing on a Raspberry Pi 4 Model B running Raspberry Pi OS (Bookworm).
  2. Created a user, ovos, for the install (added to sudo group).
  3. Using ssh to execute the installer.
  4. Installing using docker containers, development channel, default skills / gui support support enabled.
  5. I also bumped up swiotlb=65536 as I was get complaints in dmesg.

The install was "successful" although I am getting some permission errors in the docker containers, and so ovos_core and ovos_gui_websocket won't come up, yet. I haven't looked into why.

I just thought I would mention the above in case I am doing something wrong or if anything should be improved for this case.

mverrilli commented 4 months ago

In case the permissions issues I mentioned are related to the method in which I am installing, here are the errors.

ovos_core:

/usr/local/bin/entrypoint.sh: line 18: cd: /home/ovos/.local/share/mycroft/skills: No such file or directory

ovos_gui_websocket:

Traceback (most recent call last):
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_config/models.py", line 108, in load_local
    config = load_commented_json(path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/json_helper.py", line 123, in load_commented_json
    with open(filename) as f:
         ^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/ovos/.config/mycroft/mycroft.conf'
2024-02-20 23:00:53.973 - OVOS - ovos_plugin_manager.templates.audio:<module>:14 - WARNING - Deprecation version=0.1.0. Caller=ovos_plugin_manager.templates:8. ovos_plugin_manager.templates.audio has been deprecated on ovos-audio, move to ovos_plugin_manager.templates.media
2024-02-20 23:00:54.300 - OVOS - ovos_plugin_manager.audio:<module>:7 - WARNING - Deprecation version=0.1.0. Caller=ovos_plugin_manager.plugin_entry:4. ovos_plugin_manager.audio has been deprecated on ovos-audio, move to ovos_plugin_manager.media
Traceback (most recent call last):
  File "/home/ovos/.venv/bin/ovos-gui-service", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_gui/__main__.py", line 25, in main
    PIDLock("gui")
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/process_utils.py", line 325, in __init__
    self.create()
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/process_utils.py", line 378, in create
    self.touch()
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/process_utils.py", line 365, in touch
    with open(self.path, 'w') as L:
         ^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/tmp/mycroft/gui.pid'

If it isn't related, I can create a new issue.

goldyfruit commented 4 months ago

@mverrilli I was not able to reproduce the issue with DBUS but I got the two other permission issues.

goldyfruit commented 4 months ago

Found the issue, this is a limitation due to the UID.

The ovos user you created got the 1001 UID which is an issue because we are doing bind mount. So files from ovos user on the host got the 1001 permissions owner/group but inside the containers, UID 1000 is expected.

The solution will be to use the user with the 1000 UID until I find something more dynamic to implement into ovos-docker.