Timezone issue?

222 views
Skip to first unread message

Freddy Andersen

unread,
Jan 23, 2016, 8:19:41 PM1/23/16
to Homer Capture Server. sipcapture.org
I have a very strange issue with Homer 5.0.2. Everything works great from the morning to about 3-4pm (15/16.00) when I still see captures in the database BUT homer-ui does not show anything unless I set the time window to 6 hours or higher and when I click on any calls that show they just have:

Session Duration: aN:aN:aN.NaN

and the packets are just empty. When time rolls over to am again it works fine.
Message has been deleted

Freddy Andersen

unread,
Jan 23, 2016, 8:23:39 PM1/23/16
to Homer Capture Server. sipcapture.org
Clicking on 1 call id gives this:

2016/01/23 17:21:52 [error] 605#0: *72 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: node in /var/vhosts/sipcapture/api/RestApi/Search.php on line 599" while reading response header from upstream, client: 10.1.1.1, server: homer01.xxx.com, request: "POST /api/v1/search/transaction HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "homer01.xxx.com", referrer: "http://homer01.xxx.com/"
2016/01/23 17:21:52 [error] 605#0: *76 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: node in /var/vhosts/sipcapture/api/RestApi/Report.php on line 74" while reading response header from upstream, client: 10.1.1.1, server: homer01.xxx.com, request: "POST /api/v1/report/rtcp HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "homer01.xxx.com", referrer: "http://homer01.xxx.com/"
2016/01/23 17:21:52 [error] 605#0: *75 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: node in /var/vhosts/sipcapture/api/RestApi/Report.php on line 184" while reading response header from upstream, client: 10.1.1.1, server: homer01.xxx.com, request: "POST /api/v1/report/log HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "homer01.xxx.com", referrer: "http://homer01.xxx.com/"
2016/01/23 17:21:52 [error] 605#0: *77 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: node in /var/vhosts/sipcapture/api/RestApi/Report.php on line 277" while reading response header from upstream, client: 10.1.1.1, server: homer01.xxx.com, request: "POST /api/v1/report/quality/short HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "homer01.xxx.com", referrer: "http://homer01.xxx.com/"

Alexandr Dubovikov

unread,
Jan 24, 2016, 5:33:09 PM1/24/16
to homer-...@googlegroups.com
Hi,

please check that your time on the homer server and captagent box has been synced.

Wbr,
Alexandr
--
You received this message because you are subscribed to the Google Groups "Homer Capture Server. sipcapture.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to homer-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Freddy Andersen

unread,
Jan 24, 2016, 10:39:21 PM1/24/16
to Homer Capture Server. sipcapture.org
My flow is like this:

kamailio -> [(kamailio) homer-ui/homer-api]

Timezone and date is the same on both of these boxes synced from the same ntp.

What is strange is right now at 7:40 pm I'm able to see the graphs correctly when I select 10min,30min,3hours... BUT if I go to search just by clicking search. (should show 100 latest packets) it does not show any packets unless I select "Last 6 hours", what is crazy is that the packets that do show are the latest collected packets and its from 7:30pm time. Clicking on a Callid for one of these calls gives me an error in the log and no information about the call.

Homer Rivera

unread,
Jan 26, 2016, 8:13:25 PM1/26/16
to Homer Capture Server. sipcapture.org
I have the same issue.  I was thinking of upgrading to the latest version of homer 5 but I have not yet.  All my servers sync with the same NTP server as well.  My thought was also that I am having a bad drift on my box.  When I check the times on my servers they are all the same. I need to look into this as well.

Alexandr Dubovikov

unread,
Jan 26, 2016, 8:15:42 PM1/26/16
to homer-...@googlegroups.com
please provide all timezones of :

capture node,
capture server,
mysql server
UI API server
and your workstation.

thank you!

Wbr,
Alexandr
--

Homer Rivera

unread,
Jan 26, 2016, 8:51:05 PM1/26/16
to Homer Capture Server. sipcapture.org
LINUX My capture node  Time zone: America/Los_Angeles (PST, -0800)
LINUX My capture server,mysql server, UI API (all on the same box )  Time zone: America/Los_Angeles (PST, -0800)
WINDOWS 8 My workstation (UTC-08:00) Pacific Time (US & Canada)

I created a bash script and set cron to run every 5 mins to see the time between the 2 linux boxes and they are exactly the same.  
I am also going to try to do this for my work station to see if the time matches.

Freddy Andersen

unread,
Jan 26, 2016, 9:12:01 PM1/26/16
to Homer Capture Server. sipcapture.org
Workstation -- Mac — Time Zone Pacific Standard Time

Capture Node — Debian 8.2 — America/Los_Angeles
 
Capture Server(Kamailio,Mysql,Nginx(UI/API)) — Debian 8.2 — America/Los_Angeles

Alexandr Dubovikov

unread,
Jan 27, 2016, 5:53:31 AM1/27/16
to homer-...@googlegroups.com
Ok, looks like we know that is it

can you check if you use a timestamp as param for table:


$var(a) = $var(table) + "_%Y%m%d";

thank you.

Wbr,
Alexandr

--

Alexandr Dubovikov

unread,
Jan 27, 2016, 5:55:31 AM1/27/16
to homer-...@googlegroups.com
and please use kamailio master git for this.

thank you

Homer Rivera

unread,
Jan 27, 2016, 3:24:42 PM1/27/16
to Homer Capture Server. sipcapture.org
I am running Kamailio 4.3  and this is the section from my kamailio.cfg

#For old models. Not accurate insert time. System vs capture time.
$var(a) = $var(table) + "_" + $timef(%Y%m%d);
#for Kamailio >4.3 please uncomment this parameters:
        #var(a) = $var(table) + "_%Y%m%d";

Are you saying that I should switch to var(a) = $var(table) + "_%Y%m%d"?

Alexandr Dubovikov

unread,
Jan 27, 2016, 6:50:15 PM1/27/16
to homer-...@googlegroups.com
please update kamailio (master git) and activate $var(a) = $var(table) + "_%Y%m%d"

Wbr,
Alexandr


Freddy Andersen

unread,
Jan 27, 2016, 9:36:00 PM1/27/16
to Homer Capture Server. sipcapture.org
I pulled master kamailio on my capture server and changed that bottom code..

Its 6:35PM and I'm able to see captures again :) problem resolved 

Homer Rivera

unread,
Jan 27, 2016, 11:32:35 PM1/27/16
to Homer Capture Server. sipcapture.org
Same here all is well.  Thanks for the help!

Alexandr Dubovikov

unread,
Jan 28, 2016, 4:12:17 AM1/28/16
to homer-...@googlegroups.com
just FYI

kamailio master (4.4) has now utimef function. So, you can use:

$var(a) = $var(table) + "_" + $utimef(%Y%m%d);

can it can also fix the issue.

Wbr,
Alexandr

Alexandr Dubovikov

unread,
Jan 28, 2016, 5:32:51 AM1/28/16
to homer-...@googlegroups.com
as workaround for kamailio <= 4.3

$var(utc) = $timef(%Y%m%d);

sql_query("cb", "SELECT UTC_DATE()+0;", "ra");

if($dbr(ra=>rows)>0) {
     $var(utc) = $dbr(ra=>[0,0]);
}
sql_result_free("ra");
$var(a) = $var(table) + "_" + $var(utc);
sip_capture("$var(a)");

please check and give a feedback!

Wbr,
Alexandr

Reply all
Reply to author
Forward
0 new messages