错误:无法绑定到套接字:地址已在使用中

时间:2015-11-29 16:42:46

标签: appium

我在39个模拟器上并行运行appium脚本,有时会在为少数模拟器(39个模拟器中的3个或4个)创建appium会话时抛出异常。请查看以下错误以获取更多详细信息。     我使用的是Appium 1.4.14和Ubuntu 14.04 LTS。

**Error details:**

2015-11-27 17:29:21:492 - info: [debug] Using fast reset? true

2015-11-27 17:29:21:492 - info: [debug] Preparing device for session

2015-11-27 17:29:21:493 - info: [debug] Not checking whether app is present since we are assuming it's already on the device

2015-11-27 17:29:21:494 - info: Retrieving device

2015-11-27 17:29:21:495 - info: [debug] Trying to find a connected android device

2015-11-27 17:29:21:496 - info: [debug] Getting connected devices...

2015-11-27 17:29:21:501 - info: [debug] executing cmd: /home/user/Android/Sdk/platform-tools/adb devices

2015-11-27 17:29:21:530 - info: [debug] 39 device(s) connected

2015-11-27 17:29:21:531 - info: Found device emulator-5590

2015-11-27 17:29:21:531 - info: [debug] Setting device id to emulator-5590

2015-11-27 17:29:21:532 - info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)

2015-11-27 17:29:21:533 - info: [debug] executing cmd: /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 wait-for-device

2015-11-27 17:29:21:555 - info: [debug] executing cmd: /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 shell "echo 'ready'"

2015-11-27 17:29:21:620 - info: [debug] Starting logcat capture

2015-11-27 17:29:21:712 - info: [debug] Getting device API level

2015-11-27 17:29:21:713 - info: [debug] executing cmd: /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 shell "getprop ro.build.version.sdk"

2015-11-27 17:29:21:833 - info: [debug] Device is at API Level 19

2015-11-27 17:29:21:834 - info: Device API level is: 19

2015-11-27 17:29:21:835 - info: [debug] Extracting strings for language: default

2015-11-27 17:29:21:836 - info: [debug] Apk doesn't exist locally

2015-11-27 17:29:21:836 - info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring

2015-11-27 17:29:21:837 - info: [debug] executing cmd: /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 shell "rm -rf /data/local/tmp/strings.json"

2015-11-27 17:29:22:135 - info: [debug] Not uninstalling app since server not started with --full-reset

2015-11-27 17:29:22:137 - info: [debug] Skipping install since we launched with a package instead of an app path

2015-11-27 17:29:22:138 - info: [debug] Forwarding system:37036 to device:4724

2015-11-27 17:29:22:140 - info: [debug] executing cmd: /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 forward tcp:37036 tcp:4724

2015-11-27 17:29:22:164 - info: [debug] Stopping logcat capture

2015-11-27 17:29:22:167 - info: [debug] Logcat terminated with code null, signal SIGTERM

2015-11-27 17:29:22:168 - info: [debug] Sent shutdown command, waiting for UiAutomator to stop...

2015-11-27 17:29:29:173 - warn: UiAutomator did not shut down fast enough, calling it gone

2015-11-27 17:29:29:174 - info: [debug] Cleaning up android objects

2015-11-27 17:29:29:177 - info: [debug] Cleaning up appium session

2015-11-27 17:29:29:180 - error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 forward tcp:37036 tcp:4724

error: cannot bind to socket: Address already in use

error: cannot bind to socket: Address already in use

2015-11-27 17:29:29:193 - info: [debug] Error: Command failed: /bin/sh -c /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 forward tcp:37036 tcp:4724

error: cannot bind to socket: Address already in use

error: cannot bind to socket: Address already in use

at ChildProcess.exithandler (child_process.js:203:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)

2015-11-27 17:29:29:195 - info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Command failed: /bin/sh -c /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 forward tcp:37036 tcp:4724\nerror: cannot bind to socket: Address already in use\nerror: cannot bind to socket: Address already in use\n)","killed":false,"code":1,"signal":null,"cmd":"/bin/sh -c /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 forward tcp:37036 tcp:4724","origValue":"Command failed: /bin/sh -c /home/user/Android/Sdk/platform-tools/adb -s emulator-5590 forward tcp:37036 tcp:4724\nerror: cannot bind to socket: Address already in use\nerror: cannot bind to socket: Address already in use\n"},"sessionId":null}
2015-11-27 17:29:29:203 - info: <-- POST /wd/hub/session 500 7944.285 ms - 709

please help me fix this issue..

Thank you in advance for your support,
Tirupathi Rao

0 个答案:

没有答案