Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start DBus server for hardware access #2

Open
fquirin opened this issue Mar 3, 2023 · 2 comments
Open

Failed to start DBus server for hardware access #2

fquirin opened this issue Mar 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@fquirin
Copy link

fquirin commented Mar 3, 2023

Describe the bug

After a fresh installation of the 20221108-mark2_base.img image the Raspberry Pi will boot up but cannot start the DBus server. As a result the commands to control fan, LEDs and microphone won't work.

To Reproduce

Steps to reproduce the behavior:

  1. Flash the image to a new SD card
  2. Boot the system
  3. See errors

Expected behavior

DBus server will start as intended.

Log files

systemctl status mark2-hal.service
● mark2-hal.service - DBus server for hardware access
     Loaded: loaded (/etc/systemd/system/mark2-hal.service; enabled; vendor preset: enabled)
     Active: activating (start) since Fri 2023-03-03 09:52:00 GMT; 46s ago
   Main PID: 1004 (python3)
      Tasks: 4 (limit: 1770)
        CPU: 1.578s
     CGroup: /system.slice/mark2-hal.service
             └─1004 /usr/local/mycroft/mark-2/dbus-hal/.venv/bin/python3 -m dbus_hal --websocket

Mar 03 09:52:36 raspberrypi python3[1004]:     self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options),
Mar 03 09:52:36 raspberrypi python3[1004]:   File "/usr/local/mycroft/mark-2/dbus-hal/.venv/lib/python3.9/site-packages/websocket/_http.py", line 130, in connect
Mar 03 09:52:36 raspberrypi python3[1004]:     sock = _open_socket(addrinfo_list, options.sockopt, options.timeout)
Mar 03 09:52:36 raspberrypi python3[1004]:   File "/usr/local/mycroft/mark-2/dbus-hal/.venv/lib/python3.9/site-packages/websocket/_http.py", line 205, in _open_socket
Mar 03 09:52:36 raspberrypi python3[1004]:     raise err
Mar 03 09:52:36 raspberrypi python3[1004]:   File "/usr/local/mycroft/mark-2/dbus-hal/.venv/lib/python3.9/site-packages/websocket/_http.py", line 185, in _open_socket
Mar 03 09:52:36 raspberrypi python3[1004]:     sock.connect(address)
Mar 03 09:52:36 raspberrypi python3[1004]: ConnectionRefusedError: [Errno 111] Connection refused
Mar 03 09:52:36 raspberrypi python3[1004]: ERROR:mycroft_bus_client.client.client:Exception closing websocket: ConnectionRefusedError(111, 'Connection refused')
Mar 03 09:52:36 raspberrypi python3[1004]: WARNING:mycroft_bus_client.client.client:Message Bus Client will reconnect in 40.0 seconds.

Environment (please complete the following information):

  • Device type: Mark-2 Dev Kit
  • OS: mark-ii-sandbox 2022-11-08
  • Mycroft-core version: -
  • Other versions: Linux raspberrypi 5.15.61-v8+

Additional context

I think the error is related to user permissions since:

  • The 'pi' user does not own its own home folder '/home/pi'
  • I can start the DBus server manually by doing sudo su then cd /usr/local/mycroft/mark-2/dbus-hal and python3 -m dbus_hal
@fquirin fquirin added the bug Something isn't working label Mar 3, 2023
@fquirin
Copy link
Author

fquirin commented Mar 3, 2023

Probably related error at boot, the userconfig.service fails as well:

systemctl status userconfig.service
● userconfig.service - User configuration dialog
     Loaded: loaded (/lib/systemd/system/userconfig.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-03-03 11:51:23 GMT; 1min 37s ago
    Process: 757 ExecStart=/usr/lib/userconf-pi/userconf-service (code=exited, status=126)
   Main PID: 757 (code=exited, status=126)
        CPU: 66ms

Mar 03 11:51:23 raspberrypi systemd[1]: userconfig.service: Scheduled restart job, restart counter is at 5.
Mar 03 11:51:23 raspberrypi systemd[1]: Stopped User configuration dialog.
Mar 03 11:51:23 raspberrypi systemd[1]: userconfig.service: Start request repeated too quickly.
Mar 03 11:51:23 raspberrypi systemd[1]: userconfig.service: Failed with result 'exit-code'.
Mar 03 11:51:23 raspberrypi systemd[1]: Failed to start User configuration dialog.

@fquirin
Copy link
Author

fquirin commented Mar 10, 2023

I was able to "fix" the DBus server by removing the --websocket flag from /etc/systemd/system/mark2-hal.service (and reinstalled dbus-hal as root via bash /usr/local/mycroft/mark-2/dbus-hal/install.sh just to make sure).

I'm not sure what the purpose is of the websocket connection as I can't find a server, but at least the tools mark2-fan, led ... work now.

[EDIT] I'm assuming the Websocket server is part of Dinkum's messagebus service but is not installed in the sandbox 🤔

pfefferle added a commit to pfefferle/mark-ii-sandbox that referenced this issue Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant