Closed bitsofparag closed 7 years ago
I think the issue is lack of Internet connectivity.
This log indicates to me that the agent does not have access to the Internet. It downloaded the CustomScript extension package by forwarding the request to the host so it could download the package on its behalf. The host can only satisfy requests for extension packages though.
2017/06/07 18:21:57.869261 WARNING Failed to download from: https://rdfepirv2am2prdstr02.blob.core.windows.net/708cdbbfb9ad4802ac80a012992930b1/Microsoft.Azure.Extensions__CustomScript__2.0.3
2017/06/07 18:21:57.870537 WARNING Download did not succeed, falling back to host plugin
Your script is trying to download something from the Internet, and based on the above logs I assume it will fail. Please ensure your VM has access to Internet.
HTH. Let me know if this resolves your issue or not.
That's right. Thank you! It seems there were a couple of quirks upon provisioning the VM:
computer_name
specified in the os_profile
) was not set in the /etc/hosts
file, resulting in some warnings when shell scripts are run. In any case, the custom script still fails. I eventually ssh-ed into the VM and ran the custom script manually from the command line 😞
Here's what the logs look like now:
2017/06/08 02:06:10.192992 INFO Azure Linux Agent Version:2.2.9
2017/06/08 02:06:10.208196 INFO OS: ubuntu 14.04
2017/06/08 02:06:10.208332 INFO Python: 3.4.3
2017/06/08 02:06:10.208508 INFO Run daemon
2017/06/08 02:06:10.208734 INFO No RDMA handler exists for distro='Ubuntu' version='14.04'
2017/06/08 02:06:10.261420 INFO Clean protocol
2017/06/08 02:06:10.261582 INFO run Ubuntu provision handler
2017/06/08 02:06:10.261686 INFO Waiting cloud-init to copy ovf-env.xml.
2017/06/08 02:06:10.305522 INFO Detect protocol endpoints
2017/06/08 02:06:10.305674 INFO Clean protocol
2017/06/08 02:06:10.319382 INFO WireServer endpoint is not found. Rerun dhcp handler
2017/06/08 02:06:10.319472 INFO Test for route to 168.63.129.16
2017/06/08 02:06:10.319637 INFO Route to 168.63.129.16 exists
2017/06/08 02:06:10.319720 INFO Wire server endpoint:168.63.129.16
2017/06/08 02:06:10.354125 INFO Fabric preferred wire protocol version:2015-04-05
2017/06/08 02:06:10.354375 INFO Wire protocol version:2012-11-30
2017/06/08 02:06:10.354446 WARNING Server preferred version:2015-04-05
2017/06/08 02:06:14.926021 INFO Sleeping 1 second to avoid throttling.
2017/06/08 02:06:15.927324 INFO Wait for ssh host key to be generated.
2017/06/08 02:06:15.927593 INFO Wait for ssh host key be generated: /etc/ssh/ssh_host_rsa_key.pub
2017/06/08 02:06:20.932218 INFO ssh host key found at: /etc/ssh/ssh_host_rsa_key.pub
2017/06/08 02:06:20.965032 INFO Thumbprint obtained from : /etc/ssh/ssh_host_rsa_key.pub
2017/06/08 02:06:20.988096 INFO Finished provisioning
2017/06/08 02:06:22.751953 INFO Event: name=WALA, op=Provision, message=Provision succeed
2017/06/08 02:06:22.774305 INFO RDMA capabilities are not enabled, skipping
2017/06/08 02:06:22.792032 INFO Installed Agent WALinuxAgent-2.2.9 is the most current agent
2017/06/08 02:06:23.067715 INFO Agent WALinuxAgent-2.2.9 is running as the goal state agent
2017/06/08 02:06:23.088806 INFO Wire server endpoint:168.63.129.16
2017/06/08 02:06:23.097177 INFO Event: name=WALinuxAgent-2.2.9, op=HeartBeat, message=
2017/06/08 02:06:23.122858 INFO Start env monitor service.
2017/06/08 02:06:23.126738 INFO Configure routes
2017/06/08 02:06:23.129991 INFO Gateway:None
2017/06/08 02:06:23.133744 INFO Routes:None
2017/06/08 02:06:23.137369 WARNING Hostname record does not exist, creating [/var/lib/waagent/published_hostname] with hostname [nbtops]
2017/06/08 02:06:23.239132 INFO WALinuxAgent-2.2.9 running as process 1587
2017/06/08 02:06:23.239367 INFO Set block dev timeout: sda with timeout: 300
2017/06/08 02:06:23.256673 INFO Wire server endpoint:168.63.129.16
2017/06/08 02:06:23.273320 INFO Set block dev timeout: sdb with timeout: 300
2017/06/08 02:06:23.376405 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.2.10 downloaded successfully
2017/06/08 02:06:23.451948 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.2.12 downloaded successfully
2017/06/08 02:06:23.500493 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.2.7 downloaded successfully
2017/06/08 02:06:23.564460 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.2.8 downloaded successfully
2017/06/08 02:06:23.599289 INFO Agent WALinuxAgent-2.2.9 discovered WALinuxAgent-2.2.12 as an update and will exit
2017/06/08 02:06:23.860790 INFO Agent WALinuxAgent-2.2.9 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' is successfully running
2017/06/08 02:06:23.895797 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.2.9 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' is successfully running
2017/06/08 02:06:23.941081 INFO Determined Agent WALinuxAgent-2.2.12 to be the latest agent
2017/06/08 02:06:25.530260 INFO Agent WALinuxAgent-2.2.12 is running as the goal state agent
2017/06/08 02:06:25.544898 INFO Wire server endpoint:168.63.129.16
2017/06/08 02:06:25.552353 INFO Event: name=WALinuxAgent-2.2.12, op=HeartBeat, message=
2017/06/08 02:06:25.560679 INFO Start env monitor service.
2017/06/08 02:06:25.589304 INFO Configure routes
2017/06/08 02:06:25.592607 INFO Gateway:None
2017/06/08 02:06:25.597716 INFO Routes:None
2017/06/08 02:06:25.616810 INFO WALinuxAgent-2.2.12 running as process 1600
2017/06/08 02:06:25.624435 INFO Wire server endpoint:168.63.129.16
2017/06/08 02:06:25.697473 INFO Wire server endpoint:168.63.129.16
2017/06/08 02:06:25.806640 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message=
2017/06/08 02:07:19.519231 INFO [Microsoft.Azure.Extensions.CustomScript-2.0.3] Target handler state: enabled
2017/06/08 02:07:19.523552 INFO [Microsoft.Azure.Extensions.CustomScript-2.0.3] [Enable] current handler state is: notinstalled
2017/06/08 02:07:19.762195 INFO Event: name=Microsoft.Azure.Extensions.CustomScript, op=Download, message=Download succeeded
2017/06/08 02:07:19.767426 INFO [Microsoft.Azure.Extensions.CustomScript-2.0.3] Initialize extension directory
2017/06/08 02:07:19.773321 INFO [Microsoft.Azure.Extensions.CustomScript-2.0.3] Update settings file: 0.settings
2017/06/08 02:07:19.775784 INFO [Microsoft.Azure.Extensions.CustomScript-2.0.3] Install extension [bin/custom-script-shim install]
2017/06/08 02:07:20.874212 INFO Event: name=Microsoft.Azure.Extensions.CustomScript, op=Install, message=Launch command succeeded: bin/custom-script-shim install
2017/06/08 02:07:20.883017 INFO [Microsoft.Azure.Extensions.CustomScript-2.0.3] Enable extension [bin/custom-script-shim enable]
2017/06/08 02:07:21.961971 INFO Event: name=Microsoft.Azure.Extensions.CustomScript, op=Enable, message=Launch command succeeded: bin/custom-script-shim enable
2017/06/08 02:07:22.009462 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message=
2017/06/08 02:21:24.621699 INFO Agent WALinuxAgent-2.2.12 launched with command 'python3 -u bin/WALinuxAgent-2.2.12-py2.7.egg -run-exthandlers' is successfully running
2017/06/08 02:21:25.064131 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.2.12 launched with command 'python3 -u bin/WALinuxAgent-2.2.12-py2.7.egg -run-exthandlers' is successfully running
/var/lib/waagent/Microsoft.Azure.Extensions.CustomScript-2.0.3/bin/custom-script-extension install
time=2017-06-08T02:07:19Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 event=start
time=2017-06-08T02:07:19Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 status="not reported for operation (by design)"
time=2017-06-08T02:07:19Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 event="created data dir" path=/var/lib/waagent/custom-script
time=2017-06-08T02:07:19Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 event=installed
time=2017-06-08T02:07:19Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 status="not reported for operation (by design)"
time=2017-06-08T02:07:19Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 event=end
Writing a placeholder status file indicating progress before forking: /var/lib/waagent/Microsoft.Azure.Extensions.CustomScript-2.0.3/status/0.status
P.S. Maybe the logs are out of sync
The command was executed, but it failed with exit status 2. Unfortunately, I do not know what the means. What does the stdout of the script have to say in this case?
Hey @boumenot, sorry for my radio silence; was busy with other commitments. I will have another go at this from scratch and post the outcome here, sometime this week. Thanks!
Understood, and no worries.
Timing this issue out. Please re-open if necessary.
It is happening to me when installing puppet as a custom extension. Same behavior.
My linux VM was created with an ARM template.
(It seems like an Azure issue than a Terraform one, hence, opening the issue here first but please correct me if I am wrong)
I am trying to run the
install_jenkins.sh
script on a linux (UbuntuServer, 14.04.5-LTS) virtual machine. The script fails with the following error:The
protectedSettings
that I am running are as follows:Please find here the relevant log file output:
/var/log/waagent.log
/var/log/azure/custom-script/handler.log
/var/lib/waagent/Microsoft.Azure.Extensions.CustomScript-2.0.3/bin/custom-script-extension install time=2017-06-07T18:21:58Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 event=start time=2017-06-07T18:21:58Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 status="not reported for operation (by design)" time=2017-06-07T18:21:58Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 event="created data dir" path=/var/lib/waagent/custom-script time=2017-06-07T18:21:58Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 event=installed time=2017-06-07T18:21:58Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 status="not reported for operation (by design)" time=2017-06-07T18:21:58Z version=v2.0.3/git@f21ef81-clean operation=install seq=0 event=end Writing a placeholder status file indicating progress before forking: /var/lib/waagent/Microsoft.Azure.Extensions.CustomScript-2.0.3/status/0.status
nohup /var/lib/waagent/Microsoft.Azure.Extensions.CustomScript-2.0.3/bin/custom-script-extension enable time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event=start time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event=pre-check time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 message="checking for state migration" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 message="no old state found to migrate" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="comparing seqnum" path=/var/lib/waagent/custom-script/seqnum time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="seqnum saved" path=/var/lib/waagent/custom-script/seqnum time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="reading configuration" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="read configuration" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="validating json schema" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="json schema valid" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="parsing configuration json" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="parsed configuration json" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="validating configuration logically" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="validated configuration" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="creating output directory" path=/var/lib/waagent/custom-script/download/0 time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="created output directory" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 files=0 time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="executing command" output=/var/lib/waagent/custom-script/download/0 time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="failed to execute command" error="command terminated with exit status=2" output=/var/lib/waagent/custom-script/download/0 time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="enable failed" time=2017-06-07T18:21:59Z version=v2.0.3/git@f21ef81-clean operation=enable seq=0 event="failed to handle" error="failed to execute command: command terminated with exit status=2"