budtmo / docker-android

Android in docker solution with noVNC supported and video recording
Other
9.47k stars 1.26k forks source link

atd entered FATAL state, too many start retries too quickly #231

Open kpachhai opened 4 years ago

kpachhai commented 4 years ago

🐛 Bug Report

Operating System: Ubuntu 18.04 inside Virtualbox(virtualization is enabled already)

Docker Image: budtmo/docker-android-x86-10.0

Docker Version: 19.03.5-ce

Docker-compose version (Only if you use it): 1.23.2, build 1110ad0

Docker Command to start docker-android: docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S10" --name android-container budtmo/docker-android-x86-10.0

Expected Behavior

Access localhost:6080 from the browser successfully connecting to the AVD running inside docker

Actual Behavior

docker container logs show some processes keep on exiting. The logs are as follows and show that "atd", "screen-copy" and "auto-recording" all enter FATAL state

$ docker container logs -f android-container
2020-03-25 06:58:33,056 CRIT Supervisor running as root (no user in config file)
2020-03-25 06:58:33,060 INFO supervisord started with pid 7
2020-03-25 06:58:34,065 INFO spawned: 'xvfb' with pid 10
2020-03-25 06:58:34,068 INFO spawned: 'port-forward' with pid 11
2020-03-25 06:58:34,069 INFO spawned: 'novnc' with pid 12
2020-03-25 06:58:34,070 INFO spawned: 'openbox' with pid 13
2020-03-25 06:58:34,071 INFO spawned: 'x11vnc' with pid 14
2020-03-25 06:58:34,072 INFO spawned: 'screen-copy' with pid 15
2020-03-25 06:58:34,072 INFO spawned: 'docker-appium' with pid 16
2020-03-25 06:58:34,073 INFO spawned: 'atd' with pid 17
2020-03-25 06:58:34,074 INFO spawned: 'auto-recording' with pid 18
2020-03-25 06:58:34,075 INFO spawned: 'adb-utils' with pid 19
2020-03-25 06:58:34,343 INFO exited: screen-copy (exit status 0; not expected)
2020-03-25 06:58:34,343 INFO exited: atd (exit status 0; not expected)
2020-03-25 06:58:35,137 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-25 06:58:35,137 INFO success: port-forward entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-25 06:58:35,137 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-25 06:58:35,137 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-25 06:58:35,137 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-25 06:58:35,137 INFO success: docker-appium entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-25 06:58:35,137 INFO success: auto-recording entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-25 06:58:35,137 INFO success: adb-utils entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-03-25 06:58:35,551 INFO spawned: 'screen-copy' with pid 135
2020-03-25 06:58:35,552 INFO spawned: 'atd' with pid 136
2020-03-25 06:58:35,555 INFO exited: screen-copy (exit status 0; not expected)
2020-03-25 06:58:35,562 INFO exited: atd (exit status 0; not expected)
2020-03-25 06:58:37,566 INFO spawned: 'screen-copy' with pid 142
2020-03-25 06:58:37,567 INFO spawned: 'atd' with pid 143
2020-03-25 06:58:37,570 INFO exited: screen-copy (exit status 0; not expected)
2020-03-25 06:58:37,571 INFO exited: atd (exit status 0; not expected)
2020-03-25 06:58:40,351 INFO exited: auto-recording (exit status 0; expected)
2020-03-25 06:58:41,352 INFO spawned: 'screen-copy' with pid 202
2020-03-25 06:58:41,354 INFO spawned: 'atd' with pid 203
2020-03-25 06:58:41,359 INFO exited: atd (exit status 0; not expected)
2020-03-25 06:58:41,359 INFO gave up: atd entered FATAL state, too many start retries too quickly
2020-03-25 06:58:41,360 INFO exited: screen-copy (exit status 0; not expected)
2020-03-25 06:58:42,361 INFO gave up: screen-copy entered FATAL state, too many start retries too quickly
2020-03-25 06:58:42,541 INFO exited: docker-appium (exit status 0; expected)
kpachhai commented 4 years ago

Any update on this?

jack-martin2 commented 4 years ago

I have also ran into the same problem!

kpachhai commented 4 years ago

Does anyone even maintain this repo? Or is it dead?

chemelli74 commented 4 years ago

Same issue for me

Simone

omarhassanhub commented 4 years ago

Exact same issue here. I'm running docker on ubuntu running in vmware fusion.

opahopa commented 4 years ago

same problem, macos catalina, ubuntu under vmware, debian dedicated server, centos server(enabled virtualization). -> probably the problem here is not with the host machine.

also, tried using different version of dockerfile, tinkering with config - all with the same result. probably something is broken on the image.

opahopa commented 4 years ago

this issue was based on the wrong debug approach. check /var/log/supervisor/docker-android.stdout.log in the target container to see your particular problem. As in the doc: docker exec -it android-container tail -f /var/log/supervisor/docker-android.stdout.log

omarhassanhub commented 4 years ago

this issue was based on the wrong debug approach. check /var/log/supervisor/docker-android.stdout.log in the target container to see your particular problem. As in the doc: docker exec -it android-container tail -f /var/log/supervisor/docker-android.stdout.log

Hi @opahopa what do you mean by wrong debug approach? Could you please elaborate on this? How did you fix it?

Cheers

opahopa commented 4 years ago

Hi @omarhassanhub , i guess you got this log atd entered FATAL state from docker logs *container*, correct? this is a high-level message and to see the specific reason, you need to check docker-android.stdout.log on the container, as noted above. I've got this message on different environments and the reasons were different too.

a7i commented 3 years ago

I am facing the same issue on AKS (running Ubuntu 18.04). Anyone been able to figure this out?

YassineHk commented 3 years ago

Same issue for me

i think it is from the memory size

David-Lor commented 3 years ago

From my experience, I would say this problem can happen when (but not limited to) you stop the container without stopping first the emulator. Recreating the container makes it work again, but you loose all your data.

/var/log/supervisor/docker-android.stdout.log shows nothing interesting though:

Available types:
Selected type of deployment: , Template file:
Collecting data for improving the project
GIF89a,D;SaltStack is disabled
Using Emulator
[88] [ INFO] app - Android version: 8.1
API level: 27
Processor: x86
System image: x86
Image type: google_apis
[88] [ INFO] app - Device: Samsung Galaxy S6
[88] [ INFO] app - Custom Args:
[88] [ INFO] app - AVD name: samsung_galaxy_s6_8.1
[88] [ INFO] app - Found existing config file at /root/android_emulator/config.ini.
[88] [ INFO] app - Existing config file references Samsung Galaxy S6. Assuming device was previously initialized.
[88] [ INFO] app - Run emulator...
[88] [ INFO] app - Using previously initialized AVD...

/var/log/supervisor/docker-android.stdout.log shows the following, but I'd say this was written when the container started for the first time. I restarted it twice and it's not repeated.:

pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver
E1124 12:32:49.268822501     193 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1606249969.268746165","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}
Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.
 ((null):0, (null))
Arvingrep commented 3 years ago

Operating System: Linux test04tg 3.10.0-1160.2.2.el7.x86_64 #1 SMP Tue Oct 20 16:53:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Docker Image: budtmo/docker-android-x86-(8.1 ,9.0 ,11.0)

Docker Version: 19.03.13

Docker Command to start docker-android: docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container budtmo/docker-android-x86-10.0 docker logs : [root@test04tg ~]# docker logs android-container 2020-12-17 04:07:25,290 CRIT Supervisor running as root (no user in config file) 2020-12-17 04:07:25,312 INFO supervisord started with pid 6 2020-12-17 04:07:26,315 INFO spawned: 'xvfb' with pid 22 2020-12-17 04:07:26,316 INFO spawned: 'port-forward' with pid 23 2020-12-17 04:07:26,318 INFO spawned: 'novnc' with pid 24 2020-12-17 04:07:26,319 INFO spawned: 'openbox' with pid 25 2020-12-17 04:07:26,321 INFO spawned: 'x11vnc' with pid 26 2020-12-17 04:07:26,322 INFO spawned: 'screen-copy' with pid 27 2020-12-17 04:07:26,324 INFO spawned: 'docker-appium' with pid 28 2020-12-17 04:07:26,325 INFO spawned: 'atd' with pid 29 2020-12-17 04:07:26,327 INFO spawned: 'auto-recording' with pid 30 2020-12-17 04:07:26,328 INFO spawned: 'adb-utils' with pid 31 2020-12-17 04:07:26,401 INFO exited: screen-copy (exit status 0; not expected) 2020-12-17 04:07:26,403 INFO exited: atd (exit status 0; not expected) 2020-12-17 04:07:27,810 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-17 04:07:27,810 INFO success: port-forward entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-17 04:07:27,810 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-17 04:07:27,810 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-17 04:07:27,810 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-17 04:07:27,811 INFO spawned: 'screen-copy' with pid 68 2020-12-17 04:07:27,811 INFO success: docker-appium entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-17 04:07:27,813 INFO spawned: 'atd' with pid 69 2020-12-17 04:07:27,813 INFO success: auto-recording entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-17 04:07:27,813 INFO success: adb-utils entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-17 04:07:27,816 INFO exited: screen-copy (exit status 0; not expected) 2020-12-17 04:07:27,817 INFO exited: atd (exit status 0; not expected) 2020-12-17 04:07:30,092 INFO spawned: 'screen-copy' with pid 95 2020-12-17 04:07:30,093 INFO spawned: 'atd' with pid 96 2020-12-17 04:07:30,097 INFO exited: screen-copy (exit status 0; not expected) 2020-12-17 04:07:30,098 INFO exited: atd (exit status 0; not expected) 2020-12-17 04:07:32,445 INFO exited: auto-recording (exit status 0; expected) 2020-12-17 04:07:33,447 INFO spawned: 'screen-copy' with pid 97 2020-12-17 04:07:33,449 INFO spawned: 'atd' with pid 98 2020-12-17 04:07:33,453 INFO exited: screen-copy (exit status 0; not expected) 2020-12-17 04:07:33,453 INFO gave up: screen-copy entered FATAL state, too many start retries too quickly 2020-12-17 04:07:33,454 INFO exited: atd (exit status 0; not expected) 2020-12-17 04:07:34,455 INFO gave up: atd entered FATAL state, too many start retries too quickly 2020-12-17 04:07:54,949 INFO exited: docker-appium (exit status 0; expected)

asilvanovich commented 3 years ago

same issue for me

vijeshkumarraju commented 3 years ago

I am facing the same isssue as well. Did anyone manage to get a workaround?

opage commented 3 years ago

Same issue 😞

2-man commented 3 years ago

same here

Jack-Roc commented 2 years ago

same problem, macos catalina, ubuntu under vmware, debian dedicated server, centos server(enabled virtualization). -> probably the problem here is not with the host machine.

also, tried using different version of dockerfile, tinkering with config - all with the same result. probably something is broken on the image.

Hi @opahopa The error you ran on the macos catalina has been resolved,I hope to get in touch with you (Facebook Twitter or Telegram )

Progaros commented 2 years ago

same issue

alexks02 commented 2 years ago

same issue

Herrnobiz commented 2 years ago

I struggled too with the ATD error, i'm using 8.1 galaxy s6 and my container was starting only the first time it was fresh installed, so i tought it was something that was being changed after the initial android bootup and i think my guess was right: now i just mount the container /root/android_emulator to a folder of my choice on the host so i have access to the file cache.img (not the cache.img.qcow2) to delete it everytime before starting the container, and now it works and starts flawlessy. Moreover, as a side effect, the contanier now shows healthy, before was showing as unhealthy

miguepintor commented 2 years ago

I am facing exactly the same issue as everyone. Any progress? Has someone found a workaround?

VitalyGryaznov commented 2 years ago

same issue

fliot commented 2 years ago

same here...

zengfr commented 2 years ago

same issue too

JerryWu1234 commented 2 years ago

same issue too

Displee commented 2 years ago

Same issue

anywo commented 2 years ago

same issue too Operating System: Window 11 Docker Version: Docker Desktop 4.11.1 Docker Image: budtmo/docker-android-x86-11.0 | budtmo/docker-android-x86-8.1

2022-09-04 19:25:28,916 CRIT Supervisor running as root (no user in config file)
2022-09-04 19:25:28,918 INFO supervisord started with pid 7
2022-09-04 19:25:29,923 INFO spawned: 'xvfb' with pid 10
2022-09-04 19:25:29,925 INFO spawned: 'port-forward' with pid 11
2022-09-04 19:25:29,926 INFO spawned: 'novnc' with pid 12
2022-09-04 19:25:29,927 INFO spawned: 'openbox' with pid 13
2022-09-04 19:25:29,929 INFO spawned: 'x11vnc' with pid 14
2022-09-04 19:25:29,930 INFO spawned: 'screen-copy' with pid 20
2022-09-04 19:25:29,932 INFO spawned: 'docker-appium' with pid 24
2022-09-04 19:25:29,933 INFO spawned: 'auto-recording' with pid 27
2022-09-04 19:25:29,934 INFO spawned: 'adb-utils' with pid 30
2022-09-04 19:25:29,935 INFO exited: screen-copy (exit status 0; not expected)
2022-09-04 19:25:30,311 INFO exited: docker-appium (exit status 0; not expected)
2022-09-04 19:25:30,949 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-04 19:25:30,949 INFO success: port-forward entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-04 19:25:30,949 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-04 19:25:30,949 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-04 19:25:30,949 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-04 19:25:30,950 INFO spawned: 'screen-copy' with pid 110
2022-09-04 19:25:30,950 INFO success: auto-recording entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-04 19:25:30,950 INFO success: adb-utils entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-04 19:25:30,954 INFO exited: screen-copy (exit status 0; not expected)
2022-09-04 19:25:31,956 INFO spawned: 'docker-appium' with pid 115
2022-09-04 19:25:32,283 INFO exited: docker-appium (exit status 0; not expected)
2022-09-04 19:25:33,285 INFO spawned: 'screen-copy' with pid 144
2022-09-04 19:25:33,289 INFO exited: screen-copy (exit status 0; not expected)
2022-09-04 19:25:34,292 INFO spawned: 'docker-appium' with pid 145
2022-09-04 19:25:34,601 INFO exited: docker-appium (exit status 0; not expected)
2022-09-04 19:25:35,943 INFO exited: auto-recording (exit status 0; expected)
2022-09-04 19:25:36,950 INFO spawned: 'screen-copy' with pid 173
2022-09-04 19:25:36,957 INFO exited: screen-copy (exit status 0; not expected)
2022-09-04 19:25:36,957 INFO gave up: screen-copy entered FATAL state, too many start retries too quickly
2022-09-04 19:25:37,960 INFO spawned: 'docker-appium' with pid 174
2022-09-04 19:25:38,363 INFO exited: docker-appium (exit status 0; not expected)
2022-09-04 19:25:39,364 INFO gave up: docker-appium entered FATAL state, too many start retries too quickly
luan-nvg commented 1 year ago

same problem

isaacpeh commented 6 months ago

Any updates on this? Facing the same issue.

bernatvadell commented 5 months ago

I've fixed clearing locks before start, you can copy my example:

https://github.com/budtmo/docker-android/issues/395#issuecomment-2040219000