|From:||Smith, Graham - Computing Technical Officer|
|Subject:||127.0.0.1 isn't the same as localhost|
|Date:||Thu, 5 Jan 2017 19:09:38 +0000|
Something simple that eluded me for a while today – I’ll send this out just in case it helps someone else.
In my control file I had:
But I couldn’t view monit status or monit summary on the command line. I kept getting:
Error receiving data -- Connection reset by peer
http access worked perfectly though. Alerts and everything working fine.
monit –t told me the control file was fine too. A bit of a puzzle
But I looked at the log file suggested “Denied connection from non-authorized client”
That made me go back and look at the authentication, but all looked ok. I swapped
allow 127.0.0.1 for allow localhost and all was good again. I pinged localhost
and it resolved to ::1 aha! so it’s an ipv6 resolution not ipv4!
I should have spotted this quicker. And of course ::1 works instead of localhost in the control file.
This is 5.20.0 on Debian Jessie by the way. Probably the same happens in all current distros.
|[Prev in Thread]||Current Thread||[Next in Thread]|