Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed monit-5.3.2 on OS X 10.7 but haven't been able to get it running.

When I run sudo monit -t I get:

monit: Cannot translate 'hakan' to FQDN name -- nodename nor servname provided, or not known
Control file syntax OK

When I run sudo monit restart all I get:

monit: Cannot translate 'hakan' to FQDN name -- nodename nor servname provided, or not known
monit: Cannot connect to the monit daemon. Did you start it with http support?

'hakan' is my hostname.

Here is my /etc/monitrc:

set daemon 60
set idfile /tmp/
set statefile /tmp/monit.state
set mailserver localhost
set alert
set httpd port 2812 and use address localhost

Any ideas? I've had no luck finding this on Google. Thanks in advance.

share|improve this question
Is your hostname hakan registered in DNS? What do you get if you type host hakan on the command line? Is it listed in your /etc/hosts file as a fully qualified name (that means <hostname>.domain, instead of/in addition to just <hostname>). – larsks Mar 25 '12 at 12:12
If I type 'host hakan' I receive: 'Host hakan not found: 3(NXDOMAIN)'. It's not in /etc/hosts either. How would I add it? – Hakan B. Mar 25 '12 at 12:17
The combination of the above comment and the answer below solved it for me. Thank you for your help larsks. – Hakan B. Mar 25 '12 at 12:40
up vote 8 down vote accepted

This is an error of getaddrinfo, which is called by monit to figure out the fqdn of your server.

You must not have fqdn set up in your dns for your server.if you do not control the dns server, you may work around it by adding an entry in /etc/hosts like so:

192.168.x.y hakan hakan.local.domain

where the first one is your server ip.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.