Warning balance email is not sent

From Kolmisoft Wiki
Revision as of 11:36, 24 March 2016 by Nerijuss (talk | contribs)
Jump to navigationJump to search

Warning emails are sent hourly, and not once balance is dropped. Please make sure that it is not the reason of your concern.

If warning balance email not sent event after one hours since it dropped, then make sure that GUI is accessible by link in /etc/cron.d/mor_hourly_actions

# cat /etc/cron.d/mor_hourly_actions 
0 * * * * root wget -o /dev/null -O /dev/null http://127.0.0.1/billing/callc/hourly_actions

to test it

wget http://127.0.0.1/billing/callc/hourly_actions

result must look like this and file "houly_action" should be downloaded.

# wget http://127.0.0.1/billing/callc/hourly_actions
--2016-03-24 13:23:54--  http://127.0.0.1/billing/callc/hourly_actions
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “hourly_actions”

   [ <=>                                                                                         ] 8           --.-K/s   in 0s      

2016-03-24 13:23:55 (984 KB/s) - “hourly_actions” saved [8]

If you are getting some kind of error, adjust the link accordingly.

Problems usually appears after SSL configuration. In such cases errors may look like this:

    ERROR: certificate common name “*.yourdomain.com” doesn't match requested host name “1.2.3.4”.
To connect to 127.0.0.1 insecurely, use ‘--no-check-certificate’.

or connection may not be established at all.

Solution is:

  • replace "127.0.0.1" with Public IP or your domain;
  • replace "http" with "https";
  • add "--no-check-certificate".

Test is after changes:

wget --no-check-certificate https://your.domain.com/billing/callc/hourly_actions

If it works, modify /etc/cron.d/mor_hourly_actions so command and link would be like:

0 * * * * root wget -o /dev/null -O /dev/null --no-check-certificate https://your.domain.com/billing/callc/hourly_actions