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

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

    XMLWordPrintable

    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

            oskard Oskar Danielsson created issue -
            oskard Oskar Danielsson made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-11952 [ JENKINS-11952 ]
            oskard Oskar Danielsson made changes -
            Environment OS X Mavericks 10.9.1 running on Virtual Machine
            3062MB RAM

            [Android Emulator 2.12 SNAPSHOT (Jun 9)|https://jenkins.ci.cloudbees.com/job/plugins/job/android-emulator-plugin/65/org.jenkins-ci.plugins$android-emulator/]
            OS X Mavericks 10.9.1 running on Virtual Machine
            3062MB RAM

            Android Emulator 2.12 SNAPSHOT (Jun 9): https://jenkins.ci.cloudbees.com/job/plugins/job/android-emulator-plugin/65/org.jenkins-ci.plugins$android-emulator/
            oskard Oskar Danielsson made changes -
            Summary First time build "adb start-server" times out after 5 seconds Emulator plugin first time build "adb start-server" times out after 5 seconds
            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.
            oskard Oskar Danielsson made changes -
            Link This issue is related to JENKINS-23736 [ JENKINS-23736 ]
            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 .
            orrc Christopher Orr made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Resolution Incomplete [ 4 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 156524 ] JNJira + In-Review [ 207841 ]

              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: