Error 500 posting to http://localhost:8735/cdr.php

401 views
Skip to first unread message

Rob

unread,
May 9, 2018, 4:42:54 PM5/9/18
to ASTPP

Hi Guys,


After upgrading to latest version I no longer get reseller CDR records written. 


I also note the following error in FreeSwitch console.


[ERR] mod_json_cdr.c:396 Got error [500] posting to web server [http://localhost:8735/cdr.php]
[ERR] mod_json_cdr.c:415 Unable to post to web server


Below is the output from  : netstat -pan | grep 8735

tcp        0      0 0.0.0.0:8735            0.0.0.0:*               LISTEN      14322/nginx -g daem

tcp6       0      0 :::8735                 :::*                    LISTEN      14322/nginx -g daem

tcp6       0      0 ::1:34205               ::1:8735                TIME_WAIT   -               

tcp6       0      0 ::1:34207               ::1:8735                TIME_WAIT   -               

tcp6       0      0 ::1:34204               ::1:8735                TIME_WAIT  

Any ideas ?

sman

unread,
May 9, 2018, 7:47:34 PM5/9/18
to as...@googlegroups.com
That is a separate web folder /var/www/html/fs

There is also a separate nginx file for that.  I would check the permissions on that folder.  Maybe try give it full 777 permissions  and see what happens.

Also check the nginx file in /etc/nginx/sites-enabled/fs.conf

If you are using apache then check the apache config and make sure that is configured properly pointing to the proper folder for port 8735.  As I recall, there was no config for port 8735 for an apache install I have so I had to create it using the other ASTPP apache config file as an example.

Rob

unread,
May 10, 2018, 7:02:17 AM5/10/18
to ASTPP
Many thanks for the info...

I have noted that the directory /var/www/html/fs has owner listed as "root" with permissions 755 .. Should this not be www-data ?

Thanks again,
Rob

Rob

unread,
May 10, 2018, 7:17:32 AM5/10/18
to ASTPP
I have modified the directory and file permissions as per your recommendations but i still get the same error

I have checked the fs.conf and it seems correct ...
Below see excerpts from fs.conf  

server {

        listen 8735 default_server;

        listen [::]:8735 default_server;


......

 root /var/www/html/fs;


I am also able to telnet to localhost on port 8735



....


I still get error

Got error [500] posting to web server [http://localhost:8735/cdr.php] 

Any more ideas ? 

On Thursday, 10 May 2018 01:47:34 UTC+2, sman wrote:

Rob

unread,
May 10, 2018, 9:35:09 AM5/10/18
to ASTPP
As an additional note, this was working before upgrade from 3.5 to 3.6.
It also seems to only be affecting reseller CDR reports, meaning that my resellers balances are not decreasing...

If I log into the resellers panel, I can see that their customers CDR records are showing correctly... 

I am not sure where else to check...

Samir Doshi

unread,
May 10, 2018, 9:39:27 AM5/10/18
to ASTPP
Enable call debug from the configuration and capture CDRS logs in /var/log/astpp/astpp.log file and fs_cli. 
Send me your call log in which reseller billing should be done. 



Mailtrack Sender notified by
Mailtrack

Best Regards
--
Samir Doshi
iNextrix Technologies Pvt. Ltd.
http://www.inextrix.com


Disclaimer:
The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking action in reliance on the contents of this information is strictly prohibited and may be unlawful. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

--
=====================================================================
Documentation : https://astpp.readthedocs.io/
Please contact at sa...@inextrix.com for commercial support.
---
You received this message because you are subscribed to the Google Groups "ASTPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astpp+unsubscribe@googlegroups.com.
To post to this group, send email to as...@googlegroups.com.
Visit this group at https://groups.google.com/group/astpp.
To view this discussion on the web visit https://groups.google.com/d/msgid/astpp/54b5a1bf-f2d1-4e20-b1a2-f5e31869b6f7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Rob

unread,
May 10, 2018, 9:56:25 AM5/10/18
to ASTPP
Hi Samir,

Many thanks... Done.. How would you like me to send to you ?

Many many thanks,
Rob
To unsubscribe from this group and stop receiving emails from it, send an email to astpp+un...@googlegroups.com.

To post to this group, send email to as...@googlegroups.com.
Visit this group at https://groups.google.com/group/astpp.

Samir Doshi

unread,
May 10, 2018, 9:57:45 AM5/10/18
to ASTPP
Before that, can you please reupdate the version with latest github source code and test it out. 

I just merged request for reseller billing changes. That should resolve your issue. 




Mailtrack Sender notified by
Mailtrack

Best Regards
--
Samir Doshi
iNextrix Technologies Pvt. Ltd.
http://www.inextrix.com


Disclaimer:
The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking action in reliance on the contents of this information is strictly prohibited and may be unlawful. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

To unsubscribe from this group and stop receiving emails from it, send an email to astpp+unsubscribe@googlegroups.com.

To post to this group, send email to as...@googlegroups.com.
Visit this group at https://groups.google.com/group/astpp.

Fozzy

unread,
May 11, 2018, 2:46:54 AM5/11/18
to ASTPP
Hi Samir,

Update from GIT bit still the same error logs on CLI:

2018-05-11 08:44:02.235053 [ERR] mod_json_cdr.c:396 Got error [500] posting to web server [http://localhost:8735/cdr.php]

2018-05-11 08:44:02.235053 [ERR] mod_json_cdr.c:415 Unable to post to web server

2018-05-11 08:44:02.235053 [INFO] mod_json_cdr.c:208 Backup file /usr/local/freeswitch/log/xml_json/746566a3-6ce5-42c3-b4d1-ab93d3beb54c.cdr.json


I restarted PHP and NGINX but no change. The only part I did not restart was FS.

Regards
Fozzy

Fozzy

unread,
May 11, 2018, 3:38:47 AM5/11/18
to ASTPP
This has become a serious issue now. Just seen since the upgrade, my resellers balance is not changing. Luckily their customer balance is changing and I can deduce what the resellers cost is but its going to be a major headache to fix. I see that with the error, Freeswitch is creating a backup XML file of the call detail. Is there a simple way to import these files into the CDR DB table?

Samir Doshi

unread,
May 11, 2018, 3:45:26 AM5/11/18
to ASTPP
Did you upgrade just now? 




Mailtrack Sender notified by
Mailtrack

Best Regards
--
Samir Doshi
iNextrix Technologies Pvt. Ltd.
http://www.inextrix.com


Disclaimer:
The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking action in reliance on the contents of this information is strictly prohibited and may be unlawful. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

To unsubscribe from this group and stop receiving emails from it, send an email to astpp+unsubscribe@googlegroups.com.

To post to this group, send email to as...@googlegroups.com.
Visit this group at https://groups.google.com/group/astpp.

Rob Scholtz

unread,
May 11, 2018, 4:30:25 AM5/11/18
to as...@googlegroups.com
Hi Fozzy,

I believe this was fixed in the most recent commit +/- 17 hours ago as of this writing

Perhaps try update again just Incase u missed it.

Should be no need for any service restarts 

Fozzy

unread,
May 11, 2018, 10:14:51 AM5/11/18
to ASTPP
Just ran the update again and can confirm it is working now but how can I import the lost info for my resellers and update there balances?

Rob Scholtz

unread,
May 11, 2018, 11:02:32 AM5/11/18
to as...@googlegroups.com
I am sure there could be a way to import the json files .. I logged into each resellers portal and ran a report for the affected period and obtained the resellers cost. I then created a once off charge for each reseller to bring their balance up to date.. (this of course only after notifying them of the issue)



Reply all
Reply to author
Forward
0 new messages