Summary: | ASTERISK-25463: Starting Asterisk with ARI module started but sorcery not causes pain | ||
Reporter: | Dan Jenkins (danjenkins) | Labels: | |
Date Opened: | 2015-10-13 09:28:02 | Date Closed: | |
Priority: | Major | Regression? | |
Status: | Open/New | Components: | Resources/res_ari |
Versions: | 13.6.0 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I had an issue where I was including modules in modules.conf but I had forgotten to enable sorcery. I included the ari resources and so I was able to hit the API itself and it replied but would always return a 404. On the cli, ari show status would say everything was OK but without sorcery everything doesn't work. Should we not allow the ARI to start if sorcery isn't enabled?
Sorry about the shortness of this issue and the lack of specific detail; filing while at Astricon so it gets recorded. Please let me know if you need any more information. | ||
Comments: | By: Asterisk Team (asteriskteam) 2015-10-13 09:28:04.399-0500 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Rusty Newton (rnewton) 2015-10-14 17:35:41.819-0500 Did it provide any errors or debug that would have indicated what was happening? How did you figure out what the issue was? When you have time provide a log showing what Asterisk logs in response to the API requests with no sorcery resources loaded. I'd imagine we probably don't want to load ARI if it is completely dependent on sorcery for function. Or at the minimum we should have errors and debug messages that indicate what is happening if it can't be used. We certainly don't want to feed back 404s and fail silent at the API and Asterisk console. By: Asterisk Team (asteriskteam) 2015-10-29 12:00:23.927-0500 Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1]. [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines By: Dan Jenkins (danjenkins) 2015-10-30 17:25:34.171-0500 Sorry it's taken me a while to get back to you about this So I put debug and verbose up to 10 and here are the results with these lines commented out in modules.conf {code} ;load => res_stasis.so ;load => res_stasis_answer.so ;load => res_stasis_device_state.so ;load => res_stasis_playback.so ;load => res_stasis_recording.so ;load => res_stasis_snoop.so {code} Here is the result of ari show status {code} *CLI> ari show status ARI Status: Enabled: Yes Output format: pretty Auth realm: Asterisk REST Interface Allowed Origins: 192.168.99.100:32700,192.168.99.100:8088 User count: 1 {code} So you can see that the ari module is loaded. (here are the lines in modules.conf) {code} load => res_ari.so load => res_ari_applications.so load => res_ari_asterisk.so load => res_ari_bridges.so load => res_ari_channels.so load => res_ari_device_states.so load => res_ari_endpoints.so load => res_ari_events.so load => res_ari_mailboxes.so load => res_ari_model.so load => res_ari_playbacks.so load => res_ari_recordings.so load => res_ari_sounds.so {code} {code} *CLI> module show like ari Module Description Use Count Status Support Level res_ari.so Asterisk RESTful Interface 0 Running core res_ari_model.so ARI Model validators 0 Running core 2 modules loaded {code} Here are the results of doing a call to /ari/asterisk/info which relies on nothing other than the stasis module being enabled. {code} [Oct 30 22:13:42] Asterisk Ready. *CLI> HTTP opening session. Top level HTTP Request URI is /ari/asterisk/info match request [ari/asterisk/info] with handler [httpstatus] len 10 match request [ari/asterisk/info] with handler [static] len 6 match request [ari/asterisk/info] with handler [ari] len 3 Match made with [ari] Finding handler for asterisk Handler not found Examining ARI response: 404 Not Found Content-type: application/json { "message": "Resource not found" } HTTP keeping session open. status_code:404 Worker thread idle timeout reached. Dying. Destroying worker thread 4 Worker thread idle timeout reached. Dying. Destroying worker thread 3 Worker thread idle timeout reached. Dying. Worker thread idle timeout reached. Dying. Destroying worker thread 2 Destroying worker thread 1 Worker thread idle timeout reached. Dying. Destroying worker thread 0 *CLI> *CLI> TCP timeout reading data HTTP idle timeout or peer closed connection. HTTP closing session. Top level {code} The resulting JSON is {code} { message: "Resource not found" } {code} With a status code of 404 By: Asterisk Team (asteriskteam) 2015-10-30 17:25:34.675-0500 This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable. By: Dan Jenkins (danjenkins) 2015-10-30 17:27:47.855-0500 To answer some of your questions @rusty .... > Did it provide any errors or debug that would have indicated what was happening? None >How did you figure out what the issue was? Trial and error and suddenly realising stasis was needed :D > When you have time provide a log showing what Asterisk logs in response to the API requests with no sorcery resources loaded. Above |