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

Fail to deploy #3

Open
stgreenb opened this issue Aug 18, 2021 · 11 comments
Open

Fail to deploy #3

stgreenb opened this issue Aug 18, 2021 · 11 comments

Comments

@stgreenb
Copy link

stgreenb commented Aug 18, 2021

Running on Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-81-generic x86_64) after successfully installing pre-req:

bridge-utils is already the newest version (1.6-2ubuntu1).
libvirt-clients is already the newest version (6.0.0-0ubuntu8.12).
libvirt-daemon-system is already the newest version (6.0.0-0ubuntu8.12).
qemu is already the newest version (1:4.2-3ubuntu6.17).
qemu-kvm is already the newest version (1:4.2-3ubuntu6.17).
virt-manager is already the newest version (1:2.2.1-3ubuntu2.1).

Trying the most basic run:

docker run -it --device /dev/kvm -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" -p 5555:5555 sickcodes/dock-droid:latest

Fails:

ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
nohup: appending output to 'nohup.out'
+ source /etc/profile.d/android-sdk-platform-tools.sh
++ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/platform-tools
++ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/platform-tools
++ id -u
++ id -g
+ sudo chown 1000:1000 /dev/kvm
++ id -u
++ id -g
+ sudo chown -R 1000:1000 /dev/snd
+ true
++ id -u
++ id -g
+ sudo chown -R 1000:1000 /dev/video0 /dev/video1 /dev/video2 /dev/video3 /dev/video4 /dev/video5 /dev/video6 /dev/video7 /dev/video8 /dev/video9 /dev/video10
+ true
++ nproc
+ sudo qemu-system-x86_64 -m 4000 -enable-kvm -cpu host,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check, -smp 8 -machine q35,accel=kvm:tcg -smp 4,cores=4 -hda /home/arch/dock-droid/android.qcow2 -usb -device usb-kbd -device usb-tablet -smbios type=2 -audiodev alsa,id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda -device usb-ehci,id=ehci -netdev user,id=net0,hostfwd=tcp::10022-:22,hostfwd=tcp::5900-:5900,hostfwd=tcp::5555-:5555, -device vmxnet3,netdev=net0,id=net0,mac=00:11:22:33:44:55 -monitor stdio -boot menu=on -cdrom Bliss-v11.13--OFFICIAL-20201113-1525_x86_64_k-k4.19.122-ax86-ga-rmi_m-20.1.0-llvm90_dgc-t3_gms_intelhd.iso -vga vmware
Unable to init server: Could not connect: Connection refused
QEMU 6.0.0 monitor - type 'help' for more information
(qemu) ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `dac'
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `adc'
gtk initialization failed

@sickcodes
Copy link
Owner

xhost + should do the trick

Also check egrep -c '(svm|vmx)' /proc/cpuinfo for KVM capability

Let me make the issue template, one sec:

# OS related issued, please help us identify the issue by posting the output of this
uname -a \
; echo "${DISPLAY}" \
; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs \
; grep NAME /etc/os-release \
; df -h . \
; qemu-system-x86_64 --version \
; libvirtd --version \
; free -mh \
; nproc \
; egrep -c '(svm|vmx)' /proc/cpuinfo \
; ls -lha /dev/kvm \
; ls -lha /tmp/.X11-unix/ \
; ps aux | grep dockerd \
; docker ps | grep osx \
; grep "docker\|kvm\|virt" /etc/group

@stgreenb
Copy link
Author

stgreenb commented Aug 20, 2021

Linux docker 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

1
NAME="Ubuntu"
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb2       229G   26G  192G  12% /
QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.17)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
libvirtd (libvirt) 6.0.0
              total        used        free      shared  buff/cache   available
Mem:          7.8Gi       2.2Gi       130Mi       2.0Mi       5.4Gi       5.3Gi
Swap:         4.0Gi        28Mi       4.0Gi
2
2
crw-rw----+ 1 root kvm 10, 232 Aug 20 01:19 /dev/kvm
total 8.0K
drwxrwxrwt  2 root  root  4.0K Aug 19 13:05 .
drwxrwxrwt 13 steve steve 4.0K Aug 20 01:23 ..
root         911  1.6  0.9 2016884 78320 ?       Ssl  Aug19  12:32 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
steve     333634  0.0  0.0   6432   740 pts/1    S+   01:23   0:00 grep --color=auto dockerd
kvm:x:108:
docker:x:998:steve
libvirt:x:118:steve
libvirt-qemu:x:64055:libvirt-qemu
libvirt-dnsmasq:x:119:

@sickcodes
Copy link
Owner

@stgreenb Display is missing

Do you have a screen?

@stgreenb
Copy link
Author

This is Ubuntu server. It has a video card and typically it does have a monitor attached, but I'm issuing commands remotely via ssh.

@janisblaus
Copy link

Hi guys, same issue here, is it possible to deploy this on a server? :)

@sickcodes
Copy link
Owner

Headlessly (on a server, or locally)

docker run -it \
    --device /dev/kvm \
    -e EXTRA="-display none -vnc 0.0.0.0:99,password=on" \
    -p 5555:5555 \
    -p 5999:5999 \
    sickcodes/dock-droid:latest

For headless, in the QEMU console, type change vnc password user

And then connect on localhost:5999, or the server IP, or Docker IP.

@stgreenb
Copy link
Author

For headless, in the QEMU console, type change vnc password user

Are you saying run qemu-system-x86_64 -nographic ... ?

@JJenkx
Copy link

JJenkx commented Sep 21, 2021

On Debian 11 (Bullseye), I just got a similar error

$ uname -a \
; echo "${DISPLAY}" \
; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs \
; grep NAME /etc/os-release \
; df -h . \
; qemu-system-x86_64 --version \
; libvirtd --version \
; free -mh \
; nproc \
; egrep -c '(svm|vmx)' /proc/cpuinfo \
; ls -lha /dev/kvm \
; ls -lha /tmp/.X11-unix/ \
; ps aux | grep dockerd \
; docker ps | grep osx \
; grep "docker\|kvm\|virt" /etc/group
Linux MasterDeb 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux
:0
[sudo] password for jjenkx: 
1
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_CODENAME=bullseye
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        92G   81G  5.6G  94% /
QEMU emulator version 5.2.0 (Debian 1:5.2+dfsg-11)
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
bash: libvirtd: command not found
               total        used        free      shared  buff/cache   available
Mem:            31Gi       7.7Gi        11Gi       178Mi        12Gi        23Gi
Swap:           18Gi          0B        18Gi
12
24
crw-rw----+ 1 root kvm 10, 232 Sep 20 20:24 /dev/kvm
total 40K
drwxrwxrwt  2 root root 4.0K Sep 20 17:44 .
drwxrwxrwt 24 root root  32K Sep 20 20:52 ..
srwxrwxrwx  1 root root    0 Sep 20 17:44 X0
root        4733  2.1  0.3 2122764 121076 ?      Ssl  17:44   4:04 /usr/sbin/dockerd -H fd://
jjenkx   1143441  0.0  0.0   6180   664 pts/1    S+   20:52   0:00 grep dockerd
kvm:x:106:
libvirt:x:130:
libvirt-qemu:x:64055:libvirt-qemu
docker:x:134:pihole,jjenkx
~/Downloads$ docker run -it \
    --device /dev/kvm \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -p 5555:5555 \
    sickcodes/dock-droid:latest
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 
nohup: appending output to 'nohup.out'
+ source /etc/profile.d/android-sdk-platform-tools.sh
++ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/platform-tools
++ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/platform-tools
++ id -u
++ id -g
+ sudo chown 1000:1000 /dev/kvm
++ id -u
++ id -g
+ sudo chown -R 1000:1000 /dev/snd
+ true
++ id -u
++ id -g
+ sudo chown -R 1000:1000 /dev/video0 /dev/video1 /dev/video2 /dev/video3 /dev/video4 /dev/video5 /dev/video6 /dev/video7 /dev/video8 /dev/video9 /dev/video10
+ true
++ nproc
+ sudo qemu-system-x86_64 -m 4000 -enable-kvm -cpu host,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check, -smp 12 -machine q35,accel=kvm:tcg -smp 4,cores=4 -hda /home/arch/dock-droid/android.qcow2 -usb -device usb-kbd -device usb-tablet -smbios type=2 -device usb-ehci,id=ehci -netdev user,id=net0,hostfwd=tcp::10022-:22,hostfwd=tcp::5900-:5900,hostfwd=tcp::5555-:5555, -device vmxnet3,netdev=net0,id=net0,mac=00:11:22:33:44:55 -monitor stdio -boot menu=on -cdrom Bliss-v11.13--OFFICIAL-20201113-1525_x86_64_k-k4.19.122-ax86-ga-rmi_m-20.1.0-llvm90_dgc-t3_gms_intelhd.iso -vga vmware
No protocol specified
Unable to init server: Could not connect: Connection refused
QEMU 6.1.0 monitor - type 'help' for more information
(qemu) ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `dac'
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `adc'
gtk initialization failed

@sickcodes
Copy link
Owner

@sickcodes
Copy link
Owner

Fixing some issues with some updates upstream

@ronoaldo
Copy link

ronoaldo commented Nov 7, 2021

I would suggest adding the xhost + on Readme.md. In my case, the gtk initialization error was just that one! After executing it, it was launched properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants