I'm trying to run an .exe during a release pipeline on Azure DevOps.
In order to do so, I'm using a Command Line Script task where i just "invoke" the .exe file.
It works as it's correctly launched but i cannot see the output of the .exe (that is a .net framework 4.7.2 Console Application).
I've used a simple "Console.WriteLine()" method in the Console App in order to dump the messages. Obviously, on local machine it correctly writes messages on the console output. On Azure DevOps...just the Std Errors.
Why? How could I dump application messages to the task log?
Thanks
My bad. After different tries and retries i've found that the problem was related to a wrong dependency (resolved via reflection at runtime) that was causing exceptions before any log was written.
So, in fact, it works as expected.
Related
I have a Django-based web app deployed from Github, running in Python 3.9. The app deploys and starts successfully.
I need to add post-build actions to complete the deployment; the exceeding common Django task of running "manage.py". Following the general and python-specific docs I have added the an app setting of
POST_BUILD_SCRIPT_PATH=postbuild.sh
There is a shell script, postbuild.sh in the root of my app, which runs fine if I SSH into the running container. The expected behaviour is that after deployment, this should run, and output to the deployment log. Neither of these things happen.
I have tested the app setting POST_BUILD_COMMAND with a very simple echo, and that does nothing either.
Can you tell me either what I need to do to make these app settings work, or suggest an alternative method of running the post-build script?
Please note that this is a Linux app using Oryx, so answers concerning Windows/Kudu like this one aren't related.
I noticed you asked your question over here as well. Your setting needs to be set to a relative path, /postbuild.sh.
I'm trying to get application insights to work in azure batch job/task while running through a .net core 3.1 console application.
When I run the console app through Visual Studio debug or directly on a node in the batch pool, I get all the appropriate telemetry and logs. However when I setup a task to run the console app I'm not getting any data in application insights.
Guides I looked through:
https://learn.microsoft.com/en-us/azure/batch/monitor-application-insights
https://learn.microsoft.com/en-us/azure/azure-monitor/app/worker-service
https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core
Is there anyway to get the AppInsights data when running the console app through the task?
edit
I have added a TelemetryClient.Flush and Thread.sleep to the end of the process. I can now see explicit calls to TelemetryClient.TrackedEvents but I'm not getting any dependency information, such as SQL call, api calls etc.This only happens to calls made inside a Task. If the console application gets called through a regular command line all information is visible.
Probably the issue is that the console app closes before telemetry is sent. you'll need to explicitly call "flush" on the telemetry client/etc and wait some time to allow telemetry to be sent.
see: TelemetryClient produces inconsistent results in Application Insights
My company produces a tool that the user installs on the server prior to publishing their project. For Azure deployment we have a startup script (a simple .cmd file) that installs our tool. It has the recommended checks for repeat runs, and logs everything. The problem is that the user can't tell if there was an installation problem without RDPing to the role instance and checking the logs.
My question is: if there is a failure installing our tool is there any way to report it back to Visual Studio?
I don't believe there is. If I recall correctly, the startup tasks are fired off as part of the role's startup process (depending on the startup task type - simple, background, etc.). That script is running along with other things like the plug-in that configures Remote Desktop (which I believe the plug-in is a specially packaged type of startup script). I don't think there is anyway to report back (to whatever initiated the deployment operation) what startup tasks failed.
I am following the tutorials on the Windows Azure Node.js site:
http://www.windowsazure.com/en-us/develop/nodejs/tutorials/
however my server.js.logs file isn't being created?
In my server.js file I am issuing console.log statements but none are written to the log file. Why is that? Whats changed in the August SDK to prevent my logs from being written?
Or what do i need to enable in order for console.log statements to be written ?
Thanks
See https://github.com/tjanczuk/iisnode/issues/168, linked to from https://github.com/tjanczuk/iisnode/wiki/iisnode-releases (the v0.1.20 notes).
The latest Windows Azure Node.js SDK must have picked up a newer version of iisnode, and iisnode changed where it puts the log files.
Yes, iisnode now puts log files in the ~/iisnode directory, and writes an index to the log files you can browse. It also contains a new node.js script, interceptor.js which allows you to write log files to any location
You must understand that console.log in node.js is used mainly for client side logging. I just tested that when you are using console.log in node.js application running on Windows Azure stdout log file could not be created so you will not get any log.
If you want to add logging to your code which is running on a web server you should be using server side logging code and I found connect library is most powerful and useful for such purpose:
https://github.com/senchalabs/Connect
As you suggested your code is running in Compute Emulator means you are creating Windows Azure Cloud Service, you should follow your the below article step by step and you will get it working:
https://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/
Be informed that still console.log will not show anything when your node.js code is running in Compute Emulator.
I have set up a cruisecontrol.net build server. When running it in console mode it works fine, but when trying to run it as a windows service it doesn't work. The log file shows the following message:
ThoughtWorks.CruiseControl.Core.CruiseControlException:
Source control operation failed: No VSS database (srcsafe.ini) found.
Use the SSDIR environment variable or run netsetup.
The ssdir is set in ccnet.config, so what am I missing here?
Not sure if it's applicable but when I had problems switching between the Console version and the Service version it was down to access rights for the user I was starting the service as.
Perhaps the Service does not have access rights to the srcsafe.ini file and your account does(assuming that's what your using to run the console).
Apologies if I'm way off the mark, just trying to help!
I ran into similar issues when setting up our CI environment at work. If you can get log-in permissions for the service account you are using, you can log in as that account and run CC.NET via the console and debug your issues.