Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23735

Emulator plugin first time build "adb start-server" times out after 5 seconds

    Details

    • Similar Issues:

      Description

      During build, the emulator starts, but the log shows the following:

      [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk
      $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
      ERROR: Timeout after 5 seconds
      $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
      ERROR: Timeout after 5 seconds
      [android] Starting Android emulator
      $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5773,5774 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -noaudio
      $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5773

      After this, nothing else happens. The job seems to get stuck.

      After this happened once, I ran the build 3 consecutive times and it built perfectly without problems. In other words, this only happened once. I didn't change any settings.

        Attachments

          Issue Links

            Activity

            Hide
            orrc Christopher Orr added a comment -

            Version 2.13 of the plugin has been released, which helps mitigate the problems seen in JENKINS-11952.

            Show
            orrc Christopher Orr added a comment - Version 2.13 of the plugin has been released, which helps mitigate the problems seen in JENKINS-11952 .
            Hide
            oskard Oskar Danielsson added a comment - - edited

            I tried running with -no-video. It didn't work at all. I switched back to with window and this happened:

            [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            ERROR: Timeout after 5 seconds
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            ERROR: Timeout after 5 seconds
            [android] Starting Android emulator
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5748,5749 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -noaudio
            emulator: emulator window was out of view and was recentered
            
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5748

            (Nothing more happened)

            I ran it again:

            [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            * daemon not running. starting it now on port 5723 *
            * daemon started successfully *
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            [android] Starting Android emulator
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5721,5722 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -noaudio
            emulator: emulator window was out of view and was recentered
            
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721
            [android] Waiting for emulator to finish booting...
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5721
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5721
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721
            ...

            And a third time:

            [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            ERROR: Timeout after 5 seconds
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            ERROR: Timeout after 5 seconds
            [android] Starting Android emulator
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5720,5721 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -noaudio
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5720
            

            (It got stuck there)

            And fourth time (I added -wipe-data but it shouldn't make a difference)

            [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            * daemon not running. starting it now on port 5892 *
            * daemon started successfully *
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            [android] Starting Android emulator
            [android] Erasing existing emulator data...
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5890,5891 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -wipe-data -noaudio
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            [android] Waiting for emulator to finish booting...
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890
            ...

            Conclusion
            It seems to have different issues every second time. I don't understand why.

            Show
            oskard Oskar Danielsson added a comment - - edited I tried running with -no-video. It didn't work at all. I switched back to with window and this happened: [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server ERROR: Timeout after 5 seconds $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server ERROR: Timeout after 5 seconds [android] Starting Android emulator $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5748,5749 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -noaudio emulator: emulator window was out of view and was recentered $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5748 (Nothing more happened) I ran it again: [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server * daemon not running. starting it now on port 5723 * * daemon started successfully * $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server [android] Starting Android emulator $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5721,5722 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -noaudio emulator: emulator window was out of view and was recentered $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721 [android] Waiting for emulator to finish booting... $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5721 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5721 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5721 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5721 ... And a third time: [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server ERROR: Timeout after 5 seconds $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server ERROR: Timeout after 5 seconds [android] Starting Android emulator $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5720,5721 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -noaudio $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5720 (It got stuck there) And fourth time (I added -wipe-data but it shouldn't make a difference) [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server * daemon not running. starting it now on port 5892 * * daemon started successfully * $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server [android] Starting Android emulator [android] Erasing existing emulator data... $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5890,5891 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -wipe-data -noaudio $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 [android] Waiting for emulator to finish booting... $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5890 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5890 ... Conclusion It seems to have different issues every second time. I don't understand why.

              People

              • Assignee:
                orrc Christopher Orr
                Reporter:
                oskard Oskar Danielsson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: