I am trying to run some appium tests on iOS and it seems about half the time the WebDriverAgent never starts up. I get this error over and over again in the appium logs:
[debug] [simctl] WD Proxy Matched '/status' to command name 'getStatus'
[debug] [simctl] WD Proxy Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[simctl] WD Proxy connect ECONNREFUSED 127.0.0.1:8100
[debug] [simctl] WD Proxy Matched '/status' to command name 'getStatus'
[debug] [simctl] WD Proxy Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[simctl] WD Proxy connect ECONNREFUSED 127.0.0.1:8100
[debug] [simctl] WD Proxy Matched '/status' to command name 'getStatus'
[debug] [simctl] WD Proxy Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[simctl] WD Proxy connect ECONNREFUSED 127.0.0.1:8100
After this happens for some time, I'll restart the server and try again. More often than not, I'll get that error a few times but then the WebDriverAgent server will start:
debug] [simctl] WD Proxy Matched '/status' to command name 'getStatus'
[debug] [simctl] WD Proxy Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[simctl] WD Proxy connect ECONNREFUSED 127.0.0.1:8100
[debug] [simctl] WD Proxy Matched '/status' to command name 'getStatus'
[debug] [simctl] WD Proxy Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[simctl] WD Proxy connect ECONNREFUSED 127.0.0.1:8100
[debug] [simctl] WD Proxy Matched '/status' to command name 'getStatus'
[debug] [simctl] WD Proxy Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[simctl] WD Proxy connect ECONNREFUSED 127.0.0.1:8100
[debug] [simctl] WebDriverAgent Log file for xcodebuild test: /Users/kroe761/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2020.10.15_11-20-17--0500.xcresult/Staging/2_Test/Diagnostics/WebDriverAgentRunner-27B846BD-B71B-4DA7-910B-ABEB46E5890F/WebDriverAgentRunner-7B63C34A-8F4F-4B67-AD6F-3F34C50C4DF1/Session-WebDriverAgentRunner-2020-10-15_112018-MRGyT7.log
[debug] [simctl] WD Proxy Matched '/status' to command name 'getStatus'
[debug] [simctl] WD Proxy Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[simctl] WD Proxy connect ECONNREFUSED 127.0.0.1:8100
[debug] [simctl] WD Proxy Matched '/status' to command name 'getStatus'
[debug] [simctl] WD Proxy Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [simctl] WD Proxy Got response with status 200: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"testmanagerdVersion":28,"name":"iOS","sdkVersion":"14.0","version":"14.0"},"ios":{"simulatorVersion":"14.0","ip":"172.21.99.125"},"ready":true,"build":{"upgradedAt":"1602686780985","time":"Oct 15 2020 10:58:44","productBundleIdentifier":"com.facebook.WebDriverAgentRunner"}},"sessionId":null}
[debug] [simctl] WebDriverAgent WebDriverAgent information:
[debug] [simctl] WebDriverAgent {
[debug] [simctl] WebDriverAgent "message": "WebDriverAgent is ready to accept commands",
[debug] [simctl] WebDriverAgent "state": "success",
[debug] [simctl] WebDriverAgent "os": {
[debug] [simctl] WebDriverAgent "testmanagerdVersion": 28,
[debug] [simctl] WebDriverAgent "name": "iOS",
[debug] [simctl] WebDriverAgent "sdkVersion": "14.0",
[debug] [simctl] WebDriverAgent "version": "14.0"
[debug] [simctl] WebDriverAgent },
[debug] [simctl] WebDriverAgent "ios": {
[debug] [simctl] WebDriverAgent "simulatorVersion": "14.0",
[debug] [simctl] WebDriverAgent "ip": "172.xx.xx.xxx"
[debug] [simctl] WebDriverAgent },
[debug] [simctl] WebDriverAgent "ready": true,
[debug] [simctl] WebDriverAgent "build": {
[debug] [simctl] WebDriverAgent "upgradedAt": "1602686780985",
[debug] [simctl] WebDriverAgent "time": "Oct 15 2020 10:58:44",
[debug] [simctl] WebDriverAgent "productBundleIdentifier": "com.facebook.WebDriverAgentRunner"
[debug] [simctl] WebDriverAgent }
[debug] [simctl] WebDriverAgent }
[debug] [simctl] WebDriverAgent WebDriverAgent successfully started after 5889ms
[debug] [simctl] BaseDriver Event 'wdaSessionAttempted' logged at 1602778820361 (11:20:20 GMT-0500 (Central Daylight Time))
[debug] [simctl] XCUITest Sending createSession command to WDA
[debug] [simctl] WD Proxy Matched '/session' to command name 'createSession'
I absolutely hate issues where "this sometimes happens" but I've been digging into this for days and have no answer. Any help would be appreciated!
Edit: Here are my caps:
caps = {
platformName: :ios,
deviceName: "iPhone 11",
automationName: "XCUITest",
app: "/path/to/app",
sendKeyStrategy: "setValue",
showXcodeLog: true,
useNewWDA: true
}
Even though this is Tosca documentation, this might also be very helpful in explaining why #Vault23 might be right with his hint to use
useNewWDA: true and usePrebuiltWDA: true
https://documentation.tricentis.com/tosca/1340/en/content/engines_3.0/mobile/tbox_mobileweb_set_appium_capabilities.htm
Adding above two capabilities mad my local mobile tests using Appium and local simulator of an iPhone much more stable and repeatable. Though I must admit, I do not understand why.
Related
I try install docker-ce on Ubuntu 20.04.3 LTS (Focal Fossa) and I have error with overlay2. According documentation, it will be works since I have kernel 4.4.182-mainline-rev1.
INFO[2021-11-03T15:02:55.375424503+01:00] Starting up
INFO[2021-11-03T15:02:55.376873274+01:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2021-11-03T15:02:55.380156220+01:00] parsed scheme: "unix" module=grpc
INFO[2021-11-03T15:02:55.380343883+01:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-11-03T15:02:55.380511607+01:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-11-03T15:02:55.380746348+01:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-11-03T15:02:55.386164293+01:00] parsed scheme: "unix" module=grpc
INFO[2021-11-03T15:02:55.386390699+01:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-11-03T15:02:55.386507127+01:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-11-03T15:02:55.386582789+01:00] ClientConn switching balancer to "pick_first" module=grpc
ERRO[2021-11-03T15:02:55.393126880+01:00] failed to mount overlay: no such device storage-driver=overlay2
failed to start daemon: error initializing graphdriver: driver not supported
I deleted /var/lib/docker.
I created /etc/docker/daemon.json with:
{
"storage-driver": "overlay2"
}
I added DOCKER_OPTS="-s overlay2"
to /etc/default/docker.
Nothing works. Please help.
I run the following code in my python
But there is nothing happen on my android device. The appium don't launch any app on my android device. I have tried to use admin right to open appium desktop. And I also tried checked the "
Allow Session Override" on appium but still don't work.
I have also tried change the systemPort but still not work.
My appium version is 1.22.0
from appium import webdriver
desired_cap = {
"appium:deviceName": "BH9014465L",
"platformName": "Android",
"platformVersion": "8.0.0",
"appPackage ": 'net.xnano.android.ftpserver',
"appActivity": "net.xnano.android.ftpserver.MainActivity"
}
driver = webdriver.Remote("http://localhost:4723/wd/hub", desired_cap)
The appium log:
Matched '/' to command name 'deleteSession'
[WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8399/wd/hub/session/b000d8ff-aaaa-4c13-b249-d2b4bc7644fb] with no body
[WD Proxy] Got response with status 200: {"sessionId":"b000d8ff-aaaa-4c13-b249-d2b4bc7644fb","value":null}
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8399
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L forward --remove tcp:8399'
[Appium] Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver] "alwaysMatch": {
[BaseDriver] "platformName": "Android",
[BaseDriver] "appium:deviceName": "BH9014465L",
[BaseDriver] "appium:platformVersion": "8.0.0",
[BaseDriver] "appium:appPackage ": "net.xnano.android.ftpserver",
[BaseDriver] "appium:appActivity": "net.xnano.android.ftpserver.MainActivity"
[BaseDriver] },
[BaseDriver] "firstMatch": [
[BaseDriver] {}
[BaseDriver] ]
[BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] appPackage
[BaseDriver] Session created with session id: a6654c49-9424-48bf-a53d-bfc66dbd35c2
[UiAutomator2] Neither 'app' nor 'appPackage' was set. Starting UiAutomator2 without the target application
[ADB] Using 'adb.exe' from 'D:\android-sdk\platform-tools\adb.exe'
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 start-server'
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices
[ADB] Connected devices: [{"udid":"BH9014465L","state":"device"}]
[AndroidDriver] Looking for a device with Android '8.0.0'
[ADB] Setting device id to BH9014465L
[ADB] Getting device platform version
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 8.0.0
[AndroidDriver] Using device: BH9014465L
[ADB] Using 'adb.exe' from 'D:\android-sdk\platform-tools\adb.exe'
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 start-server'
[ADB] Setting device id to BH9014465L
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 26
[ADB] Device API level: 26
[AndroidDriver] No app sent in, not parsing package/activity
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L wait-for-device'
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell echo ping'
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell dumpsys package io.appium.settings'
[ADB] 'io.appium.settings' is installed
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell dumpsys package io.appium.settings'
[ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.4.0' >= '3.4.0')
[ADB] There is no need to install/upgrade 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[ADB] Getting IDs of all 'io.appium.settings' processes
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell 'pgrep --help; echo $?''
[Instrumentation] .
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell 'pgrep ^appium\\.settings$ || pgrep ^io\\.appium\\.setti$''
[Instrumentation] Time: 432.589
[Instrumentation]
[Instrumentation] OK (1 test)
[Instrumentation] The process has exited with code 0
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell appops set io.appium.settings android:mock_location allow'
[Logcat] Starting logs capture with command: D:\\android-sdk\\platform-tools\\adb.exe -P 5037 -s BH9014465L logcat -v threadtime
[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8200
[ADB] Forwarding system: 8200 to device: 6790
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L forward tcp:8200 tcp:6790'
[ADB] Getting install status for io.appium.uiautomator2.server
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell dumpsys package io.appium.uiautomator2.server'
[ADB] 'io.appium.uiautomator2.server' is installed
[ADB] Getting package info for 'io.appium.uiautomator2.server'
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell dumpsys package io.appium.uiautomator2.server'
[ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.24.0' >= '4.24.0')
[UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[ADB] Checking app cert for C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk
[ADB] Using the previously cached signature entry for 'appium-uiautomator2-server-v4.24.0.apk'
[ADB] sha256 hash did match for 'appium-uiautomator2-server-v4.24.0.apk'
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell dumpsys package io.appium.uiautomator2.server.test'
[ADB] 'io.appium.uiautomator2.server.test' is installed
[ADB] Checking app cert for C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[ADB] Using the previously cached signature entry for 'appium-uiautomator2-server-debug-androidTest.apk'
[ADB] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Server packages are not going to be (re)installed
[UiAutomator2] Waiting up to 30000ms for services to be available
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell pm list instrumentation'
[UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[ADB] Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist
[ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server.test",";"]]
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[UiAutomator2] No app capability. Assuming it is already on the device
[UiAutomator2] Performing shallow cleanup of automation leftovers
[UiAutomator2] No obsolete sessions have been detected (socket hang up)
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell am force-stop io.appium.uiautomator2.server.test'
[UiAutomator2] Starting UIAutomator2 server 4.24.0
[UiAutomator2] Using UIAutomator2 server from 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk' and test from 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online...
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s","BH9014465L","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] socket hang up
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] socket hang up
[Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] socket hang up
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[UiAutomator2] The initialization of the instrumentation process took 3242ms
[WD Proxy] Matched '/session' to command name 'createSession'
[WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8200/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"BH9014465L","platformVersion":"8.0.0","appPackage ":"net.xnano.android.ftpserver","appActivity":"net.xnano.android.ftpserver.MainActivity"},"platformName":"Android","deviceName":"BH9014465L","platformVersion":"8.0.0","appPackage ":"net.xnano.android.ftpserver","appActivity":"net.xnano.android.ftpserver.MainActivity","deviceUDID":"BH9014465L"}],"alwaysMatch":{}}}
[WD Proxy] Got response with status 200: {"sessionId":"f068b515-077d-4b9e-9657-b382034ef8d4","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"BH9014465L","platformVersion":"8.0.0","appPackage ":"net.xnano.android.ftpserver","appActivity":"net.xnano.android.ftpserver.MainActivity"},"platformName":"Android","deviceName":"BH9014465L","platformVersion":"8.0.0","appPackage ":"net.xnano.android.ftpserver","appActivity":"net.xnano.android.ftpserver.MainActivity","deviceUDID":"BH9014465L"}],"alwaysMatch":{}},"sessionId":"f068b515-077d-4b9e-9657-b382034ef8d4"}}
[WD Proxy] Determined the downstream protocol as 'W3C'
[WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/wd/hub/session/f068b515-077d-4b9e-9657-b382034ef8d4/appium/device/info] with no body
[WD Proxy] Got response with status 200: {"sessionId":"f068b515-077d-4b9e-9657-b382034ef8d4","value":{"androidId":"befd45229d2f8e0d","apiVersion":"26","bluetooth":{"state":"OFF"},"brand":"Sony","carrierName":"","displayDensity":480,"locale":"zh_HK","manufacturer":"Sony","model":"F5122","networks":[],"platformVersion":"8.0.0","realDisplaySize":"1080x1920","timeZone":"Asia/Hong_Kong"}}
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/wd/hub/session/f068b515-077d-4b9e-9657-b382034ef8d4/appium/device/pixel_ratio] with no body
[WD Proxy] Got response with status 200: {"sessionId":"f068b515-077d-4b9e-9657-b382034ef8d4","value":3}
[WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/wd/hub/session/f068b515-077d-4b9e-9657-b382034ef8d4/appium/device/system_bars] with no body
[WD Proxy] Got response with status 200: {"sessionId":"f068b515-077d-4b9e-9657-b382034ef8d4","value":{"statusBar":72}}
[WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/f068b515-077d-4b9e-9657-b382034ef8d4/window/current/size] with no body
[WD Proxy] Got response with status 200: {"sessionId":"f068b515-077d-4b9e-9657-b382034ef8d4","value":{"height":1776,"width":1080}}
[Appium] New AndroidUiautomator2Driver session created successfully, session a6654c49-9424-48bf-a53d-bfc66dbd35c2 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1634375217171 (17:06:57 GMT+0800 (中國標準時間))
[W3C (a6654c49)] Cached the protocol value 'W3C' for the new session a6654c49-9424-48bf-a53d-bfc66dbd35c2
[W3C (a6654c49)] Responding to client with driver.createSession() result: {"capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"BH9014465L","platformVersion":"8.0.0","appPackage ":"net.xnano.android.ftpserver","appActivity":"net.xnano.android.ftpserver.MainActivity"},"platformName":"Android","deviceName":"BH9014465L","platformVersion":"8.0.0","appPackage ":"net.xnano.android.ftpserver","appActivity":"net.xnano.android.ftpserver.MainActivity","deviceUDID":"BH9014465L","deviceApiLevel":26,"deviceScreenSize":"1080x1920","deviceScreenDensity":480,"deviceModel":"F5122","deviceManufacturer":"Sony","pixelRatio":3,"statBarHeight":72,"viewportRect":{"left":0,"top":72,"width":1080,"height":1704}}}
[HTTP] <-- POST /wd/hub/session 200 7408 ms - 890
[HTTP]
[BaseDriver] Shutting down because we waited 60 seconds for a command
[Appium] Closing session, cause was 'New Command Timeout of 60 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
[Appium] Removing session 'a6654c49-9424-48bf-a53d-bfc66dbd35c2' from our master session list
[UiAutomator2] Deleting UiAutomator2 session
[UiAutomator2] Deleting UiAutomator2 server session
[WD Proxy] Matched '/' to command name 'deleteSession'
[WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/wd/hub/session/f068b515-077d-4b9e-9657-b382034ef8d4] with no body
[WD Proxy] socket hang up
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8200
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe -P 5037 -s BH9014465L forward --remove tcp:8200'
I may be wrong but I am pretty sure that on appium python you can't use appPackage and appActivity, you have to use app and import a zip containing your app:
"app": "path/to/app.zip"
UPDATE: You can use .apk instead of .zip since they are technically the same.
Example: https://github.com/appium/python-client#usage
In the section Remote Path add : "/wd/hub"
I have
$ cat terraform.Dockerfile
FROM alpine
MAINTAINER Carlos Nunez <dev#carlosnunez.me>
RUN wget -O /tmp/terraform.zip https://releases.hashicorp.com/terraform/0.12.9/terraform_0.12.9_linux_amd64.zip && \
unzip /tmp/terraform.zip -d /
RUN apk update && apk add --no-cache ca-certificates curl
USER nobody
When I do
$ docker-compose run terraform /terraform init
I get
$ docker-compose run terraform /terraform init
2020/03/29 08:25:36 [INFO] Terraform version: 0.12.9
2020/03/29 08:25:36 [INFO] Go runtime version: go1.12.9
2020/03/29 08:25:36 [INFO] CLI args: []string{"/terraform", "init"}
2020/03/29 08:25:36 [DEBUG] Attempting to open CLI config file: /.terraformrc
2020/03/29 08:25:36 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/03/29 08:25:36 [INFO] CLI command args: []string{"init"}
2020/03/29 08:25:36 [ERR] Checkpoint error: mkdir /.terraform.d: permission denied
Initializing the backend...
2020/03/29 08:25:36 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/03/29 08:25:36 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/03/29 08:25:36 [DEBUG] New state was assigned lineage "cff52927-0e9b-8ef4-8aeb-2b176dbc40a6"
2020/03/29 08:25:36 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2020/03/29 08:25:36 [TRACE] Meta.Backend: instantiated backend of type <nil>
2020/03/29 08:25:36 [DEBUG] checking for provider in "."
2020/03/29 08:25:36 [DEBUG] checking for provider in "/"
2020/03/29 08:25:36 [DEBUG] checking for provisioner in "."
2020/03/29 08:25:36 [DEBUG] checking for provisioner in "/"
2020/03/29 08:25:36 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory
2020/03/29 08:25:36 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2020/03/29 08:25:36 [TRACE] backend/local: state manager for workspace "default" will:
- read initial snapshot from terraform.tfstate
- write new snapshots to terraform.tfstate
- create any backup at terraform.tfstate.backup
2020/03/29 08:25:36 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2020/03/29 08:25:36 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2020/03/29 08:25:36 [TRACE] statemgr.Filesystem: read nil snapshot
2020/03/29 08:25:36 [DEBUG] checking for provider in "."
2020/03/29 08:25:36 [DEBUG] checking for provider in "/"
2020/03/29 08:25:36 [DEBUG] plugin requirements: "aws"=""
2020/03/29 08:25:36 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2020/03/29 08:25:36 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json
Initializing provider plugins...
- Checking for available provider plugins...
2020/03/29 08:25:36 [DEBUG] Failed to request discovery document: Get https://registry.terraform.io/.well-known/terraform.json: x509: certificate signed by unknown authority
Registry service unreachable.
This may indicate a network issue, or an issue with the requested Terraform Registry.
Error: registry service is unreachable, check https://status.hashicorp.com/ for status updates
I saw several links online indicating same/similar error that was solved by installing curl.
I have curl on the container, I verified it.
$ docker-compose run terraform curl --version
curl 7.67.0 (x86_64-alpine-linux-musl) libcurl/7.67.0 OpenSSL/1.1.1d zlib/1.2.11 nghttp2/1.40.0
Release-Date: 2019-11-06
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets
I also have the certificates installed:
$ docker-compose run terraform ls -lR /etc/ssl
Here is output of curl -v
$ docker-compose run --entrypoint 'curl -v --insecure https://registry.terraform.io/.well-known/terraform.json' terraform
* Trying 151.101.190.49:443...
* TCP_NODELAY set
* Connected to registry.terraform.io (151.101.190.49) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Fastly, Inc.; CN=q2.shared.global.fastly.net
* start date: Apr 1 14:48:12 2020 GMT
* expire date: Aug 29 17:17:53 2020 GMT
* issuer: C=US; ST=CA; O=paloalto networks; OU=IT; CN=decrypt.paloaltonetworks.com
* SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55cce9444220)
> GET /.well-known/terraform.json HTTP/2
> Host: registry.terraform.io
> user-agent: curl/7.67.0
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 200
< server: Cowboy
< cache-control: stale-if-error=31536000, public, max-age=3600
< content-security-policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://www.google-analytics.com https://cdn.segment.com https://www.googletagmanager.com https://a.optnmstr.com; style-src 'self' 'unsafe-inline' https://maxcdn.bootstrapcdn.com https://fonts.googleapis.com https://p.typekit.net https://use.typekit.net; img-src 'self' data: https: https://www.google-analytics.com; font-src 'self' https://maxcdn.bootstrapcdn.com https://fonts.googleapis.com https://fonts.gstatic.com https://use.typekit.net; connect-src 'self' https://www.google-analytics.com https://api.segment.io https://sentry.io https://api.omappapi.com https://api.opmnstr.com https://api.optmnstr.com
< content-type: application/json
< feature-policy:
< last-modified: Fri, 10 Apr 2020 08:49:04 GMT
< referrer-policy: no-referrer-when-downgrade
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-content-type-options: nosniff
< x-frame-options: DENY
< x-xss-protection: 1; mode=block
< via: 1.1 vegur
< via: 1.1 varnish
< accept-ranges: bytes
< date: Sat, 11 Apr 2020 06:07:54 GMT
< via: 1.1 varnish
< age: 63
< x-served-by: cache-dca17758-DCA, cache-pao17436-PAO
< x-cache: HIT, HIT
< x-cache-hits: 1, 1
< vary: Accept-Encoding
< content-length: 62
<
{"modules.v1":"/v1/modules/","providers.v1":"/v1/providers/"}
* Connection #0 to host registry.terraform.io left intact
Run update-ca-certificates after you instal the ca-certificates package. Docker layer caching may prevent it from re-running the install step, and the CA Certificates are likely out of date.
Running update-ca-certificates didnt work for me. I tried below method of mapping node's cert file copy to container's cert file and it worked.
try to check if the node on which docker container is installed is able to connect to terraform.
Do "curl -v https://registry.terraform.io/.well-known/terraform.json" on both, docker node as well as container.
If node's curl works and container's fails, then try to create copy of the cert file. Cert file location can be fetched from curl command output as below.
After creating copy map this certificates file to container's certificate file (location for which you will get in container's curl command).
If your both of our curl fails try updating your certificate and then try above method.
link for image containing curl cmd output and the certificate location in the request header
OS: window7
virtualization tool: virtualbox
virtual hypervisor: centos7
linux core as below
[root#localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Two host IPs:
192.168.100.101
192.168.100.102
The steps:
curl -L git.io/weave -o /usr/local/bin/weave
chmod a+x /usr/local/bin/weave
[root#localhost ~]# weave launch 192.168.100.102
WARNING: existing iptables rule
'-A FORWARD -j REJECT --reject-with icmp-host-prohibited'
will block name resolution via weaveDNS - please reconfigure your firewall.
cannot locate running docker daemon
Warning: unable to detect proxy TLS configuration. To enable TLS, launch the proxy with ‘weave launch’ and supply TLS options. To suppress this warning, supply the ‘–no-detect-tls’ option.
3227932d5be77917c4e0b780cafe1171287c1029637f2360ece580fe6239cb4f
[root#localhost ~]# weave status
Version: 2.1.1 (failed to check latest version - see logs; next check at 2017/11/28 19:18:07)
Service: router
Protocol: weave 1..2
Name: 06:e0:c4:68:0c:ae(localhost.localdomain)
Encryption: disabled
PeerDiscovery: enabled
Targets: 1
Connections: 1 (1 failed)
Peers: 1
TrustedSubnets: none
Service: ipam
Status: ready
Range: 10.32.0.0/12
DefaultSubnet: 10.32.0.0/12
Service: dns
Domain: weave.local.
Upstream: 135.251.4.190, 135.251.38.218, 192.168.1.1
TTL: 1
Entries: 0
Service: proxy
Address: unix:///var/run/weave/weave.sock
Service: plugin (legacy)
DriverName: weave
[root#localhost ~]# weave version
weave script 2.1.1
weave 2.1.1
As above , the Connections: 1 (1 failed) , the docker run on these two hosts can’t ping each other.
And when I type weave version, it only showed weave script 2.1.1 and weave 2.1.1, not like other articles said it will show weaveexec and plugin or weavedns and so on. Is this the difference between versions or some mistakes I have made ?
Please help , thank you very much!
my docker log as below
[root#localhost ~]# docker logs weave
INFO: 2017/11/29 01:08:07.807752 Command line options: map[dns-effective-listen-address:172.17.0.1 nickname:localhost.localdomain dns-listen-address:172.17.0.1:53 ipalloc-range:10.32.0.0/12 status-addr:127.0.0.1:6782 weave-bridge:weave H:[unix:///var/run/weave/weave.sock] host-root:/host http-addr:127.0.0.1:6784 port:6783 proxy:true resolv-conf:/var/run/weave/etc/resolv.conf datapath:datapath docker-bridge:docker0 plugin:true]
INFO: 2017/11/29 01:08:07.807841 weave 2.1.1
INFO: 2017/11/29 01:08:07.859209 Docker API on unix:///var/run/docker.sock: &[ApiVersion=1.24 GoVersion=go1.8.3 Os=linux BuildTime=2017-10-24T15:40:21.112972404+00:00 PkgVersion=docker-1.12.6-61.git85d7426.el7.centos.x86_64 Version=1.12.6 Arch=amd64 KernelVersion=3.10.0-693.5.2.el7.x86_64 GitCommit=85d7426/1.12.6]
INFO: 2017/11/29 01:08:07.859520 Using docker bridge IP for DNS: 172.17.0.1
INFO: 2017/11/29 01:08:07.863781 proxy listening on unix:///var/run/weave/weave.sock
INFO: 2017/11/29 01:08:08.940871 Bridge type is bridged_fastdp
INFO: 2017/11/29 01:08:08.940885 Communication between peers is unencrypted.
INFO: 2017/11/29 01:08:08.961891 Our name is 06:e0:c4:68:0c:ae(localhost.localdomain)
INFO: 2017/11/29 01:08:08.962058 Restart/resume detected - using persisted peer list: [192.168.100.102]
INFO: 2017/11/29 01:08:08.972210 Docker API on unix:///var/run/docker.sock: &[KernelVersion=3.10.0-693.5.2.el7.x86_64 PkgVersion=docker-1.12.6-61.git85d7426.el7.centos.x86_64 GoVersion=go1.8.3 Os=linux Arch=amd64 BuildTime=2017-10-24T15:40:21.112972404+00:00 Version=1.12.6 ApiVersion=1.24 GitCommit=85d7426/1.12.6]
INFO: 2017/11/29 01:08:08.974990 Checking for pre-existing addresses on weave bridge
INFO: 2017/11/29 01:08:09.009949 [allocator 06:e0:c4:68:0c:ae] Initialising with persisted data
INFO: 2017/11/29 01:08:09.034491 Listening for DNS queries on 172.17.0.1
INFO: 2017/11/29 01:08:09.086102 Sniffing traffic on datapath (via ODP)
INFO: 2017/11/29 01:08:09.114882 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:08:09.116392 Listening for HTTP control messages on 127.0.0.1:6784
INFO: 2017/11/29 01:08:09.116576 Listening for metrics requests on 127.0.0.1:6782
INFO: 2017/11/29 01:08:09.125917 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:08:09.151109 Waiting for Weave API Server...
INFO: 2017/11/29 01:08:09.159548 Finished waiting for Weave API Server
INFO: 2017/11/29 01:08:09.159706 Listening on /run/docker/plugins/weave.sock for global scope
INFO: 2017/11/29 01:08:09.159811 Listening on /run/docker/plugins/weavemesh.sock for local scope
INFO: 2017/11/29 01:08:09.159822 Creating default "weave" network
INFO: 2017/11/29 01:08:09.462160 Discovered local MAC 06:e0:c4:68:0c:ae
INFO: 2017/11/29 01:08:09.547179 Discovered local MAC 46:2b:0d:08:12:be
INFO: 2017/11/29 01:08:09.554830 Discovered local MAC 0e:46:f3:dd:57:96
INFO: 2017/11/29 01:08:11.612424 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:08:11.614477 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:08:13.980824 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:08:13.982289 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:08:18.124543 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:08:18.125556 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:08:23.294574 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:08:23.322022 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:08:37.070537 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:08:37.073928 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:08:39.222651 Error checking version: Get https://checkpoint-api.weave.works/v1/check/weave-net?arch=amd64&flag_docker-version=1.12.6&flag_kernel-version=3.10.0-693.5.2.el7.x86_64&os=linux&signature=fvXv9SDD9r8gjV6d2HrXkVdBv5U72%2BeXQ6NT2u0JkKc%3D&version=2.1.1: dial tcp: lookup checkpoint-api.weave.works on 135.252.166.21:53: read udp 192.168.100.101:34840->135.252.166.21:53: i/o timeout
INFO: 2017/11/29 01:08:46.009136 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:08:46.011168 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:09:16.169210 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:09:16.171278 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:09:42.294136 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:09:42.296081 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:10:28.752091 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:10:28.756481 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:12:03.755330 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:12:03.760374 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:14:30.481453 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:14:30.486632 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:17:41.166716 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:17:41.168341 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:22:38.820826 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:22:38.829815 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
INFO: 2017/11/29 01:23:08.968136 Expired MAC 06:e0:c4:68:0c:ae at 06:e0:c4:68:0c:ae(localhost.localdomain)
INFO: 2017/11/29 01:23:08.968199 Expired MAC 46:2b:0d:08:12:be at 06:e0:c4:68:0c:ae(localhost.localdomain)
INFO: 2017/11/29 01:23:08.968219 Expired MAC 0e:46:f3:dd:57:96 at 06:e0:c4:68:0c:ae(localhost.localdomain)
INFO: 2017/11/29 01:30:27.085406 ->[192.168.100.102:6783] attempting connection
INFO: 2017/11/29 01:30:27.089200 ->[192.168.100.102:6783] error during connection attempt: dial tcp4 :0->192.168.100.102:6783: getsockopt: no route to host
but on 192.168.100.101 , I can ping 192.168.100.102
[root#localhost ~]# ping 192.168.100.102
PING 192.168.100.102 (192.168.100.102) 56(84) bytes of data.
64 bytes from 192.168.100.102: icmp_seq=1 ttl=64 time=1.19 ms
64 bytes from 192.168.100.102: icmp_seq=2 ttl=64 time=1.05 ms
64 bytes from 192.168.100.102: icmp_seq=3 ttl=64 time=0.906 ms
^C
--- 192.168.100.102 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.906/1.051/1.195/0.120 ms
The issue has been resolved and shared my experience here.
As I described in my question
[root#localhost ~]# weave launch 192.168.100.102
WARNING: existing iptables rule
'-A FORWARD -j REJECT --reject-with icmp-host-prohibited'
will block name resolution via weaveDNS - please reconfigure your firewall.
cannot locate running docker daemon
Warning: unable to detect proxy TLS configuration. To enable TLS, launch the proxy with ‘weave launch’ and supply TLS options. To suppress this warning, supply the ‘–no-detect-tls’ option.
3227932d5be77917c4e0b780cafe1171287c1029637f2360ece580fe6239cb4f
Then on both hosts ,I run command
[root#localhost ~]# iptables -F
And then stop and rm all docker container and stop weave and then restart docker daemon and then on host 192.168.100.101 ,run command
[root#localhost ~]# weave launch
[root#localhost ~]# eval $(weave env)
[root#localhost ~]# docker run --name bbox1 -itd busybox
[root#localhost ~]# docker run --name bbox2 -itd busybox
and on host 192.168.100.102 , run command
[root#localhost ~]# weave launch 192.168.100.101
[root#localhost ~]# eval $(weave env)
[root#localhost ~]# docker run --name bbox3 -itd busybox
And then test
[root#localhost ~]# docker exec bbox3 ping -c2 bbox1
PING bbox1 (10.32.0.1): 56 data bytes
64 bytes from 10.32.0.1: seq=0 ttl=64 time=0.940 ms
64 bytes from 10.32.0.1: seq=1 ttl=64 time=2.362 ms
--- bbox1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.940/1.651/2.362 ms
Done!
so it seemed that the iptables rule is the root cause. I will learn more iptables rules later so that avoid merely using "iptables -F".
Thanks for #Marc Carré very much.
it only showed weave script 2.1.1 and weave 2.1.1, not like other articles said it will show weaveexec and plugin or weavedns and so on
This is expected with your version of Weave Net.
In prior versions, Weave Net started different containers, but starting Weave Net 2.0, these have been merged together.
See also:
https://github.com/weaveworks/weave/blob/master/CHANGELOG.md#release-200
All of Weave Net now runs in one container
Previously we had three separate containers for routing, Docker API proxy and Docker plugin. Running everything in one simplifies start-up and removes the need to detect various error conditions. #1642,#2897,#2936,#2945,#2946,#2951,#2960
https://www.weave.works/blog/weave-net-2-released
In Weave Net 2.0, the various processes forming Weave Net were merged into a single process.
and what follows.
Would you mind pointing to the docs which caused the confusion, so that we could improve these?
I have a Dockerfile inside which I run npm install
...
RUN npm install
....
This errors out with the following:
npm ERR! Linux 4.4.0-92-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! code DEPTH_ZERO_SELF_SIGNED_CERT
npm ERR! self signed certificate
I don't hit this issue when running npm install directly on the same machine. (i.e when I am running it not part of docker build). So I don't believe the issue is related to any http proxies.
#Tarun,
Here is the output of curl -v https://docker.com
----* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
server certificate verification OK
server certificate status verification SKIPPED
common name: *.docker.com (matched)
server certificate expiration date OK
server certificate activation date OK
certificate public key: RSA
certificate version: #3
subject: CN=*.docker.com
start date: Fri, 11 Aug 2017 00:00:00 GMT
expire date: Tue, 11 Sep 2018 12:00:00 GMT
issuer: C=US,O=Amazon,OU=Server CA 1B,CN=Amazon
compression: NULL
ALPN, server did not agree to a protocol
GET / HTTP/1.1
Host: docker.com
User-Agent: curl/7.47.0
And here is the curl command from inside a docker container on the box.
root#2145cd2e9997:/app/c3po# curl -v https://docker.com
Rebuilt URL to: https://docker.com/
Hostname was NOT found in DNS cache
Trying 52.55.168.191...
Connected to docker.com (52.55.168.191) port 443 (#0)
successfully set certificate verify locations:
CAfile: none
CApath: /etc/ssl/certs
SSLv3, TLS handshake, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS alert, Server hello (2):
SSL certificate problem: self signed certificate
Closing connection 0
SSLv3, TLS alert, Client hello (1):
curl: (60) SSL certificate problem: self signed certificate
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
If you are running a few npm commands from Dockerfile, then you can add this before you run the npm commands:
RUN npm config set strict-ssl false
RUN npm install
Note: it is recommended to copy your company's root certificates (if you are behind a company firewall) to the container rather than disabling SSL altogether.
I figured this out. I was running jenkins on the docker host, and I was using iptables to forward port 443 to 8080. This was conflicting with docker's own iptable rules which was causing all my issues with self signed certs.
This stackoverflow post helped me identify the issue: SSL certificate verification fails inside docker container on specific server