Director version (System - About): 1.10.2
Icinga Web 2 version and modules (System - About): 2.11.4
Icinga 2 version (icinga2 --version
): r2.14.0-1
Operating System and version: Ubuntu 20.04.6 LTS
PHP version:7.4.3-4ubuntu2.19
I am trying to install the AWS module for the Icinga Director.
I have carefully followed the install guide here: https://github.com/Icinga/icingaweb2-module-aws/blob/master/doc/01-About.md
When I try to run my initial sync I get the following error
I’m at a loss as to how to troubleshoot this. I’ve been unable to find any previous articles on how to trouble shoot this. Icinga + Director is working correctly without issue otherwise.
I get the same error if choose Check for changes or Trigger Import Run
Any help or guidance is appreciated.
it seams like its an open issue
opened 03:31PM - 17 May 21 UTC
# Summary #
When updating the AWS SDK to `3.181.1` a newer version of `guzzle` … becomes a dependency. The Icinga Web 2 module `reactbundle` brings `guzzle` in an older version which has precedence when loading.
# Details #
AWS SDK version that worked: `3.112.25`
AWS SDK version that broke dependencies: `3.181.1`
Further investigation showed that the problem first occurs with version `3.131.0` for the first time.
## Other versions ##
### composer ###
Output of `composer show -I`
```
aws/aws-sdk-php 3.181.1 AWS SDK for PHP - Use Amazon Web Services in your PHP pr...
guzzlehttp/guzzle 7.3.0 Guzzle is a PHP HTTP client library
guzzlehttp/promises 1.4.1 Guzzle promises library
guzzlehttp/psr7 1.8.2 PSR-7 message implementation that also provides common u...
mtdowling/jmespath.php 2.6.0 Declaratively specify how to extract elements from a JSO...
psr/http-client 1.0.1 Common interface for HTTP clients
psr/http-message 1.0.1 Common interface for HTTP messages
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
symfony/polyfill-mbstring v1.22.1 Symfony polyfill for the Mbstring extension
```
### Icinga Web 2 ###
```
Icingaweb2: 2.8.2
Icingaweb2-aws-module: 1.1.0
Icingaweb2-reactbundle-module: 0.9.0
```
# Errormessages #
There were two different messages when navigating to "Preview" on `/icingaweb2/director/importsources`
```
Uncaught TypeError: Argument 1 passed to Aws\Credentials\AssumeRoleCredentialProvider::Aws\Credentials\{closure}() must be an instance of RuntimeException, instance of Error given, called in /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Promise.php on line 204 and defined in /usr/share/icingaweb2/modules/aws/library/vendor/aws/aws-sdk-php/src/Credentials/AssumeRoleCredentialProvider.php:56
Stack trace:
#0 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Promise.php(204): Aws\Credentials\AssumeRoleCredentialProvider->Aws\Credentials\{closure}(Object(Error))
#1 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(2, Object(Error), NULL)
#2 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
```
and
```
Uncaught Error: Undefined class constant 'VERSION' in /usr/share/icingaweb2/modules/reactbundle/vendor/guzzlehttp/guzzle/src/functions.php:136
Stack trace:
#0 /usr/share/icingaweb2/modules/aws/library/vendor/aws/aws-sdk-php/src/functions.php(300): GuzzleHttp\default_user_agent()
#1 /usr/share/icingaweb2/modules/aws/library/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php(206): Aws\default_user_agent()
#2 /usr/share/icingaweb2/modules/aws/library/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php(82): Aws\Credentials\InstanceProfileProvider->request('api/token', 'PUT', Array)
#3 [internal function]: Aws\Credentials\InstanceProfileProvider->Aws\Credentials\{closure}()
#4 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Coroutine.php(71): Generator->current()
#5 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Coroutine.php(86): GuzzleHttp\Promise\Coroutine->__construct(Object(Closure))
#6 /usr/share/icingaweb2/modules/reactbundle/
```
# Misc #
/ref/NC/724192
if it is super urgent you can try to patch according to this post from mickael-ange :
opened 03:31PM - 17 May 21 UTC
# Summary #
When updating the AWS SDK to `3.181.1` a newer version of `guzzle` … becomes a dependency. The Icinga Web 2 module `reactbundle` brings `guzzle` in an older version which has precedence when loading.
# Details #
AWS SDK version that worked: `3.112.25`
AWS SDK version that broke dependencies: `3.181.1`
Further investigation showed that the problem first occurs with version `3.131.0` for the first time.
## Other versions ##
### composer ###
Output of `composer show -I`
```
aws/aws-sdk-php 3.181.1 AWS SDK for PHP - Use Amazon Web Services in your PHP pr...
guzzlehttp/guzzle 7.3.0 Guzzle is a PHP HTTP client library
guzzlehttp/promises 1.4.1 Guzzle promises library
guzzlehttp/psr7 1.8.2 PSR-7 message implementation that also provides common u...
mtdowling/jmespath.php 2.6.0 Declaratively specify how to extract elements from a JSO...
psr/http-client 1.0.1 Common interface for HTTP clients
psr/http-message 1.0.1 Common interface for HTTP messages
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
symfony/polyfill-mbstring v1.22.1 Symfony polyfill for the Mbstring extension
```
### Icinga Web 2 ###
```
Icingaweb2: 2.8.2
Icingaweb2-aws-module: 1.1.0
Icingaweb2-reactbundle-module: 0.9.0
```
# Errormessages #
There were two different messages when navigating to "Preview" on `/icingaweb2/director/importsources`
```
Uncaught TypeError: Argument 1 passed to Aws\Credentials\AssumeRoleCredentialProvider::Aws\Credentials\{closure}() must be an instance of RuntimeException, instance of Error given, called in /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Promise.php on line 204 and defined in /usr/share/icingaweb2/modules/aws/library/vendor/aws/aws-sdk-php/src/Credentials/AssumeRoleCredentialProvider.php:56
Stack trace:
#0 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Promise.php(204): Aws\Credentials\AssumeRoleCredentialProvider->Aws\Credentials\{closure}(Object(Error))
#1 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(2, Object(Error), NULL)
#2 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
```
and
```
Uncaught Error: Undefined class constant 'VERSION' in /usr/share/icingaweb2/modules/reactbundle/vendor/guzzlehttp/guzzle/src/functions.php:136
Stack trace:
#0 /usr/share/icingaweb2/modules/aws/library/vendor/aws/aws-sdk-php/src/functions.php(300): GuzzleHttp\default_user_agent()
#1 /usr/share/icingaweb2/modules/aws/library/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php(206): Aws\default_user_agent()
#2 /usr/share/icingaweb2/modules/aws/library/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php(82): Aws\Credentials\InstanceProfileProvider->request('api/token', 'PUT', Array)
#3 [internal function]: Aws\Credentials\InstanceProfileProvider->Aws\Credentials\{closure}()
#4 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Coroutine.php(71): Generator->current()
#5 /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/promises/src/Coroutine.php(86): GuzzleHttp\Promise\Coroutine->__construct(Object(Closure))
#6 /usr/share/icingaweb2/modules/reactbundle/
```
# Misc #
/ref/NC/724192
keep in mind that you might repeat this step after installing updates
1 Like
Thanks, I don’t know how I missed that previous post.
The patch suggested seems to work as my import is now failing in a new way, but it looks like a configuration issue and I can work on that.
For context I changed my the file to $defaultAgent = ‘GuzzleHttp/7.8.0’; to match the version in #2 noted below.
From what I can tell the root of the issue is that in following the guide you end up with two different versions of GuzzleHttp in play.
1: /usr/share/icinga-php/vendor/vendor/guzzlehttp/guzzle
2: /usr/share/icingaweb2/modules/aws/library/vendor/guzzlehttp/guzzle
Not sure how to reconcile that but, at least I can carry on for now.
Thank you!
1 Like