I'm trying to deploy the basic rails application to Elastic Beanstalk but I run into issues whenever I try to use eb command. I need to run eb init, but I get this error every time.
我正在尝试将基本的rails应用程序部署到Elastic Beanstalk,但每当我尝试使用eb命令时,我都会遇到问题。我需要运行eb init,但每次都会出现此错误。
xxxx@debian:~/xxxx/xxxx/xxxx/xxxx$ eb init
Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west-1 : US West (N. California)
3) us-west-2 : US West (Oregon)
4) eu-west-1 : EU (Ireland)
5) eu-central-1 : EU (Frankfurt)
6) ap-southeast-1 : Asia Pacific (Singapore)
7) ap-southeast-2 : Asia Pacific (Sydney)
8) ap-northeast-1 : Asia Pacific (Tokyo)
9) sa-east-1 : South America (Sao Paulo)
(default is 3):
ERROR: The current user does not have the correct permissions.
You have not yet set up your credentials or your credentials are incorrect
You must provide your credentials.
(aws-access-id): xxxxxxxxxxxxxxxxxxx
(aws-secret-key): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ERROR: Operation Denied. Are your permissions correct?
xxxx@debian:~/xxxx/xxxx/xxxx/xxxx$
I know my id and key are correct since I copy and pasted them directly from the aws root security page and I use the id and key I just created. I can also use the same id and key on windows and I don't get any problems.
我知道我的id和密钥是正确的,因为我直接从aws根安全页面复制并粘贴它们,我使用我刚创建的id和密钥。我也可以在Windows上使用相同的ID和密钥,我没有遇到任何问题。
Since eb init is not successful, none of the other commands will work.
由于eb init不成功,所以其他命令都不起作用。
It worked the first time, and I was able to run other commands, but after leaving for a while and coming back to try it again, I started getting these errors.
它第一次工作,我能够运行其他命令,但在离开一段时间后又回来再试一次,我开始得到这些错误。
Any help would be great, if you need more info, let me know.
任何帮助都会很棒,如果您需要更多信息,请告诉我。
EDIT: here's the output from eb init -debug
编辑:这是eb init -debug的输出
xxx@debian:~/Dropbox/Debian_Workspace/GameHub/GameHub$ eb init --debug
2015-01-22 23:15:25,909 (DEBUG) eb : logging initialized for 'eb' using LoggingLogHandler
2015-01-22 23:15:25,909 (DEBUG) cement.ext.ext_plugin : plugin config dir /etc/eb/plugins.d does not exist.
2015-01-22 23:15:25,910 (DEBUG) cement.ext.ext_plugin : plugin config dir /home/xxx/.eb/plugins.d does not exist.
2015-01-22 23:15:25,911 (DEBUG) eb : collecting arguments/commands for <ebcli.core.base.EbBaseController object at 0xa3b82cc>
2015-01-22 23:15:25,913 (DEBUG) eb : collecting arguments/commands for <ebcli.controllers.initialize.InitController object at 0xa3b7bec>
-- EBCLI Version: 3.0.10
-- Python Version: 2.7.3 (default, Mar 14 2014, 11:57:14)
[GCC 4.7.2]
2015-01-22 23:15:25,916 (DEBUG) ebcli.core.fileoperations : Project root found at: /home/xxx/Dropbox/Debian_Workspace/GameHub/GameHub
2015-01-22 23:15:25,918 (DEBUG) ebcli.core.fileoperations : Project root found at: /home/xxx/Dropbox/Debian_Workspace/GameHub/GameHub
2015-01-22 23:15:25,919 (DEBUG) ebcli.lib.elasticbeanstalk : Inside get_available_solution_stacks api wrapper
2015-01-22 23:15:25,919 (DEBUG) ebcli.lib.aws : Creating new Botocore Session
2015-01-22 23:15:25,937 (DEBUG) ebcli.lib.aws : Successfully created session for elasticbeanstalk
2015-01-22 23:15:25,941 (DEBUG) ebcli.core.fileoperations : Project root found at: /home/xxx/Dropbox/Debian_Workspace/GameHub/GameHub
Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west-1 : US West (N. California)
3) us-west-2 : US West (Oregon)
4) eu-west-1 : EU (Ireland)
5) eu-central-1 : EU (Frankfurt)
6) ap-southeast-1 : Asia Pacific (Singapore)
7) ap-southeast-2 : Asia Pacific (Sydney)
8) ap-northeast-1 : Asia Pacific (Tokyo)
9) sa-east-1 : South America (Sao Paulo)
(default is 3):
2015-01-22 23:15:38,798 (DEBUG) ebcli.lib.elasticbeanstalk : Inside get_available_solution_stacks api wrapper
2015-01-22 23:15:38,799 (DEBUG) ebcli.lib.aws : Making api call: (elasticbeanstalk, list-available-solution-stacks) to region: us-west-2 with args:{}
2015-01-22 23:15:39,242 (DEBUG) ebcli.lib.aws : API call finished, status = 403
2015-01-22 23:15:39,243 (DEBUG) ebcli.lib.aws : Response: {'ResponseMetadata': {'RequestId': '21c98454-a33b-11e4-a8b3-23511a136606'}, 'Error': {'Message': 'Signature expired: 20150123T051538Z is now earlier than 20150123T200009Z (20150123T200509Z - 5 min.)', 'Code': 'SignatureDoesNotMatch', 'Type': 'Sender'}}
2015-01-22 23:15:39,243 (DEBUG) ebcli.lib.aws : Received a 403
2015-01-22 23:15:39,244 (ERROR) eb : The current user does not have the correct permissions.
2015-01-22 23:15:39,245 (INFO) eb : Setting up ~/aws/ directory with config file
You have not yet set up your credentials or your credentials are incorrect
You must provide your credentials.
(aws-access-id): XXXXXXXXXX
(aws-secret-key): XXXXXXXXXXXXXXXX
2015-01-22 23:17:15,862 (DEBUG) ebcli.core.fileoperations : Project root found at: /home/xxx/Dropbox/Debian_Workspace/GameHub/GameHub
2015-01-22 23:17:15,868 (DEBUG) ebcli.core.fileoperations : Project root found at: /home/xxx/Dropbox/Debian_Workspace/GameHub/GameHub
2015-01-22 23:17:15,869 (DEBUG) ebcli.core.fileoperations : Project root found at: /home/xxx/Dropbox/Debian_Workspace/GameHub/GameHub
2015-01-22 23:17:15,871 (DEBUG) ebcli.core.fileoperations : Directory found, but no config or app name exists
2015-01-22 23:17:15,876 (DEBUG) ebcli.lib.elasticbeanstalk : Inside get_all_applications api wrapper
2015-01-22 23:17:15,877 (DEBUG) ebcli.lib.aws : Making api call: (elasticbeanstalk, describe-applications) to region: us-west-2 with args:{}
2015-01-22 23:17:16,301 (DEBUG) ebcli.lib.aws : API call finished, status = 403
2015-01-22 23:17:16,301 (DEBUG) ebcli.lib.aws : Response: {'ResponseMetadata': {'RequestId': '5ba42797-a33b-11e4-832c-0ba59e4b9564'}, 'Error': {'Message': 'Signature expired: 20150123T051715Z is now earlier than 20150123T200146Z (20150123T200646Z - 5 min.)', 'Code': 'SignatureDoesNotMatch', 'Type': 'Sender'}}
2015-01-22 23:17:16,301 (DEBUG) ebcli.lib.aws : Received a 403
Traceback (most recent call last):
File "/usr/local/bin/eb", line 9, in <module>
load_entry_point('awsebcli==3.0.10', 'console_scripts', 'eb')()
File "/usr/local/lib/python2.7/dist-packages/ebcli/core/ebcore.py", line 99, in main
app.run()
File "/usr/local/lib/python2.7/dist-packages/cement/core/foundation.py", line 694, in run
self.controller._dispatch()
File "/usr/local/lib/python2.7/dist-packages/cement/core/controller.py", line 455, in _dispatch
return func()
File "/usr/local/lib/python2.7/dist-packages/cement/core/controller.py", line 461, in _dispatch
return func()
File "/usr/local/lib/python2.7/dist-packages/ebcli/core/abstractcontroller.py", line 64, in default
self.do_command()
File "/usr/local/lib/python2.7/dist-packages/ebcli/controllers/initialize.py", line 59, in do_command
self.app_name = self.get_app_name()
File "/usr/local/lib/python2.7/dist-packages/ebcli/controllers/initialize.py", line 151, in get_app_name
app_name = _get_application_name_interactive(self.region)
File "/usr/local/lib/python2.7/dist-packages/ebcli/controllers/initialize.py", line 271, in _get_application_name_interactive
app_list = operations.get_application_names(region)
File "/usr/local/lib/python2.7/dist-packages/ebcli/core/operations.py", line 466, in get_application_names
app_list = elasticbeanstalk.get_all_applications(region=region)
File "/usr/local/lib/python2.7/dist-packages/ebcli/lib/elasticbeanstalk.py", line 472, in get_all_applications
region=region)
File "/usr/local/lib/python2.7/dist-packages/ebcli/lib/elasticbeanstalk.py", line 49, in _make_api_call
**operation_options)
File "/usr/local/lib/python2.7/dist-packages/ebcli/lib/aws.py", line 151, in make_api_call
raise NotAuthorizedError('Operation Denied. Are your '
ebcli.objects.exceptions.NotAuthorizedError: Operation Denied. Are your permissions correct?
xxx@debian:~/Dropbox/Debian_Workspace/GameHub/GameHub$
1 个解决方案
#1
20
Given the debug information you showed, the key message is:
根据您显示的调试信息,关键信息是:
Signature expired: 20150123T051715Z is now earlier than 20150123T200146Z (20150123T200646Z - 5 min.)
签名已过期:20150123T051715Z现在早于20150123T200146Z(20150123T200646Z - 5分钟)
Looks like the time on your computer is incorrect. The AWS signature requires you to sign with time, and the time has to be accurate within 5 minutes.
看起来您的计算机上的时间不正确。 AWS签名要求您与时间签名,时间必须在5分钟内准确。
#1
20
Given the debug information you showed, the key message is:
根据您显示的调试信息,关键信息是:
Signature expired: 20150123T051715Z is now earlier than 20150123T200146Z (20150123T200646Z - 5 min.)
签名已过期:20150123T051715Z现在早于20150123T200146Z(20150123T200646Z - 5分钟)
Looks like the time on your computer is incorrect. The AWS signature requires you to sign with time, and the time has to be accurate within 5 minutes.
看起来您的计算机上的时间不正确。 AWS签名要求您与时间签名,时间必须在5分钟内准确。