[OpenSIPS-Users] CP 6.2 drouting Error code 500 (Internal server error)

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Feb 27 05:57:42 EST 2017


Hi Jeff,

Thank for this report - it seems to be a problem with the "dr_gw_status" 
MI command - not returning a reply when used to changed the GW status.
I pushed the fix on GIT repo, so if you pull from the 2.2 branch you 
should have the fix.

Thanks and regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 02/24/2017 10:56 PM, Jeff Wilkie wrote:
> Running opensips 2.2.3 with CP 6.2
>
> When attempting to enable a GATEWAY in CP under the system/drouting 
> section using the toggle button under "Memory State", the screen 
> produces an "Error code 500 (Internal server error)".  The process 
> does appear to execute properly though.
>
> The httpd logs produce the following warnings only:
>
> PHP Notice: Undefined index: gateways_search_address in 
> /var/www/opensips-cp/web/tools/system/drouting/template/gateways.main.php 
> on line 42, referer: 
> http://xx.xx.xx.xx/cp/tools/system/drouting/gateways.php?action=disablegw&gwid=2
>
>
> Opensips logs look like this on enable and disable:
>
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: START *** cls=(nil), 
> connection=0x1c83380, url=/json/dr_gw_status, method=GET, 
> versio=HTTP/1.1, upload_data[0]=(nil), *con_cls=(nil)
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:getConnectionHeader: Accept=*/*
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: accept_type=[-1]
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: normalised_url=[/dr_gw_status]
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_answer_to_connection: START *** cls=(nil), 
> connection=0x1c83380, url=/dr_gw_status, method=GET, versio=HTTP/1.1, 
> upload_data[0]=(nil), *con_cls=(nil)
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got command=dr_gw_status
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: command=dr_gw_status accepts parameters
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got string param [2]
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got string param [0]
>
> *Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> ERROR:mi_json:mi_json_run_mi_cmd: failed to process the command*
>
> *Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> ERROR:mi_json:mi_json_answer_to_connection: no reply*
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: MHD_create_response_from_data 
> [0x7f0a7ddcc600:60]
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: START *** cls=(nil), 
> connection=0x1c83380, url=/json/dr_gw_status, method=GET, 
> versio=HTTP/1.1, upload_data[0]=(nil), *con_cls=(nil)
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:getConnectionHeader: Accept=*/*
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: accept_type=[-1]
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: normalised_url=[/dr_gw_status]
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_answer_to_connection: START *** cls=(nil), 
> connection=0x1c83380, url=/dr_gw_status, method=GET, versio=HTTP/1.1, 
> upload_data[0]=(nil), *con_cls=(nil)
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got command=dr_gw_status
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: command=dr_gw_status accepts parameters
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: but no parameters were found
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got mi_rpl=[0x7f0a885c4c60]
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_answer_to_connection: building on page 
> [0x7f0a86dc3318:0]
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_build_page: start
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_build_content: start
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_recur_write_tree: Treat as an array
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_recur_write_tree: done
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_build_content: done
>
> Feb 24 15:50:41 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: MHD_create_response_from_data 
> [0x7f0a86dc3318:445]
>
>
>
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: START *** cls=(nil), 
> connection=0x1c83380, url=/json/dr_gw_status, method=GET, 
> versio=HTTP/1.1, upload_data[0]=(nil), *con_cls=(nil)
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:getConnectionHeader: Accept=*/*
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: accept_type=[-1]
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: normalised_url=[/dr_gw_status]
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_answer_to_connection: START *** cls=(nil), 
> connection=0x1c83380, url=/dr_gw_status, method=GET, versio=HTTP/1.1, 
> upload_data[0]=(nil), *con_cls=(nil)
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got command=dr_gw_status
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: command=dr_gw_status accepts parameters
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got string param [2]
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got string param [1]
>
> *Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> ERROR:mi_json:mi_json_run_mi_cmd: failed to process the command*
>
> *Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> ERROR:mi_json:mi_json_answer_to_connection: no reply*
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: MHD_create_response_from_data 
> [0x7f0a7ddcc600:60]
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: START *** cls=(nil), 
> connection=0x1c83380, url=/json/dr_gw_status, method=GET, 
> versio=HTTP/1.1, upload_data[0]=(nil), *con_cls=(nil)
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:getConnectionHeader: Accept=*/*
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: accept_type=[-1]
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: normalised_url=[/dr_gw_status]
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_answer_to_connection: START *** cls=(nil), 
> connection=0x1c83380, url=/dr_gw_status, method=GET, versio=HTTP/1.1, 
> upload_data[0]=(nil), *con_cls=(nil)
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got command=dr_gw_status
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: command=dr_gw_status accepts parameters
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: but no parameters were found
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_run_mi_cmd: got mi_rpl=[0x7f0a885c34a0]
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_answer_to_connection: building on page 
> [0x7f0a86dc3318:0]
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_build_page: start
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_build_content: start
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_recur_write_tree: Treat as an array
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_recur_write_tree: done
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:mi_json:mi_json_build_content: done
>
> Feb 24 15:50:47 opensips4 /sbin/opensips[31078]: 
> DBG:httpd:answer_to_connection: MHD_create_response_from_data 
> [0x7f0a86dc3318:440]
>
>
>
> Jeff Wilkie
> Chief Technology Officer
> US IP Communications
> 919.297.1057
>
>
> /"This e-mail communication and any attachments may contain 
> confidential and privileged information and is for use by the 
> designated addressee(s) named above only. Any files transmitted with 
> it are confidential and intended solely for the use of the individual 
> to whom it is addressed. Any views or opinions presented are solely 
> those of the author and do not necessarily represent those of USIPCOM, 
> LLC. If you are not the intended addressee, you are hereby notified 
> that you have received this communication in error and that any use or 
> reproduction of this email or its contents is strictly prohibited and 
> may be unlawful. If you have received this communication in error, 
> please notify us immediately by replying to this message and deleting 
> it from your computer. Thank you". /
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170227/4e7a23b3/attachment-0001.html>


More information about the Users mailing list