Skip to content
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

Latest version (7.1.3) prints exception with JSON output #54

Open
mtunstill opened this issue Mar 3, 2020 · 0 comments
Open

Latest version (7.1.3) prints exception with JSON output #54

mtunstill opened this issue Mar 3, 2020 · 0 comments

Comments

@mtunstill
Copy link

I'm raising this issue as we're getting some very odd behaviour with recent versions of the OctopusCLI (deployed through Chocolatey). We've been seeing this for the last month where we were running multiple Octo.exe in parallel (using Powershell Jobs feature) and one of the jobs failing because there was a file lock somewhere. I thought this was unusual as each of the job runs used its own log file.

After triggering the issue and receiving the full JSON output, I could see the octo.exe service applying an exception + JSON output. Here's an example...

2020-03-02 12:46:14,852 NewRelic ERROR: [pid: 6820, tid: 1] Unable to write the FileLog log to \"C\:\\Program Files\New Relic\.NET Core Agent\logs\newrelic_agent_octo.log\": The process cannot access the file 'C\:\\Program Files\New Relic\.NET Core Agent\logs\newrelic_agent_octo.log' because it is being used by another process. [ { \"Project\": { \"Id\": \"Projects-421\", \"Name\": \"AWS\" }, \"Environment\": { \"Id\": \"Environments-123\", \"Name\": \"DEV\" }, \"Tenant\": null, \"Channel\": { \"Id\": \"Channels-501\", \"Name\": \"Default\" }, \"Date\": \"2020-03- 02T12:43:51.561+00:00\", \"Duration\": \"39 seconds\", \"State\": \"Success\", \"Version\": \"0.0.7\", \"Assembled\": \"2019-01-24T10:54:05.711+00:00\", \"PackageVersion\": \"\", \"ReleaseNotes\": \"\" } ]

The first portion is related to writing to a log hosted with our New Relic .NET Core agent. As far as I can see from this log, each of the octo.exe is registering itself as a recognised .NET Core application and the New Relic agent is registering it. In turn, all instances of octo.exe are trying to write back to the log file 'newrelic_agent_octo.log'. We've seen in many cases that one of the instances fails as another might be locking the agent.

  • Is there any ability to input a custom config file on build? (to disable registering to our New Relic agent?)
  • Can the exception be directed to a local log file or just error out? It's bizarre it's appending the output with the valid JSON.

We're currently using RegEx to filter out the error (as the JSON response from the Octopus server is valid). However, I am aiming to disable the New Relic registering in either octo.exe or from New Relic agent itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant