While running terraform inside a docker container, I am facing some issue which is causing me a lot of trouble.
I am simply running terraform init and getting following error.
2020/12/05 17:59:44 [INFO] Terraform version: 0.12.24
2020/12/05 17:59:44 [INFO] Go runtime version: go1.12.13
2020/12/05 17:59:44 [INFO] CLI args: []string{"/bin/terraform", "init"}
2020/12/05 17:59:44 [DEBUG] Attempting to open CLI config file: /root/.terraformrc
2020/12/05 17:59:44 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/12/05 17:59:44 [INFO] CLI command args: []string{"init"}
Initializing the backend...
2020/12/05 17:59:44 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/12/05 17:59:44 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/12/05 17:59:44 [DEBUG] New state was assigned lineage "f8a611ca-c103-f9fd-aad6-c0c6e9484f34"
2020/12/05 17:59:44 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2020/12/05 17:59:44 [TRACE] Meta.Backend: instantiated backend of type <nil>
2020/12/05 17:59:44 [DEBUG] checking for provider in "."
2020/12/05 17:59:44 [DEBUG] checking for provider in "/bin"
2020/12/05 17:59:44 [DEBUG] checking for provisioner in "."
2020/12/05 17:59:44 [DEBUG] checking for provisioner in "/bin"
2020/12/05 17:59:44 [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/12/05 17:59:44 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2020/12/05 17:59:44 [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/12/05 17:59:44 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2020/12/05 17:59:44 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2020/12/05 17:59:44 [TRACE] statemgr.Filesystem: read nil snapshot
2020/12/05 17:59:44 [DEBUG] checking for provider in "."
2020/12/05 17:59:44 [DEBUG] checking for provider in "/bin"
Initializing provider plugins...
- Checking for available provider plugins...
2020/12/05 17:59:44 [DEBUG] plugin requirements: "aws"=""
2020/12/05 17:59:44 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2020/12/05 17:59:44 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json
2020/12/05 17:59:54 [DEBUG] Failed to request discovery document: Get https://registry.terraform.io/.well-known/terraform.json: net/http: TLS handshake timeout
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 am unable to understand the issue, I have not mounted anything on the container.
Related
I am using Appium V2.0 and for Appium Inspector client I am getting the following:
My ENV variables have been set up in Windows 10 accordingly:
Path for both system and user variables are:
C:\Users\slai6\AppData\Local\Android\Sdk\platform-tools
C:\Users\slai6\AppData\Local\Android\Sdk\emulator
C:\Users\slai6\AppData\Local\Android\Sdk\tools\bin
Server log :
C:\Users\slai6>appium server -p 9000 -a 127.0.0.1
[Appium] Welcome to Appium v2.0.0-beta.55
[Appium] Non-default server args:
[Appium] {
[Appium] address: '127.0.0.1',
[Appium] port: 9000
[Appium] }
[Appium] Attempting to load driver uiautomator2...
[debug] [Appium] Requiring driver at C:\Users\slai6\.appium\node_modules\appium-uiautomator2-driver
[Appium] Appium REST http interface listener started on 127.0.0.1:9000
[Appium] Available drivers:
[Appium] - uiautomator2#2.12.3 (automationName 'UiAutomator2')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] --> POST /session
[HTTP] {"capabilities":{"alwaysMatch":{"appium:platformName":"Android","appium:automationName":"UIAutomator2","appium:deviceName":"PixelSix","appium:app":"C:\\Users\\slai6\\Downloads\\ReactNativePipeline20230207.1.apk","appium:platformVersion":"11","appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},"firstMatch":[{}]},"desiredCapabilities":{"appium:platformName":"Android","appium:automationName":"UIAutomator2","appium:deviceName":"PixelSix","appium:app":"C:\\Users\\slai6\\Downloads\\ReactNativePipeline20230207.1.apk","appium:platformVersion":"11","appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true}}
[debug] [AppiumDriver#3ea3] Calling AppiumDriver.createSession() with args: [{"appium:platformName":"Android","appium:automationName":"UIAutomator2","appium:deviceName":"PixelSix","appium:app":"C:\\Users\\slai6\\Downloads\\ReactNativePipeline20230207.1.apk","appium:platformVersion":"11","appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},null,{"alwaysMatch":{"appium:platformName":"Android","appium:automationName":"UIAutomator2","appium:deviceName":"PixelSix","appium:app":"C:\\Users\\slai6\\Downloads\\ReactNativePipeline20230207.1.apk","appium:platformVersion":"11","appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},"firstMatch":[{}]}]
[debug] [AppiumDriver#3ea3] Event 'newSessionRequested' logged at 1676346925975 (14:55:25 GMT+1100 (Australian Eastern Daylight Time))
[BaseDriver] The capabilities ["platformName"] are standard capabilities and do not require "appium:" prefix
[Appium] Attempting to find matching driver for automationName 'UIAutomator2' and platformName 'Android'
[Appium] The 'uiautomator2' driver was installed and matched caps.
[Appium] Will require it at C:\Users\slai6\.appium\node_modules\appium-uiautomator2-driver
[debug] [Appium] Requiring driver at C:\Users\slai6\.appium\node_modules\appium-uiautomator2-driver
[AppiumDriver#3ea3] Appium v2.0.0-beta.55 creating new AndroidUiautomator2Driver (v2.12.3) session
[AppiumDriver#3ea3] Checking BaseDriver versions for Appium and AndroidUiautomator2Driver
[AppiumDriver#3ea3] Appium's BaseDriver version is 9.3.1
[AppiumDriver#3ea3] AndroidUiautomator2Driver's BaseDriver version is 9.3.1
[debug] [AndroidUiautomator2Driver#a95b] Creating session with W3C capabilities: {
[debug] [AndroidUiautomator2Driver#a95b] "alwaysMatch": {
[debug] [AndroidUiautomator2Driver#a95b] "platformName": "Android",
[debug] [AndroidUiautomator2Driver#a95b] "appium:automationName": "UIAutomator2",
[debug] [AndroidUiautomator2Driver#a95b] "appium:deviceName": "PixelSix",
[debug] [AndroidUiautomator2Driver#a95b] "appium:app": "C:\\Users\\slai6\\Downloads\\ReactNativePipeline20230207.1.apk",
[debug] [AndroidUiautomator2Driver#a95b] "appium:platformVersion": "11",
[debug] [AndroidUiautomator2Driver#a95b] "appium:newCommandTimeout": 3600,
[debug] [AndroidUiautomator2Driver#a95b] "appium:connectHardwareKeyboard": true
[debug] [AndroidUiautomator2Driver#a95b] },
[debug] [AndroidUiautomator2Driver#a95b] "firstMatch": [
[debug] [AndroidUiautomator2Driver#a95b] {}
[debug] [AndroidUiautomator2Driver#a95b] ]
[debug] [AndroidUiautomator2Driver#a95b] }
[AndroidUiautomator2Driver#a95b] The following capabilities were provided, but are not recognized by Appium:
[AndroidUiautomator2Driver#a95b] connectHardwareKeyboard
[AndroidUiautomator2Driver#a95b (b8865142)] Session created with session id: b8865142-7c11-4a95-bbb4-62e26355f955
[BaseDriver] Using local app 'C:\Users\slai6\Downloads\ReactNativePipeline20230207.1.apk'
[debug] [AndroidUiautomator2Driver#a95b (b8865142)] Checking whether app is actually present
[debug] [AndroidUiautomator2Driver#a95b (b8865142)] Deleting UiAutomator2 session
[debug] [AppiumDriver#3ea3] Event 'newSessionStarted' logged at 1676346926130 (14:55:26 GMT+1100 (Australian Eastern Daylight Time))
[debug] [AppiumDriver#3ea3] Encountered internal error running command: Error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. Read https://developer.android.com/studio/command-line/variables for more details
[debug] [AppiumDriver#3ea3] at requireSdkRoot (C:\Users\slai6\.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-adb\lib\helpers.js:81:11)
[debug] [AppiumDriver#3ea3] at Function.createADB (C:\Users\slai6\.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-adb\lib\adb.js:80:37)
[debug] [AppiumDriver#3ea3] at Object.createBaseADB (C:\Users\slai6\.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-android-driver\lib\android-helpers.js:129:20)
[debug] [AppiumDriver#3ea3] at Object.getDeviceInfoFromCaps (C:\Users\slai6\.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-android-driver\lib\android-helpers.js:220:29)
[debug] [AppiumDriver#3ea3] at AndroidUiautomator2Driver.startUiAutomator2Session (C:\Users\slai6\.appium\node_modules\appium-uiautomator2-driver\lib\driver.js:350:40)
[debug] [AppiumDriver#3ea3] at AndroidUiautomator2Driver.createSession (C:\Users\slai6\.appium\node_modules\appium-uiautomator2-driver\lib\driver.js:241:18)
[debug] [AppiumDriver#3ea3] at AppiumDriver.createSession (C:\Users\slai6\AppData\Roaming\npm\node_modules\appium\lib\appium.js:337:35)
[HTTP] <-- POST /session 500 246 ms - 882
I've also used Appium doctor to troublkeshoot the set up issues and this is what it said:
info AppiumDoctor Appium Doctor v.2.0.7
info AppiumDoctor ### Diagnostic for necessary dependencies starting ###
info AppiumDoctor ✔ APPIUM_HOME is C:\Users\slai6\.appium
info AppiumDoctor ✔ The Node.js binary was found at: C:\Program Files\nodejs\node.EXE
info AppiumDoctor ✔ Node version is 19.6.0
WARN AppiumDoctor ✖ ANDROID_HOME environment variable is NOT set!
info AppiumDoctor ✔ JAVA_HOME is set to: C:\Program Files\Java\jdk-19
WARN AppiumDoctor ✖ adb, emulator, apkanalyzer.bat could not be found because ANDROID_HOME or ANDROID_SDK_ROOT is NOT set!
info AppiumDoctor ✔ 'bin' subfolder exists under 'C:\Program Files\Java\jdk-19'
info AppiumDoctor ### Diagnostic for necessary dependencies completed, 2 fixes needed. ###
info AppiumDoctor
info AppiumDoctor ### Diagnostic for optional dependencies starting ###
WARN AppiumDoctor ✖ ffmpeg cannot be found
WARN AppiumDoctor ✖ mjpeg-consumer cannot be found.
WARN AppiumDoctor ✖ bundletool.jar cannot be found
WARN AppiumDoctor ✖ gst-launch-1.0.exe and/or gst-inspect-1.0.exe cannot be found
info AppiumDoctor ### Diagnostic for optional dependencies completed, 4 fixes possible. ###
info AppiumDoctor
info AppiumDoctor ### Manual Fixes Needed ###
info AppiumDoctor The configuration cannot be automatically fixed, please do the following first:
WARN AppiumDoctor ➜ Make sure the environment variable ANDROID_HOME is properly configured for the Appium process. Refer https://github.com/appium/java-client/blob/master/docs/environment.md for more details.
WARN AppiumDoctor ➜ Manually configure ANDROID_HOME and run appium-doctor again.
info AppiumDoctor
info AppiumDoctor ### Optional Manual Fixes ###
info AppiumDoctor The configuration can install optionally. Please do the following manually:
WARN AppiumDoctor ➜ ffmpeg is needed to record screen features. Please read https://www.ffmpeg.org/ to install it
WARN AppiumDoctor ➜ mjpeg-consumer module is required to use MJPEG-over-HTTP features. Please install it with 'npm i -g mjpeg-consumer'.
WARN AppiumDoctor ➜ bundletool.jar is used to handle Android App Bundle. Please read http://appium.io/docs/en/writing-running-appium/android/android-appbundle/ to install it. Also consider adding the ".jar" extension into your PATHEXT environment variable in order to fix the problem for Windows
WARN AppiumDoctor ➜ gst-launch-1.0.exe and gst-inspect-1.0.exe are used to stream the screen of the device under test. Please read https://appium.io/docs/en/writing-running-appium/android/android-screen-streaming/ to install them and for more details
info AppiumDoctor
info AppiumDoctor ###
info AppiumDoctor
info AppiumDoctor Bye! Run appium-doctor again when all manual fixes have been applied!
I don't know why is says that I haven't set the env variables when I have already done this in Windows.
For some reason after a few server restarts and command prompt close and re-opens I ran the Appium doctor and it said that it could find ANDROID_HOME
I did add C:\Users\slai6\AppData\Local\Android\Sdk\tools to my Path though.
Honestly, I am not sure what fixed it but it is working now !
I'm running iotedge on kubernetes.
The K8S cluster is a local cluster setup largely using the "Kubernetes the hard way" method, with some modifications.
I did manage to get things working on one installation. However, I'm now getting this on another installation. The initial installation works fine, but after shutting down a machine to simulate a hardware failure, the pod gets recreated, but starts to show this error again. This error happens EVEN if the node shutdown is NOT the one iotedged is running on.
Environment
3 Nodes running Ubuntu 20.04 LTS
Two networks on each node, one for the internet, one for an internal network. K8S is setup using the internal, static IP address
HAProxy/Keepalived for HA without a load balancer, running on a Virtual IP address
Multus CNI for attaching pods to additional networks
CoreDNS
Troubleshooting
Confirmed that CoreDNS seems to be functioning fine, and is able to resolve internal and external addresses
Remaining nodes are able to ping pods on other nodes
Deleting the iotedged pod and allowing k8s to recreate it works, but then edgeAgent an edgeHub have errors until I delete/recreate them as well
Re-run the entire k8s installation. Initial installation works fine, but simulating machine failure continues to be problematic.
Kubernetes Versions:
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:25:06Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
edgeiotd error:
<6>2021-07-09T22:00:02Z [INFO] - Starting Azure IoT Edge Security Daemon - Kubernetes mode
<6>2021-07-09T22:00:02Z [INFO] - Version - 1.1.3
<6>2021-07-09T22:00:02Z [INFO] - Using config file: /etc/iotedged/config.yaml
<6>2021-07-09T22:00:02Z [INFO] - Configuring /var/lib/iotedge as the home directory.
<6>2021-07-09T22:00:02Z [INFO] - Configuring certificates...
<6>2021-07-09T22:00:02Z [INFO] - Transparent gateway certificates not found, operating in quick start mode...
<6>2021-07-09T22:00:02Z [INFO] - Finished configuring provisioning environment variables and certificates.
<6>2021-07-09T22:00:02Z [INFO] - Initializing hsm...
<6>2021-07-09T22:00:02Z [INFO] - Finished initializing hsm.
<6>2021-07-09T22:00:02Z [INFO] - Provisioning edge device...
<6>2021-07-09T22:00:02Z [INFO] - Starting provisioning edge device via manual mode using a device connection string...
<6>2021-07-09T22:00:02Z [INFO] - Manually provisioning device "********" in hub "********.azure-devices.net"
<6>2021-07-09T22:00:02Z [INFO] - Finished provisioning edge device.
<6>2021-07-09T22:00:02Z [INFO] - Initializing the module runtime...
<6>2021-07-09T22:00:02Z [INFO] - Attempting to use config from /home/edgeletuser/.kube/config file.
<6>2021-07-09T22:00:02Z [INFO] - Using in-cluster config
<3>2021-07-09T22:00:34Z [ERR!] - The daemon could not start up successfully: Could not initialize module runtime
<3>2021-07-09T22:00:34Z [ERR!] - caused by: Could not initialize kubernetes module runtime
<3>2021-07-09T22:00:34Z [ERR!] - caused by: HTTP response error: SelfSubjectAccessReviewCreate
<3>2021-07-09T22:00:34Z [ERR!] - caused by: Hyper HTTP error
<3>2021-07-09T22:00:34Z [ERR!] - caused by: error trying to connect: Connection timed out (os error 110)
<6>2021-07-09T22:00:02Z [INFO] (/project/hsm-sys/azure-iot-hsm-c/src/hsm_log.c:log_init:41) Initialized logging
edgeHub Logs after recreating iotedged:
2021-08-18 19:05:40 Starting Edge Hub
2021-08-18 19:05:40.481 +00:00 Edge Hub Main()
<7> 2021-08-18 19:05:40.609 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Util.Edged.WorkloadClient] - Making a Http call to http://localhost:35001/ to CreateServerCertificateAsync
<7> 2021-08-18 19:05:40.912 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Util.Edged.WorkloadClient] - Error when getting an Http response from http://localhost:35001/ for CreateServerCertificateAsync
HTTP Response:
{"message":"Module not found"}
Microsoft.Azure.Devices.Edge.Util.Edged.Version_2019_01_30.GeneratedCode.IoTEdgedException`1[Microsoft.Azure.Devices.Edge.Util.Edged.Version_2019_01_30.GeneratedCode.ErrorResponse]: Not Found
at Microsoft.Azure.Devices.Edge.Util.Edged.Version_2019_01_30.GeneratedCode.HttpWorkloadClient.CreateServerCertificateAsync(String api_version, String name, String genid, ServerCertificateRequest request, CancellationToken cancellationToken) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/edged/version_2019_01_30/generatedCode/HttpWorkloadClient.cs:line 624
at Microsoft.Azure.Devices.Edge.Util.TaskEx.TimeoutAfter[T](Task`1 task, TimeSpan timeout) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/TaskEx.cs:line 126
at Microsoft.Azure.Devices.Edge.Util.Edged.WorkloadClientVersioned.Execute[T](Func`1 func, String operation) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/edged/WorkloadClientVersioned.cs:line 59
Unhandled exception. System.AggregateException: One or more errors occurred. (Error calling CreateServerCertificateAsync: Module not found)
---> Microsoft.Azure.Devices.Edge.Util.Edged.WorkloadCommunicationException- Message:Error calling CreateServerCertificateAsync: Module not found, StatusCode:404, at: at Microsoft.Azure.Devices.Edge.Util.Edged.Version_2019_01_30.WorkloadClient.HandleException(Exception ex, String operation) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/edged/version_2019_01_30/WorkloadClient.cs:line 109
at Microsoft.Azure.Devices.Edge.Util.Edged.WorkloadClientVersioned.Execute[T](Func`1 func, String operation) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/edged/WorkloadClientVersioned.cs:line 77
at Microsoft.Azure.Devices.Edge.Util.Edged.Version_2019_01_30.WorkloadClient.CreateServerCertificateAsync(String hostname, DateTime expiration) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/edged/version_2019_01_30/WorkloadClient.cs:line 35
at Microsoft.Azure.Devices.Edge.Util.CertificateHelper.GetServerCertificatesFromEdgelet(Uri workloadUri, String workloadApiVersion, String workloadClientApiVersion, String moduleId, String moduleGenerationId, String edgeHubHostname, DateTime expiration) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/CertificateHelper.cs:line 260
at Microsoft.Azure.Devices.Edge.Hub.Service.EdgeHubCertificates.LoadAsync(IConfigurationRoot configuration, ILogger logger) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Service/EdgeHubCertificates.cs:line 54
at Microsoft.Azure.Devices.Edge.Hub.Service.Program.MainAsync(IConfigurationRoot configuration) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Service/Program.cs:line 54
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Microsoft.Azure.Devices.Edge.Hub.Service.Program.Main() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Service/Program.cs:line 33
Are you still blocked? what troubleshooting steps you have tried so far? Did you check the Common issues and resolutions for Azure IoT Edge? As per the error messages Transparent gateway certificates not found, operating in quick start mode and The daemon could not start up successfully: Could not initialize module runtime looks like the setup is not configured properly. Try restarting the server and check the transparent gateway setup. Please refer the transparent gateway setup and check if you have missed anything.
Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 23 --automation-name Appium --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"23","automationName":"Appium"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"capabilities":[{"desiredCapabilities":{"app":"C:/Users/yjaya/Desktop/app-release-unsigned.apk","platformName":"Android","deviceName":"Nexus","platformVersion":"6.0"}},{"requiredCapabilities":{}}],"desiredCapabilities":{"app":"C:/Users/yjaya/Desktop/app-release-unsigned.apk","platformName":"Android","deviceName":"Nexus","platformVersion":"6.0"},"requiredCapabilities":{}}
info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_131)
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: C:\Users\yjaya\Desktop\app-release-unsigned.apk
info: [debug] Creating new appium session f7d1277d-e625-4bc1-a4ad-4902bb5ed25b
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_131
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Users\yjaya\AppData\Local\Android\sdk\platform-tools\adb.exe
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\Users\yjaya\AppData\Local\Android\sdk\build-tools\25.0.3\aapt.exe
info: [debug] Extracting package and launch activity from manifest.
info: [debug] executing cmd: C:\Users\yjaya\AppData\Local\Android\sdk\build-tools\25.0.3\aapt.exe dump badging C:\Users\yjaya\Desktop\app-release-unsigned.apk
info: [debug] badging package: com.indsci.iassign
info: [debug] badging act: com.indsci.iassign.HomeActivity
info: [debug] Parsed package and activity are: com.indsci.iassign/com.indsci.iassign.HomeActivity
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: C:\Users\yjaya\AppData\Local\Android\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device emulator-5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\yjaya\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] executing cmd: C:\Users\yjaya\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: C:\Users\yjaya\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 23
info: Device API level is: 23
info: [debug] Extracting strings for language: default
info: [debug] executing cmd: C:\Users\yjaya\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "getprop persist.sys.language"
info: [debug] Current device persist.sys.language:
info: [debug] java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "C:\Users\yjaya\Desktop\app-release-unsigned.apk" "C:\Users\yjaya\AppData\Local\Temp;C:\Program Files\Java\jre1.8.0_121\bin\com.indsci.iassign"
info: [debug] No strings.xml for language '', getting default strings.xml
info: [debug] java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "C:\Users\yjaya\Desktop\app-release-unsigned.apk" "C:\Users\yjaya\AppData\Local\Temp;C:\Program Files\Java\jre1.8.0_121\bin\com.indsci.iassign"
warn: Error getting strings.xml from apk
info: [debug] Exception in thread "main" java.lang.Exception: Output is not an existing readable directory.
at io.appium.apktools.StringsXML.e(StringsXML.java:112)
at io.appium.apktools.Main.main(Main.java:23)
warn: Could not get strings, continuing anyway
info: [debug] executing cmd: C:\Users\yjaya\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "echo '{}' > /data/local/tmp/strings.json"
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\Users\yjaya\AppData\Local\Android\sdk\build-tools\25.0.3\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: C:\Users\yjaya\AppData\Local\Android\sdk\build-tools\25.0.3\aapt.exe dump xmltree C:\Users\yjaya\Desktop\app-release-unsigned.apk AndroidManifest.xml
info: [debug] Set app process to: com.indsci.iassign
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\Users\yjaya\Desktop\app-release-unsigned.apk.
info: [debug] executing cmd: java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" C:\Users\yjaya\Desktop\app-release-unsigned.apk
info: [debug] App already signed.
info: [debug] Zip-aligning C:\Users\yjaya\Desktop\app-release-unsigned.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\Users\yjaya\AppData\Local\Android\sdk\build-tools\25.0.3\zipalign.exe
> error: Unhandled error: Error: ENOENT, no such file or directory 'C:\Users\yjaya\AppData\Local\Temp;C:\ProgramFiles\Java\jre1.8.0_121\bin\117522-13276-xudx2z'
at Error (native)
at Object.fs.mkdirSync (fs.js:747:18)
at tempDir (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\node_modules\appium-support\lib\tempdir.js:21:8)
at Object.generateName [as path] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\node_modules\appium-support\lib\tempdir.js:29:20)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:460:30)
at [object Object].ADB.checkSdkBinaryPresent (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:116:5)
at [object Object].ADB.checkZipAlignPresent (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:146:8)
at [object Object].ADB.zipAlignApk (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:457:8)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:496:10)
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5) context: [POST /wd/hub/session {"capabilities":[{"desiredCapabilities":{"app":"C:/Users/yjaya/Desktop/app-release-unsigned.apk","platformName":"Android","deviceName":"Nexus","platformVersion":"6.0"}},{"requiredCapabilities":{}}],"d]
Also have done adding Environment variables with sdk path..Still getting the above error.
Can anyone please help me on this.
I set up the release plugin on my Grails project and successfully ran it on my localhost.
When I try to set up the same build in Jenkins, the build hangs indefinitely. The last thing in the output before it hangs is the checkCommitNeeded step.
Anything I can do to figure out what's going wrong?
I have set -Prelease.useAutomaticVersion=true and the two version params in switches, as mentioned in the plugin docs.
Update
On the researchgate Gitter, Christian Gonzalez mentioned that Jenkins is detecting another commit caused by the release plugin, and getting itself stuck in a loop. For Git, an additional behavior can be added to ignore changes committed by the plugin. However, my project is using SVN.
Update
Below is a snippet of the output from adding -d
11:12:48.907 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':checkCommitNeeded'.
11:12:48.908 [INFO] [org.gradle.api.Project] Running [svn, status] in [/var/lib/jenkins/jobs/MyTeam/jobs/MyProject/jobs/MyProject-release/workspace]
11:12:48.924 [INFO] [org.gradle.api.Project] Running [svn, status] produced output: []
11:12:48.926 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':checkCommitNeeded'
11:12:48.926 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :checkCommitNeeded (Thread[Daemon worker,5,main]) completed. Took 0.02 secs.
11:12:48.926 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry] Worker root.3 completed (0 in use)
11:12:48.926 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry] Worker root.4 started (1 in use).
11:12:48.926 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :checkUpdateNeeded (Thread[Daemon worker,5,main]) started.
11:12:48.927 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :myproject:checkUpdateNeeded
11:12:48.927 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':checkUpdateNeeded'
11:12:48.927 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':checkUpdateNeeded' is up-to-date
11:12:48.927 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Executing task ':checkUpdateNeeded' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
11:12:48.927 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':checkUpdateNeeded'.
11:12:48.928 [INFO] [org.gradle.api.Project] Running [svn, status, -q, -u] in [/var/lib/jenkins/jobs/MyTeam/jobs/MyProject/jobs/MyProject-release/workspace]
11:12:51.477 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:12:51.479 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:12:51.480 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:12:51.481 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
11:13:01.477 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:13:01.477 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:13:01.478 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:13:01.480 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
11:13:11.477 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:13:11.477 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:13:11.477 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:13:11.479 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
...
The last 4 lines are repeated over and over.
I faced the same issue. For me, the reason was that I did the wrong setup configuration for the project. Example: wrong GitHub URL (without .git extension) added, incorrect Poll SCM config, etc.
Fix for me was to restart the Jenkins server & correct the changes under 'Manage' for your project & again build.
I've been trying to automate everything about our deployment and have had some reasonable incremental success until today, when it all went backwards.
.ebextensions/01settings.config
container_commands:
01seed:
command: rake db:seed
leader_only: true
This has occasionally run, but mostly does not. When it does on a deploy, I'll see something like:
2013-08-13 21:46:55,606 [INFO] Running configSets: Infra-EmbeddedPostBuild
2013-08-13 21:46:55,607 [INFO] Running configSet Infra-EmbeddedPostBuild
2013-08-13 21:46:55,609 [INFO] Running config postbuild_0_acme_development_02e6a3b5e2d179b50d766a8dc16f8243__ebextensions_01settings_config
2013-08-13 21:46:55,609 [DEBUG] No packages specified
2013-08-13 21:46:55,609 [DEBUG] No groups specified
2013-08-13 21:46:55,609 [DEBUG] No users specified
2013-08-13 21:46:55,609 [DEBUG] No sources specified
2013-08-13 21:46:55,609 [DEBUG] No files specified
2013-08-13 21:46:55,610 [DEBUG] Running command 01seed
2013-08-13 21:46:55,610 [DEBUG] Generating defaults for command 01seed
2013-08-13 21:46:55,810 [DEBUG] Running test for command 01seed
2013-08-13 21:46:55,839 [DEBUG] Test command output:
2013-08-13 21:46:55,840 [DEBUG] Test for command 01seed passed
2013-08-13 21:47:08,019 [INFO] Command 01seed succeeded
2013-08-13 21:47:08,020 [DEBUG] No services specified
2013-08-13 21:47:08,034 [INFO] ConfigSets completed
Other times, I'll deploy the same thing to the same instance, and that same section will read:
2013-08-13 22:15:15,360 [INFO] Running configSets: Infra-EmbeddedPostBuild
2013-08-13 22:15:15,362 [INFO] Running configSet Infra-EmbeddedPostBuild
2013-08-13 22:15:15,362 [INFO] ConfigSets completed
I can't tell you how frustrating this experience has been. I plan to share this automation for the rails deployment via rake as a gem very soon, but I'm hesitant because this won't work the same every time.
What are the reasons an .ebextensions/*.config wouldn't even be attempted?
EDIT:
It appears that my deep_symbolized_hash.to_yaml puts out an .ebextensions/01settings.config that looks like:
:container_commands:
:01seed:
:command: rake db:seed
:leader_only: true
So, while this is valid yaml, the elastic beanstalk configset running process of Infra-EmbeddedPostBuild just walks right by the my config without complaint.
Does that sound right? Are we really to hope that eb just swallows this?
This is confirmed. If using a ruby hash with keys that have been symbolized, you need to unsymbolize the keys before to_yaml or else post process and remove the leading ':' semi-colon.
Also confirmed, if eb doesn't like your .config file on deploy, it just swallows it and doesn't even log anything!