Stackstorm aws.AWSSQSSensor无法连接到queue.amazonaws.com

时间:2017-08-23 21:24:50

标签: amazon-web-services

我已将aws配置文件配置如下

/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore# st2 sensor list

+-------------------------------------------+----------------+-----------------------------------------------------+---------+
| ref | pack | description | enabled |
+-------------------------------------------+----------------+-----------------------------------------------------+---------+
| linux.FileWatchSensor | linux | Sensor which monitors files for new lines | True |
| stackstorm-aws.ServiceNotificationsSensor | stackstorm-aws | Sensor which exposes an HTTP interface and listens | True |
| | | for AWS service notifications delivered via AWS SNS | |
| stackstorm-aws.AWSSQSSensor | stackstorm-aws | Sensor which monitors a SQS queue for new messages | True |
| aws.ServiceNotificationsSensor | aws | Sensor which exposes an HTTP interface and listens | True |
| | | for AWS service notifications delivered via AWS SNS | |
| aws.AWSSQSSensor | aws | Sensor which monitors a SQS queue for new messages | True |
+-------------------------------------------+----------------+-----------------------------------------------------+---------+

我还为aws pack配置了虚拟环境 的/ opt / stackstorm / virtualenvs / AWS

传感器也已注册

/opt/stackstorm/st2/bin/st2sensorcontainer --config-file=/etc/st2/st2.conf --debug --sensor-ref=aws.AWSSQSSensor

2017-08-23 20:31:03,893 DEBUG [-] Setting sqs timeout as (60, 60)
2017-08-23 20:31:03,893 DEBUG [-] Loading sqs:sqs
2017-08-23 20:31:03,894 INFO [-] Calling sqs:get_queue_url with {'QueueName': u'TestQueue'}
2017-08-23 20:31:03,894 DEBUG [-] Event before-parameter-build.sqs.GetQueueUrl: calling handler <function generate_idempotent_uuid at 0x7f849bd83938>
2017-08-23 20:31:03,895 DEBUG [-] Making request for OperationModel(name=GetQueueUrl) (verify_ssl=True) with params: {'body': {'Action': u'GetQueueUrl', 'Version': u'2012-11-05', 'QueueName': u'TestQueue'}, 'url': u'https://queue.amazonaws.com/', 'headers': {'User-Agent': 'Boto3/1.3.1 Python/2.7.6 Linux/3.13.0-128-generic Botocore/1.4.93 Resource'}, 'context': {'client_region': u'us-east-1', 'has_streaming_input': False, 'client_config': <botocore.config.Config object at 0x7f849b5faf50>}, 'query_string': '', 'url_path': '/', 'method': u'POST'}
2017-08-23 20:31:03,895 DEBUG [-] Event request-created.sqs.GetQueueUrl: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f849b5faf90>>
2017-08-23 20:31:03,896 DEBUG [-] Calculating signature using v4 auth.
2017-08-23 20:31:03,896 DEBUG [-] CanonicalRequest:
POST
/

host:queue.amazonaws.com
x-amz-date:20170823T203103Z

host;x-amz-date
e2caf6f7b82bbeebb9e57e3fb2a1cf25aeb02b2c3e4739b4f79f0ad2c5ad68ac
2017-08-23 20:31:03,896 DEBUG [-] StringToSign:
AWS4-HMAC-SHA256
20170823T203103Z
20170823/us-east-1/sqs/aws4_request
fff3d0ee7842f0e834162f5ac8ba893fc54c083dfa1ce16e85b841bc257f7138
2017-08-23 20:31:03,896 DEBUG [-] Signature:
ef8cdc2b7c22c013e4f0eaf8c180bf3bd11e88defbb84e0923193d393581ce4c
2017-08-23 20:31:03,897 DEBUG [-] Sending http request: <PreparedRequest [POST]>
2017-08-23 20:31:03,898 INFO [-] Starting new HTTPS connection (1): queue.amazonaws.com
2017-08-23 20:31:08,034 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:13,035 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:18,035 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:23,036 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:28,036 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:33,037 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:38,037 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:43,038 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:48,038 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:53,038 DEBUG [-] 1 active sensor(s)
2017-08-23 20:31:58,039 DEBUG [-] 1 active sensor(s)
2017-08-23 20:32:03,039 DEBUG [-] 1 active sensor(s)
2017-08-23 20:32:03,900 DEBUG [-] ConnectionError received when sending HTTP request.
Traceback (most recent call last):
File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/endpoint.py", line 207, in _get_response
proxies=self.proxies, timeout=self.timeout)
File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/vendored/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/vendored/requests/adapters.py", line 419, in send
raise ConnectTimeout(e, request=request)
ConnectTimeout: HTTPSConnectionPool(host='queue.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<botocore.awsrequest.AWSHTTPSConnection object at 0x7f849b5db490>, 'Connection to queue.amazonaws.com timed out. (connect timeout=60)'))
2017-08-23 20:32:03,901 DEBUG [-] Event needs-retry.sqs.GetQueueUrl: calling handler <botocore.retryhandler.RetryHandler object at 0x7f849b5fa550>
2017-08-23 20:32:03,901 DEBUG [-] retry needed, retryable exception caught: HTTPSConnectionPool(host='queue.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<botocore.awsrequest.AWSHTTPSConnection object at 0x7f849b5db490>, 'Connection to queue.amazonaws.com timed out. (connect timeout=60)'))
Traceback (most recent call last):
File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/retryhandler.py", line 269, in _should_retry
return self._checker(attempt_number, response, caught_exception)
File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/retryhandler.py", line 317, in call
caught_exception)
File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/retryhandler.py", line 223, in call
attempt_number, caught_exception)
File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
raise caught_exception
ConnectTimeout: HTTPSConnectionPool(host='queue.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<botocore.awsrequest.AWSHTTPSConnection object at 0x7f849b5db490>, 'Connection to queue.amazonaws.com timed out. (connect timeout=60)'))
2017-08-23 20:32:03,902 DEBUG [-] Retry needed, action of: 0.980829229208
2017-08-23 20:32:03,902 DEBUG [-] Response received to retry, sleeping for 0.980829229208 seconds
2017-08-23 20:32:04,883 DEBUG [-] Event request-created.sqs.GetQueueUrl: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f849b5faf90>>
2017-08-23 20:32:04,884 DEBUG [-] Calculating signature using v4 auth.
2017-08-23 20:32:04,884 DEBUG [-] CanonicalRequest:
POST
/

host:queue.amazonaws.com
x-amz-date:20170823T203204Z

但是当我尝试使用下面的命令调试传感器时,它会抛出错误

condition ? if_true : if_false

有人可以帮助解决这个问题。

提前致谢。

0 个答案:

没有答案