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

Amazon web services Stackstorm aws.AWSSQSSensor无法连接到queue.amazonaws.com,amazon-web-services,Amazon Web Services,我已将aws配置文件配置如下 region: "us-east-1" aws_access_key_id: "actualkey" aws_secret_access_key: "acutalsecretkey" st2_user_data: "" sqs_sensor: input_queues: - "TestQueue" sqs_other: max_number_of_messages: 10 我还在下面为aws包配置了虚拟环境 /opt/stackstorm/virtualenvs/

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

region: "us-east-1"
aws_access_key_id: "actualkey"
aws_secret_access_key: "acutalsecretkey"
st2_user_data: ""
sqs_sensor:
input_queues:
- "TestQueue"
sqs_other:
max_number_of_messages: 10
我还在下面为aws包配置了虚拟环境 /opt/stackstorm/virtualenvs/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 |
+-------------------------------------------+----------------+-----------------------------------------------------+---------+
但当我尝试使用下面的命令调试传感器时,它会抛出错误

/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
/opt/stackstorm/st2/bin/st2sensorcontainer--config file=/etc/st2/st2.conf--debug--sensor ref=aws.awssqsensor
2017-08-23 20:31:03893调试[-]将sqs超时设置为(60,60)
2017-08-23 20:31:03893调试[-]加载sqs:sqs
2017-08-23 20:31:03894信息[-]调用sqs:使用{'QueueName':u'TestQueue'}获取队列url
2017-08-23 20:31:03894调试[-]事件之前-parameter-build.sqs.GetQueueUrl:调用处理程序
2017-08-23 20:31:03895调试[-]使用以下参数请求OperationModel(name=GetQueueUrl)(验证_ssl=True):{'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':},'query_string':'','url_path':'/','method':u'POST'}
2017-08-23 20:31:03895调试[-]事件请求-created.sqs.GetQueueUrl:调用处理程序
2017-08-23 20:31:03896调试[-]使用v4身份验证计算签名。
2017-08-23 20:31:03896调试[-]规范请求:
邮递
/
主机:queue.amazonaws.com
x-amz-日期:20170823T203103Z
主办x-amz-date
E2CAF6F7B82BBEEBBB9E57E3FB2A1CF25AEB02B2C3E4739B4F79F0AD2C5AD68AC
2017-08-23 20:31:03896调试[-]StringToSign:
AWS4-HMAC-SHA256
20170823T203103Z
20170823/us-east-1/sqs/aws4\U请求
fff3d0ee7842f0e834162f5ac8ba893fc54c083dfa1ce16e85b841bc257f7138
2017-08-23 20:31:03896调试[-]签名:
ef8cdc2b7c22c013e4f0eaf8c180bf3bd11e88defbb84e0923193d393581ce4c
2017-08-23 20:31:03897调试[-]发送http请求:
2017-08-23 20:31:03898信息[-]开始新的HTTPS连接(1):queue.amazonaws.com
2017-08-23 20:31:08034调试[-]1个有源传感器
2017-08-23 20:31:13035调试[-]1个有源传感器
2017-08-23 20:31:18035调试[-]1个有源传感器
2017-08-23 20:31:23036调试[-]1个有源传感器
2017-08-23 20:31:28036调试[-]1个有源传感器
2017-08-23 20:31:33037调试[-]1个有源传感器
2017-08-23 20:31:38037调试[-]1个有源传感器
2017-08-23 20:31:43038调试[-]1个有源传感器
2017-08-23 20:31:48038调试[-]1个有源传感器
2017-08-23 20:31:53038调试[-]1个有源传感器
2017-08-23 20:31:58039调试[-]1个有源传感器
2017-08-23 20:32:03039调试[-]1个有源传感器
2017-08-23 20:32:03900调试[-]发送HTTP请求时收到ConnectionError。
回溯(最近一次呼叫最后一次):
文件“/opt/stackstorm/virtualenvs/aws/lib/python2.7/site packages/botocore/endpoint.py”,第207行,在“获取”响应中
代理=self.proxies,超时=self.timeout)
文件“/opt/stackstorm/virtualenvs/aws/lib/python2.7/site packages/botocore/vendored/requests/sessions.py”,第573行,在send中
r=适配器.send(请求,**kwargs)
文件“/opt/stackstorm/virtualenvs/aws/lib/python2.7/site packages/botocore/vendored/requests/adapters.py”,第419行,在send中
提升连接超时(e,请求=请求)
ConnectTimeout:HTTPSConnectionPool(host='queue.amazonaws.com',port=443):url:/(由ConnectTimeoutError(,'Connection to queue.amazonaws.com timeout.(connect timeout=60')引起)超过了最大重试次数
2017-08-23 20:32:03901调试[-]事件需要-retry.sqs.GetQueueUrl:调用处理程序
2017-08-23 20:32:03901调试[-]需要重试,捕获到可重试的异常:HTTPSConnectionPool(host='queue.amazonaws.com',port=443):url:/(由ConnectTimeoutError(,'连接到queue.amazonaws.com超时(连接超时=60)'引起)超过最大重试次数
回溯(最近一次呼叫最后一次):
文件“/opt/stackstorm/virtualenvs/aws/lib/python2.7/site packages/botocore/retryhandler.py”,第269行,应重试
返回自我检查(尝试编号、响应、捕获异常)
文件“/opt/stackstorm/virtualenvs/aws/lib/python2.7/site packages/botocore/retryhandler.py”,第317行,在调用中
捕获(U异常)
文件“/opt/stackstorm/virtualenvs/aws/lib/python2.7/site packages/botocore/retryhandler.py”,第223行,在调用中
尝试次数,捕获次数(异常)
文件“/opt/stackstorm/virtualenvs/aws/lib/python2.7/site packages/botocore/retryhandler.py”,第359行,检查中发现异常
引发被捕获的异常
ConnectTimeout:HTTPSConnectionPool(host='queue.amazonaws.com',port=443):url:/(由ConnectTimeoutError(,'Connection to queue.amazonaws.com timeout.(connect timeout=60')引起)超过了最大重试次数
2017-08-23 20:32:03902调试[-]需要重试,操作:0.98082992208
2017-08-23 20:32:03902调试[-]收到重试响应,休眠0.98082992208秒
2017-08-23 20:32:04883调试[-]事件请求-created.sqs.GetQueueUrl:调用处理程序
2017-08-23 20:32:04884调试[-]使用v4身份验证计算签名。
2017-08-23 20:32:04884调试[-]规范请求:
邮递
/
主机:queue.amazonaws.com
x-amz-日期:20170823T203204Z
有人能帮忙解决这个问题吗


提前谢谢。

看起来您也在这里问过:。一旦你找到了问题所在,有人可以在这里圈回来并发布答案。看起来你也在这里问过:。一旦你找到了问题所在,有人可以在这里圈回来,然后发布答案。