Hi Martin,

I have tried as you suggested and reloaded monit but unfortunately, still
receive the error: Cannot create socket to [localhost]:2812 -- Connection
refused


Regards,
Chuck

On 8 February 2016 at 11:56, Martin Pala <[email protected]> wrote:

> The "use addres 127.0.0.1" makes monit listen only on the loopback
> interface ... the "allow mmonit.server.ip" has no effect, as M/Monit won't
> be able to reach Monit's httpd.
>
> I suggest to change the configuration like this (remove "use address
> 127.0.0.1"):
>
> --8<--
>     set httpd port 2812
>         SSL enable
>         pemfile /var/certs/monit.pem
>         allowselfcertification
>         allow mmonit.server.ip #note: allow access from M/Monit
> allow 127.0.0.1 #note: allow access for monit CLI
>         allow user:pass
> --8<--
>
> Monit will then listen on all interfaces, so it can be reached both from
> the M/Monit host and localhost.
>
> Please make sure to do "monit reload" after the configuration change.
>
> Regards,
> Martin
>
>
> On 08 Feb 2016, at 15:29, Chuck Charleston <[email protected]>
> wrote:
>
> Hi Martin,
>
> I have done that now and reloaded monit, but the issue persists.
>
> Regards,
> Chuck
>
> On 8 February 2016 at 09:16, Martin Pala <[email protected]> wrote:
>
>> just add "allow 127.0.0.1" to the list of allow options
>>
>> Regards,
>> Martin
>>
>> 8. 2. 2016 v 15:11, Chuck Charleston <[email protected]>:
>>
>> Hi Martin,
>>
>> Here it is.
>>
>> set mmonit https://user:[email protected]:8443/collector
>> set httpd port 2812 and use address 127.0.0.1
>> SSL enable
>> pemfile /var/certs/monit.pem
>> allowselfcertification
>> allow mmonit.server.ip
>> allow user:pass
>>
>> This is on a Centos 7 cPanel DNSonly server.
>>
>> Regards,
>> Chuck
>>
>> On 8 February 2016 at 04:56, Martin Pala <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> please send the "set httpd" statement from your monit configuration file
>>> include "allow" options (obfuscate credentials if any).
>>>
>>> Regards,
>>> Martin
>>>
>>>
>>> > On 07 Feb 2016, at 22:59, Chuck Charleston <[email protected]>
>>> wrote:
>>> >
>>> > Hi Tino,
>>> >
>>> > Thanks for that! I have fixed it now and it is communicating with
>>> M/Monit fine. I now however have another error when running monit status:
>>> >
>>> > Cannot create socket to [127.0.0.1]:2812 -- Connection refused
>>> >
>>> > Same thing if I use the actual external IP or hostname. Never had this
>>> issue before so a bit strange though Monit seems to be working fine and I
>>> do not use the actual web interface for Monit since I have M/Monit.
>>> >
>>> > I'll keep digging into it but weird that it comes up.
>>>
>>>
>>>
>>>
>>> --
>>> To unsubscribe:
>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>>
>>
>> --
>> To unsubscribe:
>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>
>>
>> --
>> To unsubscribe:
>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to