Difference between revisions of "Mor retrieve peers"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '== MOR Retrieve Peers == Script mor_retrieve_peers is responsible for updating device status, server_id and Asterisk version (shown in GUI). Every minute script is executed by c…')
 
 
Line 1: Line 1:
== MOR Retrieve Peers ==
== MOR Retrieve Peers ==


Script mor_retrieve_peers is responsible for updating device status, server_id and Asterisk version (shown in GUI). Every minute script is executed by cron.
Script mor_retrieve_peers is responsible for updating device status, server_id, and Asterisk version (shown in GUI). Every minute script is executed by cron.


In case of proxy configuration, device status is updated by another script 'opensips_device_status'.
In the case of proxy configuration, the device status is updated by another script 'opensips_device_status'.


== Useful information ==
== Useful information ==


'''How to upadate script'''
'''How to update a script'''


   svn update /usr/src/mor/ami
   svn update /usr/src/mor/ami
Line 16: Line 16:
   tail -n 50 /var/log/mor/ami_debug.log
   tail -n 50 /var/log/mor/ami_debug.log


'''How to execute script manually'''
'''How to execute the script manually'''


   /usr/local/mor/mor_retrieve_peers
   /usr/local/mor/mor_retrieve_peers


This will not generate output to console, only to log file.
This will not generate output to the console, only to log file.


== Troubleshooting ==
== Troubleshooting ==
Line 31: Line 31:
'''Script mor_retrieve_peers is crashing'''
'''Script mor_retrieve_peers is crashing'''


* 1. Check if mor_retrieve_peers is most recent version
* 1. Check if mor_retrieve_peers is the most recent version
   svn update /usr/src/mor/ami
   svn update /usr/src/mor/ami
if ''mor_retrieve_peers.c'' file was updated, then it needs to be recompiled (see 'How to update script')
if ''mor_retrieve_peers.c'' file was updated, then it needs to be recompiled (see 'How to update script')


* 2. Try to execute script manually
* 2. Try to execute the script manually
* 3. If script is crashing when executed manually, use command ''ulimit -c unlimited'' to enabled core dumps and execute script again. Now when script is executed and crashes, core dump is created in ''/usr/local/mor'' or current working directory. Core dump is usually named 'core.xxxx'. You can debug core dumps with GDB ''gdb /usr/local/mor/mor_retrieve_peers core.xxxx''. GDB should display a line where script crashed.
* 3. If the script is crashing when executed manually, use the command ''ulimit -c unlimited'' to enabled core dumps and execute script again. Now when the script is executed and crashes, the core dump is created in ''/usr/local/mor'' or current working directory. A core dump is usually named 'core.xxxx'. You can debug core dumps with GDB ''gdb /usr/local/mor/mor_retrieve_peers core.xxxx''. GDB should display a line where the script crashed.
* 4. Check ''/var/log/messages'' for anything related to "mor_retrieve_peers"
* 4. Check ''/var/log/messages'' for anything related to "mor_retrieve_peers"
* 5. Report this issue to support/developers
* 5. Report this issue to support/developers
<br><br>
= See also =
* [[I HAVE A PROBLEM]]

Latest revision as of 10:02, 21 January 2021

MOR Retrieve Peers

Script mor_retrieve_peers is responsible for updating device status, server_id, and Asterisk version (shown in GUI). Every minute script is executed by cron.

In the case of proxy configuration, the device status is updated by another script 'opensips_device_status'.

Useful information

How to update a script

 svn update /usr/src/mor/ami
 /usr/src/mor/ami/install.sh

Where to check logs

 tail -n 50 /var/log/mor/ami_debug.log

How to execute the script manually

 /usr/local/mor/mor_retrieve_peers

This will not generate output to the console, only to log file.

Troubleshooting

GUI device status is not updating

  • 1. Execute script manually and check if device status is updated
  • 2. If not, then check log file (/var/log/mor/ami_debug.log). If you see messages like "Received an error from asterisk: unable to retrieve entire response from server", then Asterisk recompile should fix this issue.

Script mor_retrieve_peers is crashing

  • 1. Check if mor_retrieve_peers is the most recent version
 svn update /usr/src/mor/ami

if mor_retrieve_peers.c file was updated, then it needs to be recompiled (see 'How to update script')

  • 2. Try to execute the script manually
  • 3. If the script is crashing when executed manually, use the command ulimit -c unlimited to enabled core dumps and execute script again. Now when the script is executed and crashes, the core dump is created in /usr/local/mor or current working directory. A core dump is usually named 'core.xxxx'. You can debug core dumps with GDB gdb /usr/local/mor/mor_retrieve_peers core.xxxx. GDB should display a line where the script crashed.
  • 4. Check /var/log/messages for anything related to "mor_retrieve_peers"
  • 5. Report this issue to support/developers




See also