{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/241","repository_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux","labels_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/241/comments","events_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/241/events","html_url":"https://github.com/Microsoft/OMS-Agent-for-Linux/issues/241","id":181328922,"number":241,"title":"OMSAgent crashes depending on /etc/hosts configuration","user":{"login":"mabicca","id":16481759,"avatar_url":"https://avatars.githubusercontent.com/u/16481759?v=3","gravatar_id":"","url":"https://api.github.com/users/mabicca","html_url":"https://github.com/mabicca","followers_url":"https://api.github.com/users/mabicca/followers","following_url":"https://api.github.com/users/mabicca/following{/other_user}","gists_url":"https://api.github.com/users/mabicca/gists{/gist_id}","starred_url":"https://api.github.com/users/mabicca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mabicca/subscriptions","organizations_url":"https://api.github.com/users/mabicca/orgs","repos_url":"https://api.github.com/users/mabicca/repos","events_url":"https://api.github.com/users/mabicca/events{/privacy}","received_events_url":"https://api.github.com/users/mabicca/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-06T05:40:04Z","updated_at":"2016-10-07T20:57:57Z","closed_at":null,"body":"I have seen a few cases where if the hosts file has lots of static entries, the omsagent service or even installation might crash. The problem with the service crashing is that it will create lots of core files, sometimes filling up the disk.\r\n\r\nIn this case you can see the exception during the install:\r\n[root@centos72 tmp]# ./omsagent-1.2.0-75.universal.x64.sh --install\r\nChecking host architecture ...\r\nChecking for ctypes python module ...\r\nExtracting...\r\nInstalling OMS agent ...\r\n----- Installing package: omi (omi-1.1.0-0.universal.x64) -----\r\n----- Installing package: scx (scx-cimprov-1.6.3-13.universal.x64) -----\r\n----- Installing package: omsagent (omsagent-1.2.0-75.universal.x64) -----\r\nChecking for ctypes python module ...\r\n----- Installing package: omsconfig (omsconfig-1.1.1-316.x64) -----\r\nPreparing...                          ################################# [100%]\r\nCreating omiusers group ...\r\nUpdating / installing...\r\n   1:omi-1.1.0-0                      ################################# [ 25%]\r\nGenerating a 2048 bit RSA private key\r\n.......+++\r\n....................+++\r\nwriting new private key to '/etc/opt/omi/ssl/omikey.pem'\r\n-----\r\nConfiguring OMI service ...\r\nCreated symlink from /etc/systemd/system/multi-user.target.wants/omid.service to /usr/lib/systemd/system/omid.service.\r\n   2:scx-1.6.3-13                     ################################# [ 50%]\r\n**terminate called after throwing an instance of 'SCXCoreLib::SCXInternalErrorException'\r\n/var/tmp/rpm-tmp.hC4nOj: line 77:  2969 Aborted                 /opt/microsoft/scx/bin/tools/scxsslconfig\r\nwarning: %post(scx-1.6.3-13.x86_64) scriptlet failed, exit status 1**\r\nCreating omsagent group ...\r\nCreating omsagent service account ...\r\n   3:omsagent-1.2.0-75                ################################# [ 75%]\r\nWarning: Agent is not onboarded. omsagent cannot be registered as a service.\r\nConfiguring rsyslog for OMS logging\r\nRestarting service: rsyslog\r\nChecking for ctypes python module...ok!\r\n   4:omsconfig-1.1.1-316              ################################# [100%]\r\nInstalling resource MSFT_nxGroupResource\r\nInstalling resource MSFT_nxPackageResource\r\nInstalling resource MSFT_nxServiceResource\r\nInstalling resource MSFT_nxAvailableUpdatesResource\r\nInstalling resource MSFT_nxUserResource\r\nInstalling resource MSFT_nxOMSAgentResource\r\nInstalling resource MSFT_nxOMSSyslogResource\r\nInstalling resource MSFT_nxOMSKeyMgmtResource\r\nInstalling resource MSFT_nxOMSCustomLogResource\r\ngpg: directory `/etc/opt/omi/conf/omsconfig/.gnupg' created\r\ngpg: new configuration file `/etc/opt/omi/conf/omsconfig/.gnupg/gpg.conf' created\r\ngpg: WARNING: options in `/etc/opt/omi/conf/omsconfig/.gnupg/gpg.conf' are not yet active during this run\r\ngpg: keyring `/etc/opt/omi/conf/omsconfig/.gnupg/secring.gpg' created\r\ngpg: keyring `/etc/opt/omi/conf/omsconfig/keymgmtring.gpg' created\r\ngpg: /etc/opt/omi/conf/omsconfig/.gnupg/trustdb.gpg: trustdb created\r\ngpg: key 44BC4178: public key \"Microsoft (Release Signing) <msgpgkey@microsoft.com>\" imported\r\ngpg: Total number processed: 1\r\ngpg:               imported: 1  (RSA: 1)\r\ngpg: keyring `/etc/opt/omi/conf/omsconfig/keyring.gpg' created\r\ngpg: key DE321294: public key \"Microsoft (Release Signing) <dscgpgkey@microsoft.com>\" imported\r\ngpg: Total number processed: 1\r\ngpg:               imported: 1  (RSA: 1)\r\nWarning: Agent is not onboarded. omsagent cannot be registered as a service.\r\n----- Installing bundled packages -----\r\nChecking if Apache is installed ...\r\n  Apache not found, will not install\r\nChecking if Docker is installed...\r\n  Docker not found. Docker agent will not be installed.\r\nChecking if MySQL is installed ...\r\n  MySQL not found, will not install\r\n---\r\nA quick example hosts file that should generate the issue would be:\r\n127.0.0.1 localhost correcthost\r\n::1 localhost correcthosthost\r\n127.0.0.1 localhost anyhost\r\n::1 localhost anyhost\r\n127.0.0.1 localhost anyhost\r\n::1 localhost anyhost\r\n127.0.0.1 localhost anyhost\r\n::1 localhost anyhost\r\n127.0.0.1 localhost anyhost\r\n::1 localhost anyhost\r\n\r\nWe all know that this should not be normal, however there are sometimes applications that end up making bad changes to /etc/hosts.\r\n\r\nTried with the latest OMSAgent available on GitHub on CentOS 7.2"},"comment":{"url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/comments/252359357","html_url":"https://github.com/Microsoft/OMS-Agent-for-Linux/issues/241#issuecomment-252359357","issue_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/241","id":252359357,"user":{"login":"KrisBash","id":5825248,"avatar_url":"https://avatars.githubusercontent.com/u/5825248?v=3","gravatar_id":"","url":"https://api.github.com/users/KrisBash","html_url":"https://github.com/KrisBash","followers_url":"https://api.github.com/users/KrisBash/followers","following_url":"https://api.github.com/users/KrisBash/following{/other_user}","gists_url":"https://api.github.com/users/KrisBash/gists{/gist_id}","starred_url":"https://api.github.com/users/KrisBash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrisBash/subscriptions","organizations_url":"https://api.github.com/users/KrisBash/orgs","repos_url":"https://api.github.com/users/KrisBash/repos","events_url":"https://api.github.com/users/KrisBash/events{/privacy}","received_events_url":"https://api.github.com/users/KrisBash/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T20:57:57Z","updated_at":"2016-10-07T20:57:57Z","body":"@mabicca  Can you run `hostname` and `hostname --fqdn` without error? I am not sure that the core dumps are necessarily related to the name lookup error. Let's work through them separately. \r\n"}}
{"actor":{"display_login":"KrisBash"}}