-
Notifications
You must be signed in to change notification settings - Fork 88
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
DogAPI reports vague error: Cannot determine local hostname via hostname -f #87
Comments
Hi @tschellhorn, Sorry to hear that you are experiencing issues with I think we can do a better job, here, at handling hostname resolution exceptions: we could simply log a warning message with the exception message, and fallback with no hostname. Please let me know what you think about it. We'll consider the appropriate changes for the upcoming release. Yann |
I came across the error on one of our nodes running Chef with the Datadog cookbook. I tracked the problem down to the Dogapi. I looked at the code for how the dd-handler is included in in the Chef cookbook recipe and there is no hostname that is passed over so I don't think I would be able to set the hostname explicitly in the DogAPI object. (https://github.com/DataDog/chef-handler-datadog/blob/master/lib/chef/handler/datadog.rb#L22) Fixing this for the next milestone is okay with me. I just wanted to point out the minor issue to help other users in the future. |
DataDog/chef-datadog#308 should fix this issue if you set a hostname in Chef. (released in chef-datadog 2.5.0) |
We could raise a more explicit error |
I'm seeing this behavior a lot in my Puppetserver logs:
I can't tell why this is failing. I don't have the memory issue like the original comment in this issue. Also, running I loaded up an irb shell and ran the command, and got a seemingly fine result.
I'm running Puppet 6 with the latest version of the DataDog module, 2.7.0. |
Thanks for the reply, but the It does return the short name, however. Could that be the issue I'm having? Is DogAPI RB expecting the FQDN, including the TLD? If so, we should allow users to set that themselves. |
Thanks for your contribution! This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community. If you would like this issue to remain open:
|
It happens that on a node that is short on memory, the chef run was failing to converge and reporting an error:
The problem happens at https://github.com/DataDog/dogapi-rb/blob/master/lib/dogapi/common.rb#L163 where it doesn't report the exception that is thrown. The actual issues was due to the following error:
The text was updated successfully, but these errors were encountered: