Sample Header Ad - 728x90

Troubleshooting extremely shaky setup - Ubuntu kiosk with ubuntu-frame

0 votes
0 answers
604 views
I have a set of computers at work (running Ubuntu 20.04) that are used to host various containerized applications with Docker, as well as running kiosk screens using ubuntu-frame. To set up and configure the kiosks, we use Ansible - the following are the contents of the .yml file that is given as input to ansible-playbook (the kiosk service is supposed to be restarted on reboot).
- name: Provision new machine
  hosts: all
  remote_user: foobar
  become: yes
  become_method: sudo
  become_user: root
  vars_files:
    - vars.yml

  tasks:
  - name: Install ubuntu-frame
    snap:
      name: ubuntu-frame
  - name: Configure ubuntu-frame
    shell:
      cmd: snap set ubuntu-frame daemon=true
  - name: Install wpe-webkit-mir-kiosk snap
    snap:
      name: wpe-webkit-mir-kiosk
  - name: Configure network connection
    shell:
      cmd: snap connect wpe-webkit-mir-kiosk:wayland
  - name: Configure kiosk
    shell:
      cmd: snap set wpe-webkit-mir-kiosk daemon=true
  - name: Set url
    shell:
      cmd: snap set wpe-webkit-mir-kiosk url=http://localhost:8080
  - name: Start kiosk
    shell:
      cmd: snap start wpe-webkit-mir-kiosk
  - name: Make sure kiosk is restarted on reboot
    shell:
      cmd: echo "SHELL=/bin/sh\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n@reboot root sleep 30 && snap set wpe-webkit-mir-kiosk url=http://localhost:8080 && snap start wpe-webkit-mir-kiosk" > /etc/cron.d/restart-kiosk
Basically, one of the Docker applications return a HTML document at the root path (on port 8080), which is then shown on the monitor connected to the computer. For the majority of the computers, this works all fine and dandy - for some of the computers however, the screen dies with the following error (shown on the kiosk screen): "Page load error - message corrupt". Sometimes the error can be resolved by simply re-provisioning the host with the kiosk setup through Ansible, sometimes not. Occasionally, a reboot does the trick - but not every time. SSH:ing in to the server and looking at the logs (/var/log/syslog), there are a **lot** of errors being logged. Generally, they look like follows:
Sep 12 08:49:28 hostname ubuntu-frame.daemon: + exec nohup /snap/ubuntu-frame/3709/bin/run-frame /snap/ubuntu-frame/3709/usr/local/bin/frame
Sep 12 08:49:28 hostname ubuntu-frame.daemon: + [ /snap/ubuntu-frame/3709/usr/local/bin/frame = --help ]
Sep 12 08:49:28 hostname ubuntu-frame.daemon: + dirname /run/user/0/snap.ubuntu-frame
Sep 12 08:49:28 hostname ubuntu-frame.daemon: + XDG_RUNTIME_DIR=/run/user/0
Sep 12 08:49:28 hostname ubuntu-frame.daemon: + export XDG_RUNTIME_DIR
Sep 12 08:49:28 hostname ubuntu-frame.daemon: + mkdir -p /run/user/0 -m 700
Sep 12 08:49:28 hostname ubuntu-frame.daemon: + [ -n  ]
Sep 12 08:49:28 hostname ubuntu-frame.daemon: + exec /snap/ubuntu-frame/3709/usr/local/bin/frame
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.402507]  mirserver: Starting
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.403124]  mirserver: Using Linux VT subsystem for session management
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.403334]  mircommon: Loading modules from: /snap/ubuntu-frame/3709/usr/lib/x86_64-linux-gnu/mir/server-platform
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.403440]  mircommon: Loading module: /snap/ubuntu-frame/3709/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-gbm-kms.so.20
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.403466]  mircommon: Loading module: /snap/ubuntu-frame/3709/usr/lib/x86_64-linux-gnu/mir/server-platform/server-x11.so.20
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.403491]  mircommon: Loading module: /snap/ubuntu-frame/3709/usr/lib/x86_64-linux-gnu/mir/server-platform/input-evdev.so.8
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.404916]  mirserver: Found display driver: mir:gbm-kms (version 2.9.0)
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.407454]  gbm-kms: Quirks: checking device with devnode: /dev/dri/card0, driver i915
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.407854]  gbm-kms: Failed to probe DRM device: /build/mir-c1eKlT/mir-2.9.0/src/server/console/linux_virtual_terminal.cpp(167): Throw in function {anonymous}::DRMDevice::DRMDevice(mir::VTFileOperations&, const char*, std::unique_ptr, const std::shared_ptr&)
Sep 12 08:49:28 hostname ubuntu-frame.daemon: Dynamic exception type: boost::wrapexcept
Sep 12 08:49:28 hostname ubuntu-frame.daemon: std::exception::what: Failed to claim DRM master: Invalid argument
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [boost::errinfo_file_name_*] = /dev/dri/card0
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.408127]  gbm-kms: Quirks: checking device with devnode: (null), driver
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.408362]  gbm-kms: Quirks: checking device with devnode: (null), driver
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.408403]  mirserver: (Unsupported by system environment)
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.408426]  mirserver: Found display driver: mir:x11 (version 2.9.0)
Sep 12 08:49:28 hostname ubuntu-frame.daemon: [2022-09-12 08:49:28.408473]  mirserver: (Unsupported by system environment)
Sep 12 08:49:28 hostname ubuntu-frame.daemon: ERROR: /build/mir-c1eKlT/mir-2.9.0/src/server/graphics/default_configuration.cpp(233): Throw in function virtual const std::vector >& mir::DefaultServerConfiguration::the_display_platforms()
Sep 12 08:49:28 hostname ubuntu-frame.daemon: Dynamic exception type: boost::wrapexcept
Sep 12 08:49:28 hostname ubuntu-frame.daemon: std::exception::what: Exception while creating graphics platform
Sep 12 08:49:28 hostname ubuntu-frame.daemon: ERROR: /build/mir-c1eKlT/mir-2.9.0/src/server/graphics/platform_probe.cpp(190): Throw in function std::vector > > {anonymous}::modules_for_device({anonymous}::ModuleType, const std::vector >&, const mir::options::ProgramOption&, const std::shared_ptr&)
Sep 12 08:49:28 hostname ubuntu-frame.daemon: Dynamic exception type: boost::wrapexcept
Sep 12 08:49:28 hostname ubuntu-frame.daemon: std::exception::what: Failed to find any platforms for current system
Sep 12 08:49:28 hostname systemd: snap.ubuntu-frame.daemon.service: Main process exited, code=exited, status=1/FAILURE
Sep 12 08:49:28 hostname systemd: snap.ubuntu-frame.daemon.service: Failed with result 'exit-code'.
Example of log from working machine
Sep 13 11:59:56 hostname2 cog:  Load started.
Sep 13 11:59:56 hostname2 cog:  Loading...
Sep 13 11:59:56 hostname2 kernel: [106815.347262] audit: type=1400 audit(1663070396.629:26475): apparmor="DENIED" operation="open" profile="snap.wpe-webkit-mir-kiosk.daemon" name="/proc/zoneinfo" pid=2715 comm="PressureMonitor" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Sep 13 11:59:56 hostname2 cog:  Loaded successfully.
Sep 13 11:59:59 hostname2 kernel: [106817.836954] audit: type=1400 audit(1663070399.117:26476): apparmor="DENIED" operation="open" profile="snap.wpe-webkit-mir-kiosk.daemon" name="/proc/zoneinfo" pid=2715 comm="PressureMonitor" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Sep 13 12:00:01 hostname2 cog:  Load started.
Sep 13 12:00:01 hostname2 cog:  Loading...
Sep 13 12:00:01 hostname2 kernel: [106820.438960] audit: type=1400 audit(1663070401.721:26477): apparmor="DENIED" operation="open" profile="snap.wpe-webkit-mir-kiosk.daemon" name="/proc/zoneinfo" pid=2715 comm="PressureMonitor" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Sep 13 12:00:01 hostname2 cog:  Loaded successfully.
Sep 13 12:00:04 hostname2 kernel: [106823.040962] audit: type=1400 audit(1663070404.321:26478): apparmor="DENIED" operation="open" profile="snap.wpe-webkit-mir-kiosk.daemon" name="/proc/zoneinfo" pid=2715 comm="PressureMonitor" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Sep 13 12:00:06 hostname2 cog:  Load started.
Sep 13 12:00:06 hostname2 cog:  Loading...
Sep 13 12:00:06 hostname2 kernel: [106825.644853] audit: type=1400 audit(1663070406.925:26479): apparmor="DENIED" operation="open" profile="snap.wpe-webkit-mir-kiosk.daemon" name="/proc/zoneinfo" pid=2715 comm="PressureMonitor" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Sep 13 12:00:06 hostname2 cog:  Loaded successfully.
Sep 13 12:00:09 hostname2 kernel: [106828.133211] audit: type=1400 audit(1663070409.413:26480): apparmor="DENIED" operation="open" profile="snap.wpe-webkit-mir-kiosk.daemon" name="/proc/zoneinfo" pid=2715 comm="PressureMonitor" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Sep 13 12:00:11 hostname2 cog:  Load started.
Sep 13 12:00:11 hostname2 cog:  Loading...
Sep 13 12:00:11 hostname2 cog:  Loaded successfully.
To say that I'm not really sure what I'm looking for is somewhat of an understatement - I'd really like to isolate and zoom in on the actual issue at hand a bit, but at the moment I'm not really sure how to do that. Please let me know if I can provide any additional logs/config information - I'd really like to understand the underlying issue better. Sorry for the excruciatingly long post.. :)
Asked by Nyfiken Gul (101 rep)
Sep 12, 2022, 09:34 AM
Last activity: Sep 13, 2022, 12:02 PM