-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem on extension of custom script #12
Comments
Hi, rlwu Thanks for reporting this issue to us. Thanks |
Yue, Thanks for your response. I am using cross-platform command line interface not PowerShell. I tried the command below but fail. azure vm extension set -v rl-ubuntu-1404 CustomScriptForLinux Microsoft.OSTCExtensions 1.1 -i '{"fileUris":["https://raw.githubusercontent.com/rlwu607/docs/master/mystart.py"], "commandToExecute": "python mystart.py", "timestamp": "(Get-Date).Ticks" }' 2015/01/30 06:32:10 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]JSON config: {"runtimeSettings":[{"handlerSettings":{"publicSettings":{"fileUris":["https://raw.githubusercontent.com/rlwu607/docs/master/mystart.py"], "commandToExecute": "python mystart.py", "timestamp": "(Get-Date).Ticks" }}}]} |
@rlwu607 |
I see. Thanks for your answer. 2015-01-30 16:02 GMT+08:00 Yue Zhang (MS) notifications@github.com:
|
I'm having a similar issue here, but with a bit of a twist. I am also passing in a tick, so my command looks like {"commandToExecute": "sh script.sh", "timestamp": "635682344173313639"} for example as I print the output to try and troubleshoot this. The issue is, that the number displayed here is different to that in the script extension log file which for the last three times I have run this has been 635678934516935423. Naturally, I get the following message - "Current sequence number, 70, is not greater than the sequnce number of the most recent executed configuration." Sometimes it works, sometimes it doesn't, but there certainly looks like there is something weird going on. |
Feel free to re-open it if you hit the issue again. |
Problem is reproducible. I deploy VM with Linux custom script extension from Visual Studio Online. I have special parameter passed into PS script. -runId |
Also sometimes (i actually can't figure out conditions) nothing helps, it remembers "commandToExecute" from error "azuredeploy.json" and continues to execute it on machine. This goes until i manually delete broken extension in portal. |
What kind of info is needed? I can provide logs, ssh to server, azure service account. |
@kkorsakov |
Done. |
@bingosummer I haven't seen any activity on this bug since Feb. The bug was assigned to me, but no logs have been shared. Please reopen as necessary. |
Hello! |
mrseq is created before the execution of custom script extension. If VM fails to download the script, the custom script will not be executed since mrseq is created and has sequence number 0. Please refer to the logs.
2015/01/27 05:50:33 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]sequence number is 0
2015/01/27 05:50:33 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]setting file path is/var/lib/waagent/Microsoft.OSTCExtensions.CustomScriptForLinux-1.1/config/0.settings
2015/01/27 05:50:33 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]JSON config: {"runtimeSettings":[{"handlerSettings":{"publicSettings":{"fileUris":["https://raw.githubusercontent.com/rlwu607/docs/master/mystart.py"], "commandToExecute": "python mystart.py" }}}]}
2015/01/27 05:50:33 ERROR:Reading from file mrseq Exception is [Errno 2] No such file or directory: 'mrseq'
2015/01/27 05:50:33 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]set most recent sequence number to 0
2015/01/27 05:50:33 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]Downloading scripts from external links...
2015/01/27 05:52:41 ERROR:[Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]Failed to download external file with uri:https://raw.githubusercontent.com/rlwu607/docs/master/mystart.pywith error:<urlopen error [Errno 110] Connection timed out>
2015/01/27 05:52:41 ERROR:[Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]Failed to enable the extension with error: <urlopen error [Errno 110] Connection timed out>, stack trace: Traceback (most recent call last):
2015/01/27 05:52:41 ERROR: File "/var/lib/waagent/Microsoft.OSTCExtensions.CustomScriptForLinux-1.1/installer/handle.py", line 102, in enable
2015/01/27 05:52:41 ERROR: download_external_files(blob_uris, hutil._context._seq_no, cmd, hutil)
2015/01/27 05:52:41 ERROR: File "/var/lib/waagent/Microsoft.OSTCExtensions.CustomScriptForLinux-1.1/installer/handle.py", line 193, in download_external_files
2015/01/27 05:52:41 ERROR: download_external_file(uri, seqNo, command, hutil)
2015/01/27 05:52:41 ERROR: File "/var/lib/waagent/Microsoft.OSTCExtensions.CustomScriptForLinux-1.1/installer/handle.py", line 201, in download_external_file
2015/01/27 05:52:41 ERROR: download_and_save_file(uri, file_path)
2015/01/27 05:52:41 ERROR: File "/var/lib/waagent/Microsoft.OSTCExtensions.CustomScriptForLinux-1.1/installer/handle.py", line 209, in download_and_save_file
2015/01/27 05:52:41 ERROR: src = urllib2.urlopen(uri)
2015/01/27 05:52:41 ERROR: File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
2015/01/27 05:52:41 ERROR: return _opener.open(url, data, timeout)
2015/01/27 05:52:41 ERROR: File "/usr/lib/python2.7/urllib2.py", line 404, in open
2015/01/27 05:52:41 ERROR: response = self._open(req, data)
2015/01/27 05:52:41 ERROR: File "/usr/lib/python2.7/urllib2.py", line 422, in _open
2015/01/27 05:52:41 ERROR: '_open', req)
2015/01/27 05:52:41 ERROR: File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
2015/01/27 05:52:41 ERROR: result = func(*args)
2015/01/27 05:52:41 ERROR: File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
2015/01/27 05:52:41 ERROR: return self.do_open(httplib.HTTPSConnection, req)
2015/01/27 05:52:41 ERROR: File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
2015/01/27 05:52:41 ERROR: raise URLError(err)
2015/01/27 05:52:41 ERROR:URLError: <urlopen error [Errno 110] Connection timed out>
2015/01/27 05:52:41 ERROR:
2015/01/27 05:54:31 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]sequence number is 0
2015/01/27 05:54:31 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]setting file path is/var/lib/waagent/Microsoft.OSTCExtensions.CustomScriptForLinux-1.1/config/0.settings
2015/01/27 05:54:31 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]JSON config: {"runtimeSettings":[{"handlerSettings":{"publicSettings":{"fileUris":["https://raw.githubusercontent.com/rlwu607/docs/master/mystart.py"], "commandToExecute": "python mystart.py" }}}]}
2015/01/27 05:54:31 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]Current sequence number, 0, is not greater than the sequnce number of the most recent executed configuration. Exiting...
The text was updated successfully, but these errors were encountered: