question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OmsAgent: Enable failed with exit code 52 Couldn't create marker file

See original GitHub issue

When provisioning the OMS agent for Linux (v1.12) I’m receiving an error during the on-boarding/enabling process.

Enable failed with exit code 52 Couldn't create marker file

There isn’t any info on this error in the Microsoft error docs for this extension. However, I tracked the error down to a Python file in this repository. The section of code in question is here after line 629. This section shows that it’s creating a “marker file” to support multi-homing and to show it was onboarding via the extension. Other comments show that there is a permissions issue when trying to access the marker file:

# we are having some kind of permissions issue creating the marker file

I noticed there seems to be an issue with this file even though all of the other files in the workspace directory seem to be appropriately owned by the omsagent user and omiusers group.

ls -al

drwxr-x--- 3 omsagent omiusers 4096 May 29 02:10 .
drwxr-x--- 4 omsagent omiusers 4096 May 28 23:50 ..
-rw-r--r-- 1 root     root        0 May 28 23:50 .azure_extension_marker
-rw-r----- 1 omsagent omiusers  968 May 29 02:10 omsadmin.conf
-rw-r----- 1 omsagent omiusers 3083 May 28 23:50 omsagent.conf
drwxr-x--- 2 omsagent omiusers 4096 May 29 00:01 omsagent.d
-rw-r----- 1 omsagent omiusers    0 May 28 23:50 .service_registered

The .azure_extension_marker marker file seems to be owned by root user even though the code at line 609 is supposed to recursively set permissions for all files in the workspace directory.

An important note is that the onboarding process seems to complete just fine (VM shows up as datasource in workspace) but this extension failure fails all deployments that use this extension in ARM templates.

How can this issue be resolved so that the agent can be provisioned through extension? This issue is occurring on more than 1 VM/VMSS in Azure (not isolated issue).

@simathih, do you possible have comment on this? I noticed your pull request which added this code so I think you might have good context on this issue.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:12
  • Comments:12

github_iconTop GitHub Comments

1reaction
LXBdevcommented, Sep 27, 2021

I can confirm that removing the extension before installing the current one worked for me. It seems to be an upgrade-issue.

1reaction
artur-carvalhocommented, Jul 22, 2021

Do we have any workaround or ideia when this will be resolved?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable failed with exit code 52 Couldn't create marker file
When provisioning the OMS agent for Linux (v1.12) I'm receiving an error during the on-boarding/enabling process. Enable failed with exit ...
Read more >
How To Re-Install Oms Agent For Linux On Azure - TekNeed
Learn how to uninstall Oms Agent, start and enable Waagent. ... VM to fail, follow the step by step process to re-install the...
Read more >
OMS agent for RHEL 8.2 fails - Microsoft Community Hub
Im trying to install OMS agent on RHEL 8.2 but its fails with below error . ... failed with exit code 52 Installation...
Read more >
Azure Microsoft Monitoring Agent failing to provision with ...
Once I used the "workspace_id" attribute, the install worked fine...with no changes to the formatting of the Terraform code.
Read more >
azure-cli 2.23.0 - PyPI
az aks create : Add –enable-encryption-at-host parameter (#17813). App Service ... Add error message for vm identity assign (#17685).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found