Closed manumorac closed 2 months ago
restart your waaglinux agent
I'm also receiving this on Redhat 7.8 on fresh deploys. Re-installing/restarting seem to get it going, but initial deploys keep failing and are interfering with deployment pipelines.
Very similar issue on fresh deploy of CentOS 7.7 (OpenLogic image)
"VM has reported a failure when processing extension 'OMSExtension'. Error message: "Enable failed with exit code 33 sed: can't read /etc/opt/microsoft/omsagent/conf/omsadmin.conf: No such file or directory Azure Resource ID updated. Workspace xxx already onboarded and agent is running. Symbolic links have not been created; re-onboarding to create them info Generating certificate ... info Agent GUID is xxx info Onboarding success Configure syslog... Configuring rsyslog for OMS logging Restarting service: rsyslog Configure heartbeat monitoring agent... Configure log rotate for workspace xxx.. INFO: Configuring OMS agent service xxxx... info Retrying configuring omsconfig by calling '/opt/microsoft/omsconfig/Scripts/OMS_MetaConfigHelper.py' with 'sudo' error Error configuring omsconfig. Error: 1\"
More information on troubleshooting is available at https://aka.ms/VMExtensionOMSAgentLinuxTroubleshoot "
Getting same on fresh deployments of RHEL 7.4. Breaking builds.
is it resolved?
Seeing the same issue with "can't read /etc/opt/microsoft/omsagent/conf/omsadmin.conf: No such file or directory"
Looking through the paths, this folder is indeed not there - but there is a folder in "/var/opt/microsoft/omsagent/" instead
How can the agent be changed to look in the correct folder location?
I faced same issue and the solved it with following.
Root cause:
finding that "can't read /etc/opt/microsoft/omsagent/conf/omsadmin.conf" occurs when extension installation of LAD (linux diagnostics extension) starts when OMS installation is not complete. though the issue is seen specifically happening with Redhat and CentOS 7 machines
Solution:
The following sequence need to be followed for extension installations. OMS => LAD
If you are installing extensions in VM manually,
Connect VM from Log Analytics workspace à Virtual Machines blade to install the OMSAgentforLinux extension
Once the OMSAgentforLinux extension is enabled, then only enable diagnostic Settings from the Virtual Machine Diagnostic Settings blade to install LinuxDiagnostics extension
In case of ARM templates,
Make sure you add OMS extension resource name in dependsOn section of LinuxDiagnostic (LAD) along with VM as one dependency.
{
"apiVersion": "2018-06-01",
"type": "extensions",
"name": "OMSExtension",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'), copyIndex())]"
],
"properties": {
...
}
},
{
"apiVersion": "2017-12-01",
"type": "extensions",
"name": "LinuxDiagnostic",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'), copyIndex())]",
"[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'), copyIndex(), '/extensions/OMSExtension')]"
],
"properties": {
...
}
}
@vanditthakkar THANK YOU! I have been getting this error for months doing manual work arounds and all I had to do was change my extension installation order to install OMS before Diagnostics.
I guess until this issue is fixed (which might be a while) we should get a PR open to update the docs with a note. https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/oms-linux
Thank you for your submission. As previously announced, the Log Analytics agent has been deprecated and has no support as of August 31, 2024. If you use the Log Analytics agent to ingest data to Azure Monitor, migrate now to the new Azure Monitor agent. As part of repo archival, open issues and pull requests will be closed.
After run : a. az vm extension delete --name OMSAgentForLinux --resource-group yourRG --vm-name yourVM b. az vm extension set --name OMSAgentForLinux --publisher Microsoft.EnterpriseCloud.Monitoring --version 1.11.15 --protected-settings '{"workspaceKey":"myWorkspaceKey"}' --settings '{"workspaceId":"myWorkspaceId"}' --resource-group yourRG --vm-name yourVM --no-auto-upgrade
I am receiving:
Enable failed with exit code 33 sed: can't read /etc/opt/microsoft/omsagent/conf/omsadmin.conf: No such file or directory Azure Resource ID updated. Workspace beef8b2f-f0c3-4ef3-8417-9ee87c2c75fe already onboarded and agent is running. Symbolic links have not been created; re-onboarding to create them info Generating certificate ... info Agent GUID is 3a70263b-5a5d-4215-8e1d-404106727c62 info Onboarding success Configure syslog... Configuring rsyslog for OMS logging Restarting service: rsyslog Configure heartbeat monitoring agent... Configure log rotate for workspace beef8b2f-f0c3-4ef3-8417-9ee87c2c75fe... INFO: Configuring OMS agent service beef8b2f-f0c3-4ef3-8417-9ee87c2c75fe ... su: warning: cannot change directory to /var/opt/microsoft/omsagent/run: Permission denied -bash: /var/opt/microsoft/omsagent/run/.bash_profile: Permission denied error Error configuring omsconfig. Error: 1