Closed Razmuzh closed 4 years ago
Hi Razmuth, this looks like there is something wrong with getting the OAuth2 bearer token response from the API. The plugin should at least drop some lines into your log files if icinga-web2 logs are configured. I'd like to ask you to do so and provide us with the logged lines. As a hint, there should be at least
"Azure API: generating new Bearer token"
in your log file. The Icinga Web2 log lines shortly before and anything after this could be helpful.
Furthermore, please share some information on what you were about to do. Did the module work for you at some earlier point and you maybe changed something inside the Azure Setup? Anything that maybe helpful?
Cheers Peter
I added a short test into the token response tests so that there should not pop up this anoying php error stuff but a proper error message including log message if the response is empty as it is in your case. This was tagged as v0.6.3
@Razmuzh did you get a chance to test the new release or is there anything new on this issue from your side?
Hi, @Razmuzh any news on this?
Cheers, Peter
After a year without response, I consider this solved ;-)
I'm getting this error when I try to set up the 'Import Source'.
Followed by: `
0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}(Integer, String, String, Integer, Array)
1 /usr/share/icingaweb2/modules/azure/library/Azure/Token.php(138): property_exists(NULL, String)
2 /usr/share/icingaweb2/modules/azure/library/Azure/Token.php(93): Icinga\Module\Azure\Token->requestToken()
3 /usr/share/icingaweb2/modules/azure/library/Azure/Api.php(190): Icinga\Module\Azure\Token->__construct(String, String, String, String, String, Integer, Integer)
4 /usr/share/icingaweb2/modules/azure/library/Azure/ProvidedHook/Director/ImportSource.php(296): Icinga\Module\Azure\Api->__construct(String, String, String, String, String, Integer, Integer, Array)
5 /usr/share/icingaweb2/modules/director/application/forms/ImportSourceForm.php(103): Icinga\Module\Azure\ProvidedHook\Director\ImportSource::addSettingsFormFields(Object(Icinga\Module\Director\Forms\ImportSourceForm))
6 /usr/share/icingaweb2/modules/director/application/forms/ImportSourceForm.php(45): Icinga\Module\Director\Forms\ImportSourceForm->addSettings()
7 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(365): Icinga\Module\Director\Forms\ImportSourceForm->setup()
8 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(582): Icinga\Module\Director\Web\Form\QuickForm->prepareElements()
9 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(597): Icinga\Module\Director\Web\Form\QuickForm->setRequest(Object(Icinga\Web\Request))
10 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(376): Icinga\Module\Director\Web\Form\QuickForm->getRequest()
11 /usr/share/icingaweb2/modules/director/application/controllers/ImportsourceController.php(93): Icinga\Module\Director\Web\Form\QuickForm->handleRequest()
12 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Controllers\ImportsourceController->addAction()
13 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
14 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
15 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
16 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
17 /usr/share/icingaweb2/public/index.php(4): require_once(String)
18 {main}
`
Icinga Web 2 version: 2.7.3 PHP Version: 7.1.30
Any ideas?
R.