Docker를 사용하고 ubuntu-frame
. 입력으로 ansible-playbook
(재부팅 시 키오스크 서비스가 다시 시작되어야 함)
- 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
기본적으로 Docker 애플리케이션 중 하나는 루트 경로(포트 8080)에서 HTML 문서를 반환하며, 이는 컴퓨터에 연결된 모니터에 표시됩니다. 대부분의 컴퓨터에서는 문제가 없지만 일부 컴퓨터에서는 다음 오류(키오스크 화면에 표시됨)와 함께 화면이 멈춥니다. " Page load error - message corrupt
". 때로는 Ansible을 통해 키오스크 설정으로 호스트를 재구성하면 오류가 해결되기도 하고 그렇지 않은 경우도 있습니다. 다시 시작하면 문제가 해결되는 경우도 있지만 매번 그런 것은 아닙니다.
SSH: 서버에 로그인하여 로그( /var/log/syslog
)를 확인합니다.많은기록된 오류 수입니다. 일반적으로 말하면 다음과 같습니다.
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: + 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[170635]: + [ /snap/ubuntu-frame/3709/usr/local/bin/frame = --help ]
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170658]: + dirname /run/user/0/snap.ubuntu-frame
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: + XDG_RUNTIME_DIR=/run/user/0
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: + export XDG_RUNTIME_DIR
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: + mkdir -p /run/user/0 -m 700
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: + [ -n ]
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: + exec /snap/ubuntu-frame/3709/usr/local/bin/frame
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.402507] <information> mirserver: Starting
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.403124] < - debug - > mirserver: Using Linux VT subsystem for session management
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.403334] <information> 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[170635]: [2022-09-12 08:49:28.403440] <information> 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[170635]: [2022-09-12 08:49:28.403466] <information> 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[170635]: [2022-09-12 08:49:28.403491] <information> 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[170635]: [2022-09-12 08:49:28.404916] <information> mirserver: Found display driver: mir:gbm-kms (version 2.9.0)
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.407454] < - debug - > gbm-kms: Quirks: checking device with devnode: /dev/dri/card0, driver i915
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.407854] <information> 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<mir::Device::Observer>, const std::shared_ptr<mir::LinuxVirtualTerminal::DeviceList>&)
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: Dynamic exception type: boost::wrapexcept<std::system_error>
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: std::exception::what: Failed to claim DRM master: Invalid argument
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [boost::errinfo_file_name_*] = /dev/dri/card0
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.408127] < - debug - > gbm-kms: Quirks: checking device with devnode: (null), driver
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.408362] < - debug - > gbm-kms: Quirks: checking device with devnode: (null), driver
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.408403] <information> mirserver: (Unsupported by system environment)
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.408426] <information> mirserver: Found display driver: mir:x11 (version 2.9.0)
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: [2022-09-12 08:49:28.408473] <information> mirserver: (Unsupported by system environment)
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: ERROR: /build/mir-c1eKlT/mir-2.9.0/src/server/graphics/default_configuration.cpp(233): Throw in function virtual const std::vector<std::shared_ptr<mir::graphics::DisplayPlatform> >& mir::DefaultServerConfiguration::the_display_platforms()
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: Dynamic exception type: boost::wrapexcept<std::runtime_error>
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: std::exception::what: Exception while creating graphics platform
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: ERROR: /build/mir-c1eKlT/mir-2.9.0/src/server/graphics/platform_probe.cpp(190): Throw in function std::vector<std::pair<mir::graphics::SupportedDevice, std::shared_ptr<mir::SharedLibrary> > > {anonymous}::modules_for_device({anonymous}::ModuleType, const std::vector<std::shared_ptr<mir::SharedLibrary> >&, const mir::options::ProgramOption&, const std::shared_ptr<mir::ConsoleServices>&)
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: Dynamic exception type: boost::wrapexcept<std::runtime_error>
Sep 12 08:49:28 hostname ubuntu-frame.daemon[170635]: std::exception::what: Failed to find any platforms for current system
Sep 12 08:49:28 hostname systemd[1]: snap.ubuntu-frame.daemon.service: Main process exited, code=exited, status=1/FAILURE
Sep 12 08:49:28 hostname systemd[1]: snap.ubuntu-frame.daemon.service: Failed with result 'exit-code'.
작업 기계의 로그 예
Sep 13 11:59:56 hostname2 cog[2715]: <http://localhost:8080/> Load started.
Sep 13 11:59:56 hostname2 cog[2715]: <http://localhost:8080/> 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[2715]: <http://localhost:8080/> 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[2715]: <http://localhost:8080/> Load started.
Sep 13 12:00:01 hostname2 cog[2715]: <http://localhost:8080/> 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[2715]: <http://localhost:8080/> 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[2715]: <http://localhost:8080/> Load started.
Sep 13 12:00:06 hostname2 cog[2715]: <http://localhost:8080/> 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[2715]: <http://localhost:8080/> 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[2715]: <http://localhost:8080/> Load started.
Sep 13 12:00:11 hostname2 cog[2715]: <http://localhost:8080/> Loading...
Sep 13 12:00:11 hostname2 cog[2715]: <http://localhost:8080/> Loaded successfully.
내가 찾고 있는 것이 무엇인지 확실하지 않다고 말하는 것은 다소 절제된 표현입니다. 실제로 당면한 실제 문제를 분리하고 확대하고 싶지만 지금은 어떻게 해야 할지 잘 모르겠습니다. 추가 로그/구성 정보를 제공할 수 있는 경우 알려주시기 바랍니다. 근본적인 문제를 더 잘 이해하고 싶습니다.
포스팅이 너무 길어서 죄송합니다.. :)