Closed jeroenwo closed 6 years ago
Sounds like there is an issue with this code, I'll fix it.
Thanks a lot for the effort! But still no luck.. :'(
HHm could you also share the content of node-stats.log
too
It should look like this
2018-03-26 14:47:03,497.497Z INFO Python args: ['nodestats.py']
2018-03-26 14:47:03,497.497Z INFO Python interpreter: CPython 2.7.6
2018-03-26 14:47:03,501.501Z INFO Operating system: Linux-4.4.0-116-generic-x86_64-with-Ubuntu-14.04-trusty
2018-03-26 14:47:03,501.501Z INFO Cpu count: 2
2018-03-26 14:47:03,501.501Z INFO enabling event loop debug mode
2018-03-26 14:47:03,501.501Z INFO Detected instrumentation key '[INST_KEY_REMOVED]'. Will upload stats to app insights
2018-03-26 14:47:03,502.502Z DEBUG Start collecting stats for pool=insights-ubuntu node=tvm-57200098_6-20180323t160643z-p
2018-03-26 14:47:08,511.511Z DEBUG Uploading stats. Mem of this script: 15106048 vs total: 3154907136
2018-03-26 14:47:16,206.206Z DEBUG Uploading stats. Mem of this script: 15806464 vs total: 3152560128
2018-03-26 14:47:22,132.132Z DEBUG Uploading stats. Mem of this script: 15867904 vs total: 3152637952
2018-03-26 14:47:28,348.348Z DEBUG Uploading stats. Mem of this script: 15892480 vs total: 3152330752
2018-03-26 14:47:34,522.522Z DEBUG Uploading stats. Mem of this script: 15900672 vs total: 3152723968
2018-03-26 14:47:40,814.814Z DEBUG Uploading stats. Mem of this script: 15912960 vs total: 3152211968
2018-03-26 14:47:47,105.105Z DEBUG Uploading stats. Mem of this script: 15917056 vs total: 3152232448
2018-03-26 14:47:53,255.255Z DEBUG Uploading stats. Mem of this script: 15921152 vs total: 3152146432
2018-03-26 14:47:59,357.357Z DEBUG Uploading stats. Mem of this script: 15925248 vs total: 3152433152
2018-03-26 14:48:09,238.238Z DEBUG Uploading stats. Mem of this script: 15925248 vs total: 3152216064
2018-03-26 14:48:15,757.757Z DEBUG Uploading stats. Mem of this script: 15925248 vs total: 3152384000
2018-03-26 14:48:22,415.415Z DEBUG Uploading stats. Mem of this script: 15925248 vs total: 3152211968
2018-03-26 14:48:28,954.954Z DEBUG Uploading stats. Mem of this script: 15933440 vs total: 3152449536
2018-03-26 14:48:34,889.889Z DEBUG Uploading stats. Mem of this script: 15933440 vs total: 3152392192
2018-03-26 14:48:41,096.096Z DEBUG Uploading stats. Mem of this script: 15933440 vs total: 3150254080
2018-03-26 14:48:47,303.303Z DEBUG Uploading stats. Mem of this script: 15933440 vs total: 3151904768
2018-03-26 14:48:53,448.448Z DEBUG Uploading stats. Mem of this script: 15933440 vs total: 3151982592
2018-03-26 14:48:59,667.667Z DEBUG Uploading stats. Mem of this script: 15933440 vs total: 3152187392
2018-03-26 14:49:11,337.337Z DEBUG Uploading stats. Mem of this script: 15933440 vs total: 3152584704
2018-03-26 14:49:18,614.614Z DEBUG Uploading stats. Mem of this script: 15941632 vs total: 3152560128
2018-03-26 14:49:24,783.783Z DEBUG Uploading stats. Mem of this script: 15945728 vs total: 3152150528
2018-03-26 14:49:30,901.901Z DEBUG Uploading stats. Mem of this script: 15949824 vs total: 3152089088
2018-03-26 14:49:37,092.092Z DEBUG Uploading stats. Mem of this script: 15949824 vs total: 3152039936
2018-03-26 14:49:43,223.223Z DEBUG Uploading stats. Mem of this script: 15953920 vs total: 3151745024
2018-03-26 14:49:49,453.453Z DEBUG Uploading stats. Mem of this script: 15958016 vs total: 3151687680
2018-03-26 14:49:55,670.670Z DEBUG Uploading stats. Mem of this script: 15962112 vs total: 3149443072
Note:There is the instrumentation key displayed in the logs at the top I just noticed so you might not want to share it
I should probably not log that.
What if it's not there? Is that part of the problem? Maybe the script didn't run? I am using a Windows DSVM, you have a Linux VM (that's difference I can see)..
Masking the instrumentation key might indeed be a good idea.. :D
Yeah that probably means it didn't run. Could you send the stderr and stdout if possible
Ok I think I fixed it now, just double checking a few things now
... Sorry about this, keep getting new issues
Could you try once more. It should work hopefully this time
hhm, you said you are using dsvm? It is working for me on a normal windows pool. Maybe the dsvm now has 2 version of python installed and they conflict with each other.
Yes, it already has Python installed. Do I have to copy the PowerShell script and comment out the installation of Python (choco install -y python --version 3.6.3
)? Or maybe add a parameter to skip the installation in the original script?
So after trying a few things, problem is: script install 3.6 then install dependencies for that python version. But then the backgorund task is started as the system user which use the anaconda version of python.
I am trying to hard code the script to use the version of python I already installed.
Other options could be to check if python is already installed and if so use it. But then could get into some other issues of python dependencies issues and wrong version of python.
Could also have as you mentioned a flag not to install python
I merged this fix, It works for me on dsvm, let me know how it goes.
Thanks.
Woohoo! Success! Thanks!
Hi,
I have added the script to a Windows DSVM using C#:
I can see that the script ran successfully:
But when I want to view the metrics in BatchLabs, they do not appear:
How can I troubleshoot the problem?