microsoft / OMS-Agent-for-Linux

http://www.microsoft.com/oms
Other
411 stars 308 forks source link

Onboarding doesn't work - DNS lookup problem #1319

Closed Tockra closed 3 years ago

Tockra commented 3 years ago

The agents doesn't connect to the log analyzer workspace. The onboarding doesn't fail with an error, but the trouble shooting shows this problem:

Welcome to the OMS Agent for Linux Troubleshooter! What is your issue?

================================================================================
1: Agent is unhealthy or heartbeat data missing.
2: Agent doesn't start, can't connect to Log Analytic Services.
3: Syslog issue.
4: Agent consuming high CPU/memory.
5: Installation failures.
6: Custom logs issue.
================================================================================
A: Run through all scenarios.
L: Collect the logs for OMS Agent.
Q: Press 'Q' to quit.
================================================================================
 Please select an option: A
--------------------------------------------------------------------------------
The troubleshooter can be run in two different modes.
  - Silent Mode runs through with no input required
  - Interactive Mode includes extra checks that require input
 Do you want to run the troubleshooter in silent (s) or interactive (i) mode?: i
Running troubleshooter in interactive mode...
================================================================================
CHECKING INSTALLATION...
--------------------------------------------------------------------------------
Installation error codes can be found for either shell bundle or extension
installation, and can help give a quick idea of what went wrong (separate
from the troubleshooter's tests).
 Do you have an installation code from either installing via shell bundle (b) or
via extension (e)? (Type 's' to skip): b
--------------------------------------------------------------------------------
Shell bundle error codes can be found by going through the command output in
the terminal after running the `omsagent-*.universal.x64.sh` script to find
a line that matches:

    Shell bundle exiting with code <err>

 Do you have an installation error code? (y/n): n
Continuing on with troubleshooter...
--------------------------------------------------------------------------------
Checking if running a supported OS version...
Checking if enough disk space is available...
Checking if machine has a supported package manager...
Checking if packages installed correctly...
Checking if running a supported version of OMS...
Checking if all files installed correctly (may take some time)...
Checking certificate and RSA key are correct...
================================================================================
CHECKING CONNECTION...
--------------------------------------------------------------------------------
Onboarding error codes can help give a quick idea of what went wrong (separate
from the troubleshooter's tests).
Onboarding error codes can be found by running the command:

    echo $?

directly after running the `/opt/microsoft/omsagent/bin/omsadmin.sh` tool.
 Do you have an onboarding error code? (y/n): n
Continuing on with troubleshooter...
--------------------------------------------------------------------------------
Checking if installed correctly...
Checking if machine is connected to the internet...
Checking if agent service endpoint is connected...
ERROR(S) FOUND.
================================================================================
================================================================================
ALL ERRORS/WARNINGS ENCOUNTERED:
  ERROR FOUND: Machine couldn't connect to <long-id-i-removed-for-github>.agentsvc.azure-automation.net: couldn't ping endpoint
--------------------------------------------------------------------------------
Please review the errors found above.
================================================================================
If you still have an issue, please run the troubleshooter again and collect the
logs for OMS.
In addition, please include the following information:
  - Azure Subscription ID where the Log Analytics Workspace is located
  - Workspace ID the agent has been onboarded to
  - Workspace Name
  - Region Workspace is located
  - Pricing Tier assigned to the Workspace
  - Linux Distribution on the VM
  - Log Analytics Agent Version

It seems to be a problem with azures dns server?:

azureuser@vm-slef-hosted-agent:/tmp$ nslookup <long-id-i-removed-for-github>.agentsvc.azure-automation.net
Server:     127.0.0.53
Address:    127.0.0.53#53

** server can't find <long-id-i-removed-for-github>.agentsvc.azure-automation.net: NXDOMAIN

What did I do wrong?

T

Tockra commented 3 years ago

I don't know why, but there was already a work space configured, before I tried to configure it. After removing and a new onboarding, it works fine: https://docs.microsoft.com/de-de/azure/azure-monitor/agents/agent-manage#linux-agent